Skip to content

refactor(cli): rename 'server start/stop' to 'up/down', add -d alias#145

Merged
Sootopolis merged 2 commits into
mainfrom
wip
Jul 4, 2026
Merged

refactor(cli): rename 'server start/stop' to 'up/down', add -d alias#145
Sootopolis merged 2 commits into
mainfrom
wip

Conversation

@Sootopolis

Copy link
Copy Markdown
Owner

What

Rename the server lifecycle subcommands: ccas server startccas server up, ccas server stopccas server down (status unchanged). Adds a -d short alias for --detach.

Two commits:

  1. refactor(cli) — the rename + -d alias + regenerated completion snapshot + stale-README fix.
  2. docs(ship) — unrelated pre-existing ship-skill doc tweak, split out to keep the rename atomic.

Why

start and status share the st prefix, so tab-completing either took 4 keystrokes. up/down/status all get a unique first letter, and up/down is the established wireguard / docker-compose idiom. up also matches the existing foreground-by-default + --detach-to-background behaviour (compose up / up -d); the new -d alias completes that parallel.

Changes

  • CliCommand.scalaup/down wire names, .alias("d") on --detach, help text; vals serverUp/serverDown.
  • Detach.scala — child-argv rebuild (reconstruct/fallbackCommand) re-execs server up (lockstep with the wire name or detached launch breaks).
  • CompletionSpec.scala + completions/ccas.bash — leaves/group/summaries; snapshot regenerated (up down status, opts="--detach -d").
  • Main.scala, XdgPaths.scala — comment refs.
  • README.md — doc refs; also fixed a stale top-level serve example (dead since the feat(cli): nest server lifecycle under 'ccas server', add status #142 nesting).
  • Tests — TestCliParser (renamed + new server up -d alias case), TestServeLifecycle.

Testing

  • Full sbt test: 998 passed, 0 failed (pre-push hook + local).
  • Drove ccas server --help / ccas server up --help: renders up [(-d, --detach)], down, status; help text references ccas server down.

Fixes

None (no open issue) — quality-of-life CLI rename.

🤖 Generated with Claude Code

Sootopolis and others added 2 commits July 4, 2026 04:11
`server {start,status}` shared the `st` prefix, so tab-completing either
needed 4 keystrokes (`star`/`stat`). Renaming the lifecycle pair to
`up`/`down` (keeping `status`) drops every server subcommand to a unique
first letter and adopts the wireguard/docker-compose idiom.

`up` is also a better semantic fit: it already ran foreground-by-default
with `--detach` to background, which mirrors compose `up` / `up -d`. The
new `-d` short alias completes that parallel.

Detach's child-argv rebuild (`reconstruct`/`fallbackCommand`) re-execs
this same binary as `server up`, so it moves in lockstep with the wire
name or detached launch breaks. Completion snapshot regenerated
(`completions/ccas.bash`) with `up down status` and `opts="--detach -d"`.

Also fixes a stale README example that still used the pre-#142
top-level `serve` (removed when the lifecycle nested under `server`).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The branch-recycle step force-pushes a tree that is byte-identical to
the just-merged, CI-green base, so re-running the pre-push `sbt test`
via the hook is pure waste — document `--no-verify` there.

Also flag that the reset and the push must be separate Bash calls: the
settings allowlist matches commands exactly and won't authorize a
`reset && push` compound, so chaining them triggers a needless prompt.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@Sootopolis Sootopolis merged commit d41edc3 into main Jul 4, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant