feat(env): add ccs env command for third-party tool integration

New `ccs env <profile>` command exports shell-evaluable environment
variables for OpenCode, Cursor, Continue, and other third-party tools.

Supports --format (openai|anthropic|raw) and --shell (auto|bash|fish|
powershell) flags. Auto-detects shell from $SHELL env var.

Closes #503
This commit is contained in:
Tam Nhu Tran
2026-02-11 02:38:29 +07:00
parent 72ee3122bd
commit 2e85064b8a
5 changed files with 375 additions and 0 deletions
+9
View File
@@ -257,6 +257,15 @@ Run ${color('ccs config', 'command')} for web dashboard`.trim();
['ccs update --beta', 'Install from dev channel (unstable)'],
]);
// Environment export
printSubSection('Environment Export', [
['ccs env <profile>', 'Export env vars for third-party tools'],
['ccs env <profile> --format openai', 'OpenAI-compatible vars (OpenCode/Cursor)'],
['ccs env <profile> --format anthropic', 'Anthropic vars (default)'],
['ccs env <profile> --format raw', 'All effective env vars'],
['ccs env <profile> --shell fish', 'Fish shell syntax'],
]);
// Flags
printSubSection('Flags', [
['-h, --help', 'Show this help message'],