claude¶
toolroom._stubs.claude.Claude
¶
Bases: Tool[_R]
Agents
¶
Bases: Tool[_R2]
__call__
¶
__call__(
*,
add_dir: Value = ...,
agent: Value = ...,
all: Flag = ...,
allow_dangerously_skip_permissions: Flag = ...,
cwd: Value = ...,
dangerously_skip_permissions: Flag = ...,
effort: Value = ...,
json: Flag = ...,
mcp_config: Value = ...,
model: Value = ...,
permission_mode: Value = ...,
plugin_dir: Value = ...,
setting_sources: Value = ...,
settings: Value = ...,
strict_mcp_config: Flag = ...,
**flags: Any,
) -> _R2
Manage background agents
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
add_dir
|
Value
|
Additional directory to allow tool access to in dispatched sessions (repeatable). |
...
|
agent
|
Value
|
Default agent for sessions dispatched from agent view. |
...
|
all
|
Flag
|
With --json: also include completed background sessions. |
...
|
allow_dangerously_skip_permissions
|
Flag
|
Make bypass-permissions mode available to dispatched sessions without defaulting to it. |
...
|
cwd
|
Value
|
Show only background sessions started under |
...
|
dangerously_skip_permissions
|
Flag
|
Alias for --permission-mode bypassPermissions. |
...
|
effort
|
Value
|
Default effort level for sessions dispatched from agent view. |
...
|
json
|
Flag
|
Print active sessions (interactive and background) as a JSON array and exit (for scripting; does not require a TTY). |
...
|
mcp_config
|
Value
|
MCP server configuration to apply to dispatched sessions (repeatable). |
...
|
model
|
Value
|
Default model for sessions dispatched from agent view. |
...
|
permission_mode
|
Value
|
Default permission mode for sessions dispatched from agent view. |
...
|
plugin_dir
|
Value
|
Load plugins from specified directory for the agent view and dispatched sessions (repeatable). |
...
|
setting_sources
|
Value
|
Comma-separated list of setting sources to load (user, project, local). |
...
|
settings
|
Value
|
Settings file or JSON string to apply to the agent view and dispatched sessions. |
...
|
strict_mcp_config
|
Flag
|
Only use MCP servers from --mcp-config in dispatched sessions. |
...
|
Auth
¶
Bases: Tool[_R2]
Login
¶
Bases: Tool[_R3]
__call__
¶
__call__(
*,
claudeai: Flag = ...,
console: Flag = ...,
email: Value = ...,
sso: Flag = ...,
**flags: Any,
) -> _R3
Sign in to your Anthropic account
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
claudeai
|
Flag
|
Use Claude subscription (default). |
...
|
console
|
Flag
|
Use Anthropic Console (API usage billing) instead of Claude subscription. |
...
|
email
|
Value
|
Pre-populate email address on the login page. |
...
|
sso
|
Flag
|
Force SSO login flow. |
...
|
Logout
¶
Status
¶
Doctor
¶
Install
¶
Mcp
¶
Bases: Tool[_R2]
Add
¶
Bases: Tool[_R3]
__call__
¶
__call__(
name: str | PathLike[str],
/,
*args: str | PathLike[str],
callback_port: Value = ...,
client_id: Value = ...,
client_secret: Flag = ...,
env: Value = ...,
header: Value = ...,
scope: Value = ...,
transport: Value = ...,
**flags: Any,
) -> _R3
Add an MCP server to Claude Code.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
callback_port
|
Value
|
Fixed port for OAuth callback (for servers requiring pre-registered redirect URIs). |
...
|
client_id
|
Value
|
OAuth client ID for HTTP/SSE servers. |
...
|
client_secret
|
Flag
|
Prompt for OAuth client secret (or set MCP_CLIENT_SECRET env var). |
...
|
env
|
Value
|
Set environment variables (e.g. |
...
|
header
|
Value
|
Set WebSocket headers (e.g. |
...
|
scope
|
Value
|
Configuration scope (local, user, or project). Defaults to |
...
|
transport
|
Value
|
Transport type (stdio, sse, http). |
...
|
AddJson
¶
Bases: Tool[_R3]
__call__
¶
__call__(
name: str | PathLike[str],
/,
*args: str | PathLike[str],
client_secret: Flag = ...,
scope: Value = ...,
**flags: Any,
) -> _R3
Add an MCP server (stdio or SSE) with a JSON string
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
client_secret
|
Flag
|
Prompt for OAuth client secret (or set MCP_CLIENT_SECRET env var). |
...
|
scope
|
Value
|
Configuration scope (local, user, or project). Defaults to |
...
|
Get
¶
List
¶
Remove
¶
Bases: Tool[_R3]
__call__
¶
__call__(
name: str | PathLike[str],
/,
*args: str | PathLike[str],
scope: Value = ...,
**flags: Any,
) -> _R3
Remove an MCP server
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
scope
|
Value
|
Configuration scope (local, user, or project) - if not specified, removes from whichever scope it exists in. |
...
|
Serve
¶
Plugin
¶
Bases: Tool[_R2]
Disable
¶
Enable
¶
Install
¶
Bases: Tool[_R3]
__call__
¶
__call__(
plugin: str | PathLike[str],
/,
*args: str | PathLike[str],
config: Value = ...,
scope: Value = ...,
yes: Flag = ...,
**flags: Any,
) -> _R3
Install a plugin from available marketplaces (use plugin@marketplace for
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config
|
Value
|
Set a userConfig option declared in the plugin's manifest (repeatable). |
...
|
scope
|
Value
|
Installation scope: user, project, or local. Defaults to |
...
|
yes
|
Flag
|
Accept the displayed marketplace-declared command without the confirmation prompt - a plugin installed by running a command, or one whose archive is fetched through a headersHelper command (required when stdin or stdout is not a TTY). Added in 2.1.229. |
...
|
List
¶
Marketplace
¶
Bases: Tool[_R3]
Add
¶
Bases: Tool[_R4]
__call__
¶
__call__(
source: str | PathLike[str],
/,
*args: str | PathLike[str],
scope: Value = ...,
sparse: Value = ...,
**flags: Any,
) -> _R4
Add a marketplace from a URL, path, or GitHub repo
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
scope
|
Value
|
Where to declare the marketplace: user (default), project, or local. |
...
|
sparse
|
Value
|
Limit checkout to specific directories via git sparse-checkout (for monorepos). |
...
|
List
¶
Remove
¶
Bases: Tool[_R4]
__call__
¶
__call__(
name: str | PathLike[str],
/,
*args: str | PathLike[str],
scope: Value = ...,
**flags: Any,
) -> _R4
Remove a configured marketplace
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
scope
|
Value
|
Remove the marketplace declaration from a specific settings scope: user, project, or local. |
...
|
Update
¶
Uninstall
¶
Bases: Tool[_R3]
__call__
¶
__call__(
plugin: str | PathLike[str],
/,
*args: str | PathLike[str],
keep_data: Flag = ...,
prune: Flag = ...,
scope: Value = ...,
yes: Flag = ...,
**flags: Any,
) -> _R3
Uninstall an installed plugin
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
keep_data
|
Flag
|
Preserve the plugin's persistent data directory (~/.claude/plugins/data/{id}/). |
...
|
prune
|
Flag
|
Also remove auto-installed dependencies that are no longer needed (requires -y in non-interactive contexts). |
...
|
scope
|
Value
|
Uninstall from scope: user, project, or local. Defaults to |
...
|
yes
|
Flag
|
Skip the --prune confirmation prompt (required when stdin or stdout is not a TTY). |
...
|
Update
¶
Bases: Tool[_R3]
__call__
¶
__call__(
plugin: str | PathLike[str],
/,
*args: str | PathLike[str],
scope: Value = ...,
yes: Flag = ...,
**flags: Any,
) -> _R3
Update a plugin to the latest version (restart required to apply)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
scope
|
Value
|
Installation scope: user, project, local, managed. Defaults to |
...
|
yes
|
Flag
|
Accept the displayed marketplace-declared command without the confirmation prompt - a changed install command, or the headersHelper command that fetches its archive (required when stdin or stdout is not a TTY). Added in 2.1.229. |
...
|
SetupToken
¶
Update
¶
__call__
¶
__call__(
*args: str | PathLike[str],
add_dir: Value = ...,
agent: Value = ...,
agents: Value = ...,
allow_dangerously_skip_permissions: Flag = ...,
allowed_tools: Value = ...,
append_system_prompt: Value = ...,
autocompact: Value = ...,
ax_screen_reader: Flag = ...,
bare: Flag = ...,
betas: Value = ...,
bg: Flag = ...,
brief: Flag = ...,
chrome: Flag = ...,
cloud: Value = ...,
continue_: Flag = ...,
dangerously_skip_permissions: Flag = ...,
debug: Value = ...,
debug_file: Value = ...,
disable_slash_commands: Flag = ...,
disallowed_tools: Value = ...,
effort: Value = ...,
environment: Value = ...,
exclude_dynamic_system_prompt_sections: Flag = ...,
fallback_model: Value = ...,
file: Value = ...,
fork_session: Flag = ...,
forward_subagent_text: Flag = ...,
from_pr: Value = ...,
ide: Flag = ...,
include_hook_events: Flag = ...,
include_partial_messages: Flag = ...,
input_format: Value = ...,
json_schema: Value = ...,
max_budget_usd: Value = ...,
mcp_config: Value = ...,
model: Value = ...,
name: Value = ...,
no_session_persistence: Flag = ...,
output_format: Value = ...,
permission_mode: Value = ...,
plugin_dir: Value = ...,
plugin_url: Value = ...,
print: Flag = ...,
prompt_suggestions: Value = ...,
remote_control: Value = ...,
remote_control_session_name_prefix: Value = ...,
replay_user_messages: Flag = ...,
resume: Value = ...,
safe_mode: Flag = ...,
session_id: Value = ...,
setting_sources: Value = ...,
settings: Value = ...,
strict_mcp_config: Flag = ...,
system_prompt: Value = ...,
teleport: Value = ...,
tmux: Flag = ...,
tools: Value = ...,
verbose: Flag = ...,
worktree: Value = ...,
**flags: Any,
) -> _R
Claude Code - starts an interactive session by default, use -p/--print for
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
add_dir
|
Value
|
Additional directories to allow tool access to. |
...
|
agent
|
Value
|
Agent for the current session. |
...
|
agents
|
Value
|
JSON object defining custom agents (e.g. |
...
|
allow_dangerously_skip_permissions
|
Flag
|
Enable bypassing all permission checks as an option, without it being enabled by default. |
...
|
allowed_tools
|
Value
|
Comma or space-separated list of tool names to allow (e.g. |
...
|
append_system_prompt
|
Value
|
Append a system prompt to the default system prompt. |
...
|
autocompact
|
Value
|
Auto-compact window size (auto, or 100k-1M tokens). |
...
|
ax_screen_reader
|
Flag
|
Render screen-reader friendly output (flat text, no decorative borders or animations). |
...
|
bare
|
Flag
|
Minimal mode: skip hooks, LSP, plugin sync, attribution, auto-memory, background prefetches, keychain reads, and CLAUDE.md auto-discovery. |
...
|
betas
|
Value
|
Beta headers to include in API requests (API key users only). |
...
|
bg
|
Flag
|
Start the session as a background agent and return immediately (manage with |
...
|
brief
|
Flag
|
Enable SendUserMessage tool for agent-to-user communication. |
...
|
chrome
|
Flag
|
Enable Claude in Chrome integration. |
...
|
cloud
|
Value
|
Create a cloud session with the given description, or attach to an existing one by session ID or claude.ai/code URL. |
...
|
continue_
|
Flag
|
Continue the most recent conversation in the current directory. |
...
|
dangerously_skip_permissions
|
Flag
|
Bypass all permission checks. |
...
|
debug
|
Value
|
Enable debug mode with optional category filtering (e.g., "api,hooks" or "!1p,!file"). |
...
|
debug_file
|
Value
|
Write debug logs to a specific file path (implicitly enables debug mode). |
...
|
disable_slash_commands
|
Flag
|
Disable all skills. |
...
|
disallowed_tools
|
Value
|
Comma or space-separated list of tool names to deny (e.g. |
...
|
effort
|
Value
|
Effort level for the current session (low, medium, high, xhigh, max). |
...
|
environment
|
Value
|
Create a new cloud session that runs on the given self-hosted environment (ccpool_...). |
...
|
exclude_dynamic_system_prompt_sections
|
Flag
|
Move per-machine sections (cwd, env info, memory paths, git status) from the system prompt into the first user message. |
...
|
fallback_model
|
Value
|
Enable automatic fallback to specified model(s) when the default model is overloaded or not available. |
...
|
file
|
Value
|
File resources to download at startup. |
...
|
fork_session
|
Flag
|
When resuming, create a new session ID instead of reusing the original (use with --resume or --continue). |
...
|
forward_subagent_text
|
Flag
|
Forward subagent text and thinking blocks as assistant/user messages with parent_tool_use_id set (only works with --print and --output-format=stream-json). |
...
|
from_pr
|
Value
|
Resume a session linked to a PR by PR number/URL, or open interactive picker with optional search term. |
...
|
ide
|
Flag
|
Automatically connect to IDE on startup if exactly one valid IDE is available. |
...
|
include_hook_events
|
Flag
|
Include all hook lifecycle events in the output stream (only works with --output-format=stream-json). |
...
|
include_partial_messages
|
Flag
|
Include partial message chunks as they arrive (only works with --print and --output-format=stream-json). |
...
|
input_format
|
Value
|
Input format (only works with --print): "text" (default), or "stream-json" (realtime streaming input) (choices: "text", "stream-json"). |
...
|
json_schema
|
Value
|
JSON Schema for structured output validation. |
...
|
max_budget_usd
|
Value
|
Maximum dollar amount to spend on API calls (only works with --print). |
...
|
mcp_config
|
Value
|
Load MCP servers from JSON files or strings (space-separated). |
...
|
model
|
Value
|
Model for the current session. |
...
|
name
|
Value
|
Set a display name for this session (shown in the prompt box, /resume picker, and terminal title). |
...
|
no_session_persistence
|
Flag
|
Disable session persistence - sessions will not be saved to disk and cannot be resumed (only works with --print). |
...
|
output_format
|
Value
|
Output format (only works with --print): "text" (default), "json" (single result), or "stream-json" (realtime streaming) (choices: "text", "json", "stream-json"). |
...
|
permission_mode
|
Value
|
Permission mode to use for the session (choices: "acceptEdits", "auto", "bypassPermissions", "manual", "dontAsk", "plan"). |
...
|
plugin_dir
|
Value
|
Load a plugin from a directory or .zip for this session only (repeatable: --plugin-dir A --plugin-dir B.zip). Defaults to |
...
|
plugin_url
|
Value
|
Fetch a plugin .zip from a URL for this session only (repeatable: --plugin-url A --plugin-url B). Defaults to |
...
|
print
|
Flag
|
Print response and exit (useful for pipes). |
...
|
prompt_suggestions
|
Value
|
Enable prompt suggestions. |
...
|
remote_control
|
Value
|
Start an interactive session with Remote Control enabled (optionally named). |
...
|
remote_control_session_name_prefix
|
Value
|
Prefix for auto-generated Remote Control session names. Defaults to |
...
|
replay_user_messages
|
Flag
|
Re-emit user messages from stdin back on stdout for acknowledgment (only works with --input-format=stream-json and --output-format=stream-json). |
...
|
resume
|
Value
|
Resume a conversation by session ID, or open interactive picker with optional search term. |
...
|
safe_mode
|
Flag
|
Start with all customizations (CLAUDE.md, skills, plugins, hooks, MCP servers, custom commands and agents, output styles, workflows, custom themes, keybindings, and more) disabled - useful for troubleshooting a broken configuration. |
...
|
session_id
|
Value
|
Use a specific session ID for the conversation (must be a valid UUID). |
...
|
setting_sources
|
Value
|
Comma-separated list of setting sources to load (user, project, local). |
...
|
settings
|
Value
|
Path to a settings JSON file or a JSON string to load additional settings from. |
...
|
strict_mcp_config
|
Flag
|
Only use MCP servers from --mcp-config, ignoring all other MCP configurations. |
...
|
system_prompt
|
Value
|
System prompt to use for the session. |
...
|
teleport
|
Value
|
Resume a teleport session, optionally specify session ID. |
...
|
tmux
|
Flag
|
Create a tmux session for the worktree (requires --worktree). |
...
|
tools
|
Value
|
Specify the list of available tools from the built-in set. |
...
|
verbose
|
Flag
|
Override verbose mode setting from config. |
...
|
worktree
|
Value
|
Create a new git worktree for this session (optionally specify a name). |
...
|
flags
¶
flags(
*,
add_dir: Value = ...,
agent: Value = ...,
agents: Value = ...,
allow_dangerously_skip_permissions: Flag = ...,
allowed_tools: Value = ...,
append_system_prompt: Value = ...,
autocompact: Value = ...,
ax_screen_reader: Flag = ...,
bare: Flag = ...,
betas: Value = ...,
bg: Flag = ...,
brief: Flag = ...,
chrome: Flag = ...,
cloud: Value = ...,
continue_: Flag = ...,
dangerously_skip_permissions: Flag = ...,
debug: Value = ...,
debug_file: Value = ...,
disable_slash_commands: Flag = ...,
disallowed_tools: Value = ...,
effort: Value = ...,
environment: Value = ...,
exclude_dynamic_system_prompt_sections: Flag = ...,
fallback_model: Value = ...,
file: Value = ...,
fork_session: Flag = ...,
forward_subagent_text: Flag = ...,
from_pr: Value = ...,
ide: Flag = ...,
include_hook_events: Flag = ...,
include_partial_messages: Flag = ...,
input_format: Value = ...,
json_schema: Value = ...,
max_budget_usd: Value = ...,
mcp_config: Value = ...,
model: Value = ...,
name: Value = ...,
no_session_persistence: Flag = ...,
output_format: Value = ...,
permission_mode: Value = ...,
plugin_dir: Value = ...,
plugin_url: Value = ...,
print: Flag = ...,
prompt_suggestions: Value = ...,
remote_control: Value = ...,
remote_control_session_name_prefix: Value = ...,
replay_user_messages: Flag = ...,
resume: Value = ...,
safe_mode: Flag = ...,
session_id: Value = ...,
setting_sources: Value = ...,
settings: Value = ...,
strict_mcp_config: Flag = ...,
system_prompt: Value = ...,
teleport: Value = ...,
tmux: Flag = ...,
tools: Value = ...,
verbose: Flag = ...,
worktree: Value = ...,
**flags: Any,
) -> Self
Bind tool-level global options before the subcommand.
tools.docker.flags(host=...) puts a tool's own
options ahead of the verb, where they belong.