Basic Usage
Get fluent with CLI flags, how to phrase tasks, how to give the model context, and how to move between several tasks.
Launching
# Launch the TUI in the current directory
atomcode
# Specify a working directory
atomcode -C /path/to/project
# Override provider / model for this run only
atomcode --provider claude --model claude-sonnet-4-6
# Continue the previous session
atomcode -c
atomcode --continue
# Use a specific config file
atomcode --config ./custom.toml
# Skip all permission prompts, auto-approve every tool call
atomcode -y
atomcode --dangerously-skip-permissions
CLI flag reference
| Flag | Short | Purpose |
|---|---|---|
--dir PATH | -C | Working directory; defaults to the current directory |
--continue | -c | Continue the previous session instead of starting a new one |
--provider NAME | — | Override the default provider |
--model NAME | — | Override the current provider's model |
--config PATH | — | Use the given config file |
--prompt TEXT | -p | Non-interactive mode: one-shot execution, reply to stdout |
--prompt-file PATH | — | Read prompt from file (useful for long input; mutually exclusive with -p) |
--verbose | -v | In non-interactive mode, print tool calls and token usage to stderr |
--max-turns N | — | Cap the number of agent loop iterations; prevents runaway loops |
--disable-tools LIST | — | Comma-separated tools to disable, e.g. --disable-tools bash,web_fetch |
--dangerously-skip-permissions | -y | Skip all permission prompts — auto-approve every tool call (bash, file edits, MCP, etc.). A ⚠ BYPASS badge is shown in the TUI status bar while active |
--disable-tools makes disabled tools completely invisible to the model (they don't appear in the schemas), so the model won't keep trying to call them. Useful for sandbox evals, offline environments, and CI without network.
-y / --dangerously-skip-permissions bypasses all permission prompts, including bash execution, file writes, and MCP tool calls. The agent can execute arbitrary actions without confirmation. Only use this flag when:
- Running in CI/CD pipelines or other automated environments
- Executing benchmarks inside a sandbox or container
- Working on non-critical projects where you trust the agent's built-in safety constraints
How to phrase tasks
AtomCode's agent loop is only as good as the task description you provide. A few rules of thumb:
- State goals, not steps — "Fix the 404 after login", not "Open src/auth/callback.ts, delete line 27, then…". The model has plenty of exploration ability.
- Name your constraints — say them out loud: "preserve API compatibility", "don't touch test files", "use TypeScript not JS".
- Provide a verification method — "after the fix, run
npm testto confirm" lets the model close the self-verification loop. - Discuss before editing — when direction is unclear, first ask it to "analyse this module and propose a refactor plan"; once aligned, let it implement.
Example tasks
# Bug fix
> Fix the bug where users are redirected to 404 after OAuth callback; restore the original path after callback.
# New feature
> Add a dark mode toggle to the settings page using Tailwind's dark: prefix, persisted in localStorage.
# Refactor
> Refactor src/db/*.ts to use a connection pool while keeping the public API unchanged; run npm test after.
# Tests
> Write unit tests for src/payment/processor.ts, covering all exception branches.
# Code understanding
> Briefly explain this repo's directory layout, build entry point, and the responsibilities of the core modules.
Multiline input
In the TUI:
Entersends the message.Shift+Enter/Ctrl+Enter/Ctrl+Jinsert a newline (requires Kitty keyboard protocol: kitty / WezTerm / Alacritty / iTerm2 ≥3.5 / Windows Terminal ≥1.21).Alt+Enterinserts a newline (works in most terminals, but Windows Terminal binds it to "toggle fullscreen" by default — unbind in settings).- The input area grows with content.
@ file references
Type @ in the input (preceded by whitespace or line start) to pop up a menu of files and directories in the project. This is the fastest way to point the model at a specific path — you handle locating, the model decides via read_file what to expand and how much to read.
Interaction
- Trigger —
@only triggers when preceded by whitespace or line start. A mid-string@likeemail@host.comwon't pop the menu — avoiding accidental triggers. - Filtering — type to substring-match (case-insensitive).
@crahitscrates/;@tomlhits every*.toml. - Drill in — type
/to enter a directory; the menu scopes to that directory.@crates/→@crates/atomcode-cli/→ … - Navigation —
↑/↓move;EnterorTabselect;Esccloses without inserting. - Insertion form — on select, the
@xxxin the input is replaced with the@full/relative/path(directories get a trailing/) plus a trailing space; the cursor sits after the space, ready for more typing. - Backspace to keep picking — delete the trailing space and the menu re-opens in place, handy for drilling further from the current directory.
Where candidates come from
- All files and directories under the project root — both files and dirs can be selected; dirs are marked with a trailing
/. - Honours
.gitignore(and global ignore,.git/info/exclude); ignored paths never appear. .git/internals are excluded — almost nobody wants to@-reference git metadata.- Dotfiles stay —
.env,.atomcode.md, and other dot-prefixed files are matchable (provided gitignore doesn't suppress them). - Cross-level fuzzy matching — once you start typing a filter, matches reach across directory levels (not just the current scope's direct children). With an empty filter only the current scope's direct children are shown.
- Ordering: direct children of the current scope first → directories before files → alphabetical.
What it means for the model
On submit, @crates/atomcode-cli/src/main.rs is sent to the model as literal text — AtomCode does not read and inline the file content in the frontend. The model sees the path and decides to call the built-in read_file tool as needed. Benefits:
- Large files don't get blindly stuffed into context — the token budget stays predictable.
- When you reference a directory, the model can
listfirst and then read selectively. - Re-referencing the same path doesn't inline the content twice.
If you want to force a file's contents into the conversation directly (e.g. a tight code review where you don't want another read_file round trip), use paste — drop the content into the input. Bracketed paste collapses it to an [paste #N] placeholder and ships the full payload on submit.
Limits
- The candidate menu shows at most 30 entries; typing more filter characters narrows the results.
- Paths with spaces don't appear in candidates — the
@reference uses whitespace as a terminator. - The file index is built once per session; files created during the session don't appear until you switch sessions or restart.
- Symlinks are not followed.
- No size or type filtering — every non-ignored file shows up.
Pasting long text
AtomCode supports bracketed paste. When you paste a chunky block (e.g. a wall of logs), the TUI collapses it to a compact [paste #N · 132 lines] indicator so the input doesn't blow up. The full payload is sent on submit.
Image attachments / screenshots
Beyond text, you can also drop images into the conversation — error screenshots, UI mocks, whiteboard photos. AtomCode offers three entry points:
- Ctrl+V — when the system clipboard holds an image (you just
Cmd+Shift+4-captured something, copied an image from a browser, etc.), Ctrl+V attaches it directly. This is the fallback for macOS + iTerm2 where Cmd+V doesn't forward the image to the PTY, and works in any terminal. - Cmd+V (macOS / iTerm2, with one-time setup) — iTerm2 → Settings → Profiles → Keys → Key Mappings, map
⌘VtoSend Hex Codes: 0x16; from then on Cmd+V == Ctrl+V. - Finder drag / iTerm2 path drop — drag an image onto the terminal window; iTerm2 / WezTerm and friends paste the file path as plaintext. AtomCode recognises an absolute path +
.png/.jpg/.jpeg/.gif/.webpextension + existing file + size ≤ 20MB, and attaches it automatically. The raw path string is removed from the input.
On a successful attach, an [Image #N] marker is inserted in the input; the bytes ride along with the message on submit. The status bar also shows Image in clipboard · ctrl+v to paste when an unpasted image is sitting in the clipboard.
How non-vision models handle images
When the active provider can't take image input (text-only models like DeepSeek-V3 / Kimi), AtomCode doesn't refuse — it routes the image to a separate VL preprocessor (a vision model like Qwen3-VL / GLM-4V) for OCR + description, then splices the result into the user message as text before sending to the main model. So you can "drop a screenshot and ask" regardless of the main model.
- Which model does the preprocessor use? Controlled by
vision_preprocessor_providerin the config — see Configuration · Vision preprocessor. - The
/loginflow auto-picks a VL/OCR model from the granted list and sets the field for you. - VL calls use an idle timeout: as long as the stream keeps producing chunks there's no total cap; it only times out after 30 seconds of silence. On failure you get a VL preprocess failed warning — image recognition fails but the message still goes through.
If the current model supports vision (Claude 3+ / GPT-4o / Gemini / Qwen-VL, etc.), the raw image bytes are sent directly — the preprocessor is skipped.
Switching sessions and directories
/resume— switch between or restore previous sessions/session— start a clean session/cdor just typecd /path— switch working directory (status bar updates live)/clear— clear messages in the current session/compact— compact history to free up context budget
Full behaviour at Sessions & Undo.
Inspecting cost and diff
/cost— token output for this session plus context usage (estimated when the API doesn't report usage)/diff— git diff of uncommitted changes in the working directory/undo— roll back every file edit from the last turn
Next steps
- Slash Commands — full reference for the 30+ commands
- Keybindings — fluency at the keyboard pays off quickly