Depends on
- Packaging (Main entry exists) —
#41
Blocks
ccas serve lifecycle — #48
- Shell completions (consume the decline command tree) —
#49
What
Add decline (com.monovore::decline-effect) and build the subcommand tree.
Public subcommands
| Subcommand |
Maps to |
ccas serve |
boots CcasServer (foreground) |
ccas membership <slug> [...] |
POST /api/jobs/membership |
ccas history <slugs...> [...] |
POST /api/jobs/history |
ccas recruit <slug> [...] |
POST /api/jobs/recruitment |
ccas stats <slug> [...] |
POST /api/jobs/stats |
ccas blacklist {add|list|remove} <slug> |
BlacklistRoutes |
ccas schedule {list|add|remove} |
ScheduleRoutes |
ccas logs <job_id> |
GET /api/jobs/{id}/logs live tail |
ccas jobs [...] |
GET /api/jobs listings |
ccas __complete <args> |
hidden; returns completion matches |
Hidden admin subcommands (decline Visibility.Partial)
| Subcommand |
Maps to |
ccas admin ref [--force] |
POST /api/admin/jobs/matchref |
ccas admin clubdata [--force] [<slug>...] |
POST /api/admin/jobs/clubdata |
Per #50 (closed 2026-05-27): MatchRef and ClubData are server-internal — no public subcommand, no --help listing. Hidden admin escape hatch for ops debugging only. Default JobSchedule rows (see #45) cover the normal cadence.
History stays public because users do want explicit "ingest this club's matches now" semantics (esp. first-seed). Default JobSchedule for History keeps steady state warm.
Each subcommand serializes the same case classes (MembershipRequest, HistoryRequest, ...) that JobRoutes already accepts. HTTP client uses HttpClientLayer.live for consistency.
After a successful submit, poll GET /api/jobs/{id} until terminal, streaming logs from GET /api/jobs/{id}/logs once the file-tail endpoint lands; until then just poll status.
Acceptance
- All listed public subcommands parse via
decline and produce a usable --help per subcommand.
- Hidden
ccas admin ref / ccas admin clubdata work but do not appear in ccas --help output.
ccas membership team-alpha against a running local server returns exit 0 on success, non-zero on job failure, with the server-side error message printed.
ccas <invalid> exits non-zero with the standard decline "unknown command" suggestion.
Files
build.sbt — add decline-effect.
- new
src/main/scala/ccas/cli/ — command tree, HTTP client, poll loop.
src/main/scala/ccas/cli/Main.scala — dispatch into the command tree.
Reference
Tracked under epic #40 (CLI v0). Outcome of #50 decision (closed 2026-05-27).
Depends on
#41Blocks
ccas servelifecycle —#48#49What
Add
decline(com.monovore::decline-effect) and build the subcommand tree.Public subcommands
ccas serveCcasServer(foreground)ccas membership <slug> [...]POST /api/jobs/membershipccas history <slugs...> [...]POST /api/jobs/historyccas recruit <slug> [...]POST /api/jobs/recruitmentccas stats <slug> [...]POST /api/jobs/statsccas blacklist {add|list|remove} <slug>BlacklistRoutesccas schedule {list|add|remove}ScheduleRoutesccas logs <job_id>GET /api/jobs/{id}/logslive tailccas jobs [...]GET /api/jobslistingsccas __complete <args>Hidden admin subcommands (
decline Visibility.Partial)ccas admin ref [--force]POST /api/admin/jobs/matchrefccas admin clubdata [--force] [<slug>...]POST /api/admin/jobs/clubdataPer
#50(closed 2026-05-27):MatchRefandClubDataare server-internal — no public subcommand, no--helplisting. Hidden admin escape hatch for ops debugging only. DefaultJobSchedulerows (see#45) cover the normal cadence.Historystays public because users do want explicit "ingest this club's matches now" semantics (esp. first-seed). DefaultJobSchedulefor History keeps steady state warm.Each subcommand serializes the same case classes (
MembershipRequest,HistoryRequest, ...) thatJobRoutesalready accepts. HTTP client usesHttpClientLayer.livefor consistency.After a successful submit, poll
GET /api/jobs/{id}until terminal, streaming logs fromGET /api/jobs/{id}/logsonce the file-tail endpoint lands; until then just poll status.Acceptance
declineand produce a usable--helpper subcommand.ccas admin ref/ccas admin clubdatawork but do not appear inccas --helpoutput.ccas membership team-alphaagainst a running local server returns exit 0 on success, non-zero on job failure, with the server-side error message printed.ccas <invalid>exits non-zero with the standarddecline"unknown command" suggestion.Files
build.sbt— adddecline-effect.src/main/scala/ccas/cli/— command tree, HTTP client, poll loop.src/main/scala/ccas/cli/Main.scala— dispatch into the command tree.Reference
Tracked under epic
#40(CLI v0). Outcome of#50decision (closed 2026-05-27).