Module: Docscribe::CLI::ServerCmd
- Defined in:
- lib/docscribe/cli/server.rb
Overview
Handle the docscribe server subcommand.
Constant Summary collapse
- BANNER =
"Usage: docscribe server <command> [options]\n\nCommands:\n start Start the background daemon\n stop Stop the background daemon\n status Show daemon status\n\nOptions:\n -C, --config <path> Config file path (default: auto-detect)\n\nOnce the server is running, use `--server` with other commands:\n docscribe --server check lib/\n docscribe --server --autocorrect lib/\n"
Class Method Summary collapse
-
.run(argv) ⇒ Integer
Run the server subcommand.
Class Method Details
.run(argv) ⇒ Integer
Run the server subcommand.
30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/docscribe/cli/server.rb', line 30 def run(argv) config_path, cmd = parse_args(argv) return warn(BANNER) || 1 unless cmd case cmd when 'start' then start_server(config_path) when 'stop' then stop_server(config_path) when 'status' then show_status(config_path) else warn(usage) || 1 end end |