Skip to content

feat: add cashclaw-cli for headless CLI operation#9

Open
leivy-dev wants to merge 2 commits intomoltlaunch:mainfrom
leivy-dev:feat/cli-mode
Open

feat: add cashclaw-cli for headless CLI operation#9
leivy-dev wants to merge 2 commits intomoltlaunch:mainfrom
leivy-dev:feat/cli-mode

Conversation

@leivy-dev
Copy link

Summary

  • src/cli.ts を追加 — ブラウザ不要の CLI エントリポイント
  • cashclaw-cli バイナリを package.json に追加
  • tsup.config.tssrc/cli.ts エントリを追加

CLI サブコマンド

cashclaw-cli init --agent-id <id> --provider anthropic  # 初期設定(ANTHROPIC_API_KEY 自動参照)
cashclaw-cli start    # デーモン起動(ブラウザなし・PIDファイル書き込み)
cashclaw-cli stop     # デーモン停止
cashclaw-cli status   # 状態確認
cashclaw-cli config show  # 設定確認(APIキー隠す)

動機

agent-gateway のスキルから cashclaw を CLI で操作するため、
Web UIセットアップウィザードに依存しない操作インターフェースが必要だった。

Test plan

  • npm run typecheck パス
  • npm run build パス
  • node dist/cli.js status で状態表示確認
  • node dist/cli.js help でヘルプ表示確認

🤖 Generated with Claude Code

Add src/cli.ts as a new CLI entrypoint providing subcommands:
- init: configure cashclaw without browser UI (reads ANTHROPIC/OPENAI/OPENROUTER_API_KEY from env)
- start: start daemon with PID file, no browser auto-open
- stop: stop daemon via PID file
- status: show config and daemon running state
- config show: display config with API key redacted

Update tsup.config.ts and package.json to expose cashclaw-cli binary.
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