Skip to content
LoopCodeDocs

Use LoopCode

Terminal (CLI)

Use LoopCode in your terminal — start and resume conversations, write prompts with files, images and shell commands, change modes, run work in the background, and keep sessions.

Start

bash
cd your-project
loopcode                                  # a new conversation here
loopcode "explain the checkout flow"      # start with a request already sent
loopcode -c                               # continue the most recent conversation here
loopcode -r 3f2a                          # continue a particular one (an id prefix)
loopcode sessions                         # list this folder's conversations

LoopCode works in the folder you start it in. -C <dir> starts it somewhere else, and /cd <dir> moves a running session to another folder (with a fresh conversation there). For a one-shot run without the screen, see Headless mode and CI. Every command and flag is in the CLI reference.

Write a prompt

TypeTo
/Open the command list — see Slash commands
@Mention a file. Fuzzy: @mcpcmd finds mcp-command.ts
! at the startRun a shell command yourself; its output goes into the conversation
# at the startRemember something in future conversations: # use pnpm, not npm
ctrl vPaste an image from the clipboard
/attachAttach a file (PDF, Word, Excel, code) or an image
ctrl gWrite the prompt in your editor ($EDITOR)
shift enterA new line (ctrl j in terminals that cannot tell shift enter apart)
↑ / ↓Earlier prompts
ctrl rSearch earlier prompts
?Show the keyboard shortcuts

While LoopCode works

KeyDoes
escStop the turn. Work already done is kept
Type and enterSteer the current turn
tabQueue a follow-up for when the turn finishes
ctrl bMove a long command or subagent to the background and carry on
ctrl tOpen the full transcript, with complete command output (f3 finds text in it)
ctrl oCopy the last response
ctrl cInterrupt; press again to quit

Press esc twice with an empty composer to edit your previous message and send it again.

Modes

shift tab cycles the approval mode, shown in the footer:

ModeWhat happens
Auto-review (default)Routine work goes ahead; a reviewer model checks risky commands and asks you only when it should
Auto-approve editsFile edits go through; commands still ask
Ask before changesEvery edit and command waits for you
Plan modeRead-only: LoopCode proposes a plan for you to approve

Start in a mode with --mode auto|acceptEdits|default|plan. See Permissions and safety.

Model and effort

/model picks the model; /effort sets how hard it works, and alt , / alt . step effort down and up. /thinking shows or hides the model's reasoning. See Models and effort.

Conversations

CommandDoes
/newStart a new conversation
/resumePick an earlier conversation
/renameRename this one
/forkContinue in a copy, to try another way; the original stays
/rewindUndo the file changes of recent turns
/compact [what to keep]Summarise the conversation to free context
/btw <question>Ask on the side; the answer is not added to the conversation
/recapRecap the conversation so far, without adding to it
/copy, /exportCopy the last response; export the conversation as Markdown
/archive, /deleteArchive this conversation and start a new one; delete it for good
/clearClear the screen and start a new conversation

Conversations are saved as you go, per folder. loopcode -c picks up the latest; loopcode sessions lists them.

Background work

Long-running commands — dev servers, watchers, builds — and subagents can run in the background while the conversation continues. /tasks lists them, shows their output, and stops them; /stop stops them all. See Subagents and background tasks.

Worktrees

bash
loopcode -w                 # a new worktree with a generated name
loopcode -w payments-fix    # a named one

LoopCode creates a git worktree on its own branch and works there, so your main checkout is untouched. When you leave, it asks whether to keep, merge or remove the worktree. See Parallel work in worktrees.

The screen

The footer shows the mode, the model, the context meter and hints for the keys that apply right now. /status shows the session's configuration and token usage, /context what fills the context window, and /usage your plan's usage. ctrl l clears the screen; ctrl z suspends LoopCode to your shell.

Environment variableEffect
LOOPCODE_NO_ANIMATION=1No animated banner
LOOPCODE_TUI_DISABLE_KEYBOARD_ENHANCEMENT=1Don't use the enhanced keyboard protocol (if keys misbehave in your terminal)

Account and updates

bash
loopcode login        # sign in
loopcode usage        # plan and usage
loopcode upgrade pro  # buy or renew Pro (or max)
loopcode update       # update now
loopcode doctor       # check the install and say what to fix
loopcode feedback "the /pr flow should …"

loopcode telegram connects a Telegram bot, so you can send this computer tasks from your phone. See LoopCode on Telegram.