Search the documentation
27 pages for --env.
Titles and paths first, then pages whose text carries it. Each row opens that page as this site last read it.
scripting
Claude Developer Platform · in the page
cli-sdks-libraries/cli/scripting
…t ID as a flag: ```bash CLI ant beta:environments update --environment-id env_01595EKxaaTTGwwY3kyXdtbs < summarizer.environment.yaml ``` </Tip> </Step> <Step title="Start a…
using
Claude Developer Platform · in the page
cli-sdks-libraries/cli/using
…t '{type: agent, id: agent_011CYm1BLqPXpQRk5khsSXrs, version: 1}' \ --environment-id env_01595EKxaaTTGwwY3kyXdtbs \ --title "CLI docs test session" ``` Repeatable flags build arrays. Each `--tool…
budgets
Claude Developer Platform · in the page
managed-agents/budgets
…SESSION_ID=$(ant beta:sessions create \ --agent "$AGENT_ID" \ --environment-id "$ENVIRONMENT_ID" \ --budget '{type: limit, max_list_cost: {amount: "125", currency: USD}}' \ --transform…
DCF Model Rubric
Claude Developer Platform · in the page
managed-agents/define-outcomes
…SESSION_ID=$(ant beta:sessions create \ --agent "$AGENT_ID" \ --environment-id "$ENVIRONMENT_ID" \ --title "Financial analysis on Costco" \ --transform id --raw-output) # Define the…
environments
Claude Developer Platform · in the page
managed-agents/environments
…) ``` ```bash CLI ant beta:sessions create --agent "$AGENT_ID" --environment-id "$ENVIRONMENT_ID" ``` ```python Python session = client.beta.sessions.create( agent=agent.id,…
files
Claude Developer Platform · in the page
managed-agents/files
…SESSION_ID=$(ant beta:sessions create \ --agent "$AGENT_ID" \ --environment-id "$ENVIRONMENT_ID" \ --transform id --raw-output <<EOF resources: - type: file file_id: $FILE_ID…
github
Claude Developer Platform · in the page
managed-agents/github
…SESSION_ID=$(ant beta:sessions create \ --agent "$AGENT_ID" \ --environment-id "$ENVIRONMENT_ID" \ --transform id --raw-output <<'EOF' resources: - type: github_repository url:…
mcp-connector
Claude Developer Platform · in the page
managed-agents/mcp-connector
…SESSION_ID=$(ant beta:sessions create \ --agent "$AGENT_ID" \ --environment-id "$ENVIRONMENT_ID" \ --vault-id "$VAULT_ID" \ --transform id --raw-output) ``` ```python Python ses…
migration
Claude Developer Platform · in the page
managed-agents/migration
…agent "{type: agent, id: $agent_id, version: $agent_version}" \ --environment-id "$environment_id" \ --transform id --raw-output) # Open the stream first, then send the user message…
multiagent-orchestration
Claude Developer Platform · in the page
managed-agents/multiagent-orchestration
…CLI ant beta:sessions create \ --agent "$COORDINATOR_ID" \ --environment-id "$ENVIRONMENT_ID" ``` ```python Python session = client.beta.sessions.create( agent=coordinator.id,…
onboarding
Claude Developer Platform · in the page
managed-agents/onboarding
…beta:sessions create \ --agent agent_01J8XkN5uT3vHpLqRfWdY2 \ --environment-id env_01K2mPsT7hNwR4jXuLvCqD8 \ --title "My first session" ``` ```python Python session = client.beta.se…
quickstart
Claude Developer Platform · in the page
managed-agents/quickstart
…ID=$(ant beta:sessions create \ --agent "$AGENT_ID" \ --environment-id "$ENVIRONMENT_ID" \ --title "Quickstart session" \ --transform id --raw-output) echo "Sess…
reference
Claude Developer Platform · in the page
managed-agents/reference
…---------------------------------------------------------------- | | `--environment-id` | The environment to poll for work. Also reads from `ANTHROPIC_ENVIRONMENT_ID`.…
spawn.sh: called once per claimed work item
Claude Developer Platform · in the page
managed-agents/self-hosted-sandboxes
…ers_polling` is at least 1: ```bash ant beta:environments:work stats --environment-id "$ANTHROPIC_ENVIRONMENT_ID" ``` If `workers_polling` stays at 0, the worker isn't reaching the queue: confirm `A…
sessions
Claude Developer Platform · in the page
managed-agents/sessions
…``bash CLI ant beta:sessions create \ --agent "$AGENT_ID" \ --environment-id "$ENVIRONMENT_ID" ``` ```python Python session = client.beta.sessions.create( agent=agent.id,…
skills
Claude Developer Platform · in the page
managed-agents/skills
…SESSION_ID=$(ant beta:sessions create \ --agent "$AGENT_ID" \ --environment-id "$ENVIRONMENT_ID" \ --transform id --raw-output <<'EOF' resources: - type: github_repository url:…
vaults
Claude Developer Platform · in the page
managed-agents/vaults
…SESSION_ID=$(ant beta:sessions create \ --agent "$AGENT_ID" \ --environment-id "$ENVIRONMENT_ID" \ --vault-id "$VAULT_ID" \ --title "Alice's Slack digest" \ --transform id --raw-ou…
CLI reference
Claude Code CLI · in the page
cli-reference
…| | `--environment <environment-id>` | Create a new cloud session that runs on the [self-hosted environment](/docs/en/se…
Configure cloud environments
Claude Code CLI · in the page
cloud-environments
…self-hosted environment](/docs/en/self-hosted-environments), passing `--environment <environment-id>` with its `ccpool_` ID [when you dispatch a session](/docs/en/self-hosted-environments-testing#run-…
Connect Claude Code to tools via MCP
Claude Code CLI · in the page
mcp
…ommand> [args...] # Real example: Add Airtable server claude mcp add --env AIRTABLE_API_KEY=YOUR_KEY --transport stdio airtable \ -- npx -y airtable-mcp-server ``` <Note> **Important: Separate s…
Connect to MCP servers
Claude Code CLI · in the page
mcp-quickstart
…environment variable such as an API key. Pass the variable with `--env KEY=value` on `claude mcp add`, or in the `env` field of the server's `.mcp.json` entry. The server's documentation lists th…
Self-hosted environments
Claude Code CLI · in the page
self-hosted-environments
…cloud`](/docs/en/claude-code-on-the-web#from-terminal-to-web) or an [`--environment` dispatch](/docs/en/self-hosted-environments-testing#run-the-test-loop), can run in self-hosted environments. [Claud…
Customize sessions in self-hosted environments
Claude Code CLI · in the page
self-hosted-environments-configuration
…_POOL_ID`; the CLI flag and env var names use `environment`, such as `--environment-secret-file`. ## Wrapper scripts Use a wrapper script when each session needs setup the runner can't do on its own…
Deploy self-hosted environments to production
Claude Code CLI · in the page
self-hosted-environments-deploy
…latest args: - self-hosted-runner - --environment-secret-file - /etc/claude/environment-secret - --capacity - "4" volume…
Self-hosted environments quickstart
Claude Code CLI · in the page
self-hosted-environments-quickstart
…A ready host prints the runner's usage text, listing flags such as `--environment-secret-file`. On versions older than 2.1.224, the command prints the general `claude --help` output instead; upgrade…
Self-hosted environments reference
Claude Code CLI · in the page
self-hosted-environments-reference
…CLI flags and environment variables spell it `environment`, such as `--environment-secret-file`; the deprecated `pool` spellings still work, as the [`--environment-secret-file` row](#runner-cli-flags…
Test self-hosted environments end to end
Claude Code CLI · in the page
self-hosted-environments-testing
…re the variable might be set by accident. ## Run the test loop The `--environment` and `--ref` dispatch flags require Claude Code v2.1.224 or later on the machine that runs the script, the same floo…