4.5 KiB
CCS CLI Agent Guide
Canonical agent instructions for /Users/kaitran/CloudPersonal/ccs/cli.
AGENTS.md must stay a symlink to this file.
Scope
CCS is a TypeScript/Bun CLI and dashboard for managing Claude Code, Codex, Factory Droid, CLIProxy, and compatible provider profiles.
Non-Negotiables
- Default branch is
dev. Feature/fix branches start fromdev; production hotfixes start frommainonly when explicitly needed. - Never touch the user's real
~/.ccs/or~/.claude/in tests. UsegetCcsDir()fromsrc/utils/config-manager.ts; it respectsCCS_HOME. - Do not commit directly to
devormain. - Do not manually bump versions or create release tags. Semantic-release owns versions, changelog, tags, npm publish, and GitHub releases.
- CLI terminal output must be ASCII only:
[OK],[!],[X],[i]. - Respect
NO_COLORand TTY-aware output.
Architecture
src/- TypeScript CLI/server source.lib/ccs,lib/ccs.ps1- bootstrap wrappers; no help text here.ui/src/- React dashboard.dist/anddist/ui/- build outputs.docs/- local development and architecture docs.- Docker support lives under
docker/and related commands.
Profile resolution priority:
- Built-in CLIProxy providers: Gemini, Codex, Antigravity.
- User-defined
config.cliproxyproviders. - Settings-based
config.profiles. - Account-based
profiles.jsonwith isolatedCLAUDE_CONFIG_DIR.
All env values written into settings must be strings.
User-Facing Change Checklist
- Update the matching
--helphandler when CLI behavior changes. - Keep README concise; do not remove
## Community Projectsor## Star Historyunless explicitly asked. - Use neutral broad examples such as
ccs,ccs codex,ccs glm, orccs <provider>unless the page is provider-specific. - If CLI commands, config, providers, install steps, or user workflows change,
update the public CCS docs in
/Users/kaitran/CloudPersonal/ccs/docs.
Help locations:
ccs --help:src/commands/help-command.tsccs api --help:src/commands/api-command.tsccs cleanup --help:src/commands/cleanup-command.tsccs cliproxy --help:src/commands/cliproxy-command.tsccs config --help:src/commands/config-command.tsccs copilot --help:src/commands/copilot-command.tsccs cursor --help:src/commands/cursor-command.tsccs doctor --help:src/commands/doctor-command.tsccs docker --help:src/commands/docker/help-subcommand.tsccs env --help:src/commands/env-command.tsccs migrate --help:src/commands/migrate-command.tsccs persist --help:src/commands/persist-command.tsccs setup --help:src/commands/setup-command.ts
Validation
Format before validating:
cd /Users/kaitran/CloudPersonal/ccs/cli && bun run format
cd /Users/kaitran/CloudPersonal/ccs/cli && bun run lint:fix
cd /Users/kaitran/CloudPersonal/ccs/cli && bun run validate
Before requesting review or merge, run:
cd /Users/kaitran/CloudPersonal/ccs/cli && bun run validate:ci-parity
If UI changed:
cd /Users/kaitran/CloudPersonal/ccs/cli/ui && bun run format && bun run validate
After every push to a PR, watch CI until it finishes. If checks fail, inspect logs, fix root cause, push again, and re-watch.
Issue Triage
Issue triage is GitHub-only unless implementation is explicitly requested. Always inspect live state first:
cd /Users/kaitran/CloudPersonal/ccs/cli && gh issue view <number> --json title,body,state,labels,assignees,comments
For open issues, prefer one type label and one area label. Use routing labels
only when they affect handling: upstream-blocked, needs-repro,
needs-split, docs-gap. Do not close issues on age, intuition, or vague
titles; close only with evidence from README, docs, changelog, source, or a
canonical duplicate.
Release Signals
- PR
CIis the contributor quality gate. Push CIis the post-merge signal fordev.Dev Releasepublishes the@devnpm package.- A red
Dev Releaseis not automatically contributor failure; check PRCIandPush CIfirst.
Use feat: or fix: for dev-to-main promotion PRs so release automation runs.
Design Standards
- YAGNI, KISS, DRY.
- CLI-complete: core configuration features need CLI coverage.
- Dashboard parity: configuration features usually need dashboard coverage too.
- Execution remains CLI-first; dashboard should not replace terminal profile launch flows.
- Error messages should help users recover, not just report failure.