#20 Update appview CLI structure to match opake-cli command pattern

closed medium · sable · 2026-03-02 23:37 · closed 2026-03-02 23:37 · Phase 4: AppView + Web UI

Comments — 1

sable note 2026-03-02 23:37

Pattern to match

CLI pattern:

  • commands/mod.rs — declares submodules + Execute trait
  • Each command in its own file: commands/foo.rs with #[derive(Args)] pub struct FooCommand
  • main.rsCli struct with #[command(subcommand)], match dispatch

Current appview state:

  • Everything in main.rsCli, Command enum, and all run_*/status/serve functions inline
  • No commands/ directory

Plan: 1. Create commands/mod.rs with subcommand enum + dispatch 2. Create commands/run.rs, commands/index.rs, commands/serve.rs, commands/status.rs 3. Move the run_full, run_index, run_serve, run_status bodies into command structs 4. Keep shared helpers (load_config_or_exit, open_db_or_exit, build_state, serve_http, shutdown_signal, spawn_indexer) in main.rs — they're infra, not commands 5. Slim main.rs to parse + dispatch

Generated 2026-03-03 02:53 UTC