The thin CLIent approach
summary
Claim: move nearly all CLI logic to a gateway so the client just POSTs a JSON argv array to get preformatted stdout. Implementation experiments use MRuby (failed C static libs), Zig (compiled but segfaulted), and Go (works, cross-compiles all 7 platform executables in 15 minutes, test suite runs ~30× faster than Ruby). Argument parsing is handled server-side with a new rodish library; webshell prototype is built in about 1 hour; only one client update released since March. External execs restricted to six programs for safety.
AI-written summary · about
chapters (14)
- 0:00Thin client CLI approach
- 1:12Traditional CLI problems
- 4:03How thin client works
- 6:48Advantages of thin CLI
- 9:59Thin client limitations
- 12:27Configuring thin client
- 13:52Ruby prototype
- 16:41Static executables
- 18:27Porting to Go
- 20:10Gateway endpoint requests
- 22:56Rodish argument parser
- 26:27Full API via CLI
- 26:48Web-based CLI testing
- 28:16Summary
related talks
40mBuilding CLI Apps for Everyone
29mCommand-Line Applications in Ruby: Design Patterns and Best...
37mBuilding maintainable command-line tools with MRuby
27mReady: 12x Faster Ruby CLIs Through Spectacular Overengineering
32mBuilding CLI Apps for Everyone
42mUsing Ruby to Craft and Test Beautiful Command Line Applications
26mmruby: a Packaging Story Filled with Freedom
35mmruby: a Packaging Story Filled with Freedom
