The Magic Coder CLI is the coder binary. It’s flag-driven; environment variables are not used for argument values.
Flag Default Meaning --cwd <PATH>the current shell directory (.) Primary working directory. Resolves to the nearest Git/worktree root automatically. -w, --workdir <PATH>none Additional directory allowed for file operations. Can be repeated, or comma-delimited.
# Open the TUI in the current repo
coder --cwd ~/code/service -w ~/code/protos
coder --cwd ~/code/service \
coder --cwd ~/code/service -w ~/code/protos,~/code/shared
Flag Default Meaning --server-url <HOST_OR_URL>bridgeapp.dev (until the prod default flips)BridgeApp deployment base host or https:// URL. WS, OIDC, and API URLs are derived from it. Bare hosts and https:// URLs both work; ws:///wss:// URLs are rejected. --oidc-client-id <ID>built-in default OIDC client ID. Override only if BridgeApp’s admin team told you to. --no-open-browseroff Print the OIDC login URL instead of opening a browser.
The default deployment host may not match your environment. Pass --server-url once if your team uses a non-default deployment.
coder --server-url bridgeapp.dev
coder --no-open-browser # for SSH / headless boxes
Flag Default Meaning --trustoff Trust the current workspace. Persists in ~/.magic/known.toml. Required for --automagic if not already trusted.
You can launch with a startup target to skip the empty-input state. At least one of these (--continue and/or --query) is required to use --automagic. They can also be combined: --continue <uuid> --query "..." resumes a thread and immediately sends a follow-up.
Flag Meaning -c, --continue <UUID>Resume an existing thread. -q, --query <TEXT>Send a user message immediately after startup.
coder --query " fix the failing migration "
coder --continue 8a3f2b1e-4d6c-4e9f-9b2a-c12345678abc
# Resume and immediately ask a follow-up
coder --continue 8a3f2b1e-... --query " now also update the docs "
Flag Default Meaning -p, --planoff Start the session in plan mode. -a, --automagicoff Auto-approve everything; exit when the agent finishes. Requires a startup target and a trusted workspace. --allow-long-contextoff Allow long-context mode in the current session.
coder --plan --automagic --trust --query " migrate the importer "
coder --allow-long-context
Flag Default Meaning --model <MODEL>from user config or BridgeApp default Pick a model for this session. --reasoning-effort <EFFORT>from user config or provider default One of none, minimal, low, medium, high, xhigh. (max is also accepted.)
coder --reasoning-effort high
coder --model claude-opus-4.7 --reasoning-effort xhigh
0 — Magic Coder exited cleanly. For automagic runs, the agent finished its task.
non-zero — a fatal error occurred, the run was interrupted, or input arguments were invalid.
# Send a prompt and watch
# Plan first, you stay in the loop
coder --plan --query " ... "
coder --trust --automagic --query " ... "
# Resume on a different machine
# Push a follow-up to a known thread, hands-off
coder --continue <uuid> --trust --automagic --query " ... "
These exist but are not for everyday use:
Flag What it’s for --oauth-credentials-file <PATH>Load a JSON-serialized OAuth credential file from disk instead of using the saved credential store. Useful for CI and other headless setups.
These are not configurable through CLI arguments — change them via slash commands or ~/.magic/config.toml:
Theme (/theme or [ui] theme in config.toml)
Sleep mode ([generation] sleep_mode in config.toml)
Long-context as a default ([generation] allow_long_context in config.toml)
Command permissions — managed through the approval prompt (see Command permissions )
Magic Coder also does not read CODER_* environment variables for argument values. The flag interface is the only argument interface.