mirror of
https://github.com/Twigpine/agentvm.git
synced 2026-11-10 17:57:18 -10:00
30 lines
1.3 KiB
Bash
30 lines
1.3 KiB
Bash
# agentvm profile: Claude Code
|
|
#
|
|
# Runs Claude Code (claude CLI) in an isolated workspace with a per-agent HOME.
|
|
# The agent sees its own ~/.claude/ (seeded from the host's at spawn time) so
|
|
# parallel agents don't share session state, settings, or login tokens.
|
|
#
|
|
# Env vars (e.g. ANTHROPIC_API_KEY) are inherited from the host shell and
|
|
# ~/.agentvm/env — no per-profile forwarding needed.
|
|
#
|
|
# Usage:
|
|
# agentvm spawn my-claude --profile claude-code
|
|
# agentvm spawn my-claude --profile claude-code -- claude --model claude-opus-4-7
|
|
|
|
PROFILE_LABEL="Claude Code"
|
|
|
|
# Default command: run claude in non-interactive auto-approve mode
|
|
PROFILE_CMD="claude --dangerously-skip-permissions"
|
|
|
|
# Read-only: claude binary (symlink) + the actual versioned binary it points to
|
|
PROFILE_RO_PATHS="${HOME}/.local/bin/claude:${HOME}/.local/share/claude"
|
|
|
|
# State dirs to seed into per-agent HOME (relative to $HOME).
|
|
# Each path is copied from $HOME/<path> into <workspace>/.home/<path> at spawn
|
|
# time so the agent starts with the host's login/settings, then diverges.
|
|
PROFILE_STATE_DIRS=".claude:.claude.json"
|
|
|
|
# Workspace setup script: pre-creates .claude/settings.json (skips bypass-permissions
|
|
# warning) and pre-accepts the folder trust dialog so the agent starts cleanly.
|
|
PROFILE_POST_CREATE_SCRIPT="$SCRIPT_DIR/profiles/setup-claude-code.sh"
|