CliConfig class
Complete CLI configuration produced by parsing command-line arguments.
Constructors
-
CliConfig({String? command, List<
String> positionalArgs = const [], Map<String, String> flags = const {}, Map<String, String> options = const {}, bool verbose = false, bool quiet = false, bool jsonOutput = false, String? model, String? apiKey, int? maxTokens, String? systemPrompt, List<String> allowedTools = const [], PermissionMode? permissionMode, String? workDir, String? sessionId, bool continueSession = false, bool printOnly = false, bool dangerouslySkipPermissions = false, List<String> mcpServers = const [], bool listen = false, int? listenPort, String? outputFormat}) -
const
Properties
-
allowedTools
→ List<
String> -
Comma-separated list of allowed tool names.
final
- apiKey → String?
-
API key override (prefer env var ANTHROPIC_API_KEY).
final
- command → String?
-
The subcommand, if any (e.g., "mcp", "listen").
final
- continueSession → bool
-
Whether to continue the most recent session.
final
- dangerouslySkipPermissions → bool
-
Skip all permission checks (dangerous).
final
-
flags
→ Map<
String, String> -
Raw flag values keyed by long name.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- jsonOutput → bool
-
Emit output as JSON instead of human-readable text.
final
- listen → bool
-
Run in listen mode (accept connections).
final
- listenPort → int?
-
Port for listen mode.
final
- maxTokens → int?
-
Maximum response tokens.
final
-
mcpServers
→ List<
String> -
MCP server configurations to connect to.
final
- model → String?
-
Model identifier override.
final
-
options
→ Map<
String, String> -
Named options keyed by long name.
final
- outputFormat → String?
-
Output format.
final
- permissionMode → PermissionMode?
-
Permission mode override.
final
-
positionalArgs
→ List<
String> -
Positional arguments (the prompt text, file paths, etc.).
final
- printOnly → bool
-
Print the system prompt and exit (debug).
final
- quiet → bool
-
Suppress non-essential output.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sessionId → String?
-
Session identifier for resume.
final
- systemPrompt → String?
-
System prompt override or path to file.
final
- verbose → bool
-
Enable verbose logging output.
final
- workDir → String?
-
Working directory override.
final
Methods
-
merge(
CliConfig other) → CliConfig -
Merge with another config, preferring non-null values from
other. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited