Skip to main content

Command Line Options

Command line options change how IaC Code starts. Use them before entering the interactive REPL, or combine them with --prompt for one-shot automation.

OptionPurpose
-h, --helpShow CLI help and exit. Use this to inspect the options supported by your installed version.
-v, -V, --versionPrint the installed IaC Code version and exit.
-m <model>, --model <model>Start with a specific LLM model. This overrides the saved model for the current run.
-p <prompt>, --prompt <prompt>Run a single prompt and exit. This enables non-interactive mode. Use --prompt - to read the prompt from standard input.
--output-format <format>Set output format for non-interactive mode. Supported values are text, json, and stream-json. The default is text.
--max-turns <number>Limit the maximum number of agent turns in non-interactive mode. The default is 100.
-d, --debugEnable debug logging for the current run. In interactive mode, use /debug to inspect or change debug logging after startup.
-r <session-id-or-name>, --resume <session-id-or-name>Resume a previous session by exact session ID, unique ID prefix, or unique session name. Cross-project resolved sessions print a cd ... && iac-code --resume <id> command instead of hot-swapping the current project.
-c, --continueResume the most recent session. This cannot be used together with --resume.
--allowed-tools <patterns>Comma-separated tool permission patterns to allow, e.g. 'bash(git *),write_file'.
--disallowed-tools <patterns>Comma-separated tool permission patterns to deny, e.g. 'bash(rm *)'.
--permission-mode <mode>Permission mode: default, accept_edits, bypass_permissions, dont_ask.

Permission Modes

The --permission-mode flag controls how the agent handles tool permission checks:

ModeBehavior
defaultThe agent prompts for confirmation when a tool action requires approval.
accept_editsAuto-approve file system commands that are considered edits (e.g. mkdir, cp). Other actions still prompt.
bypass_permissionsAuto-approve all tool actions except safety checks. Intended for trusted automation.
dont_askSilently deny any action that would normally prompt. Useful for strict read-only runs.

Common Startup Commands

Start the interactive REPL with the saved model:

iac-code

Start with a specific model for this run:

iac-code --model qwen3.6-plus

Run a one-shot prompt:

iac-code --prompt "Create an OSS Bucket"

Read the prompt from standard input:

echo "Create a VPC and two ECS instances" | iac-code --prompt -

Resume the latest session:

iac-code --continue

Allow only git and read-only bash commands:

iac-code --allowed-tools 'bash(git *)'

Run in automation with no interactive prompts:

iac-code --prompt "Create a VPC" --permission-mode bypass_permissions