A Go wrapper that translates StrawPot protocol arguments into Claude Code CLI flags. It acts as a pure translation layer — process management, sessions, and infrastructure are handled by StrawPot core.
- Claude Code CLI (
npm install -g @anthropic-ai/claude-code) - An Anthropic API key (or a Claude Pro/Max plan)
curl -fsSL https://raw.githubusercontent.com/strawpot/strawpot_claude_code_cli/main/strawpot_claude_code/install.sh | shThis downloads a pre-built binary for your platform (macOS/Linux, amd64/arm64) to /usr/local/bin. Override the install directory with INSTALL_DIR:
INSTALL_DIR=~/.local/bin curl -fsSL ... | shThe wrapper exposes two subcommands:
Runs claude /login to authenticate with Anthropic.
strawpot_claude_code setupTranslates StrawPot protocol flags into a Claude Code command and outputs it as JSON.
strawpot_claude_code build \
--agent-workspace-dir /path/to/workspace \
--working-dir /path/to/project \
--task "fix the bug" \
--config '{"model":"claude-opus-4-6"}'Output:
{
"cmd": ["claude", "-p", "fix the bug", "--system-prompt", "/path/to/workspace/prompt.md", "--model", "claude-opus-4-6", "--dangerously-skip-permissions", "--add-dir", "/path/to/workspace"],
"cwd": "/path/to/project"
}| Flag | Required | Description |
|---|---|---|
--agent-workspace-dir |
Yes | Workspace directory (used as --add-dir) |
--working-dir |
No | Working directory for the command (cwd in output) |
--task |
No | Task prompt (passed as claude -p) |
--config |
No | JSON config object (default: {}) |
--role-prompt |
No | Role prompt text (written to prompt.md) |
--memory-prompt |
No | Memory/context prompt (appended to prompt.md) |
--skills-dir |
No | Directory with skill subdirectories (symlinked to .claude/skills/) |
--roles-dir |
No | Directory with role subdirectories (repeatable, symlinked to roles/) |
--agent-id |
No | Agent identifier |
Pass via --config:
| Key | Type | Default | Description |
|---|---|---|---|
model |
string | claude-sonnet-4-6 |
Model to use |
dangerously_skip_permissions |
boolean | true |
Skip permission prompts. Set to false to require approval for each action. |
| Variable | Description |
|---|---|
ANTHROPIC_API_KEY |
Anthropic API key (optional if using Plus/Max plan) |
PERMISSION_MODE |
Permission mode passed to --permission-mode (e.g. auto) |
cd claude_code/wrapper
go test -v ./...Releases are built with GoReleaser and published automatically via GitHub Actions.
See LICENSE for details.