Skip to content
| Marketplace
Sign in
Visual Studio Code>Machine Learning>CLI CodeNew to Visual Studio Code? Get it now.
CLI Code

CLI Code

x302502

|
134 installs
| (2) | Free
Launch and switch between AI coding CLIs (Claude, Codex, Antigravity, opencode, Cline, and more) from a VS Code terminal.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

CLI Code

English · Tiếng Việt · 中文 · 日本語

Open your favourite AI coding assistant in a terminal next to your code — and send the file you're looking at straight into it, with one shortcut.

Multiple AI CLIs running side by side in VS Code

What it does

Many AI coding tools run in the terminal: Claude Code, Codex, Antigravity, opencode, and more. If you use more than one, switching between them is a chore.

CLI Code puts all of them one shortcut away:

  • Press a key → pick an assistant → it opens in a terminal beside your editor.
  • Each assistant opens with its own icon on the terminal tab (icons sourced from Orca).
  • Press another key → the file you're viewing (and the lines you selected) is dropped into the assistant's prompt. No copy-paste.

Getting started

1. Install

Open the Extensions view in VS Code (Cmd/Ctrl + Shift + X), search for CLI Code, and click Install.

CLI Code in the VS Code Marketplace

2. Install the assistants you want

CLI Code launches the assistants — it doesn't install them. Make sure the ones you want are installed and runnable from your terminal. Out of the box it knows about:

Assistant Terminal command
Claude Code claude
Claude Agent Teams claude
Codex CLI codex
Grok grok
GitHub Copilot CLI copilot
opencode opencode
MiMo Code mimo
Pi pi
OMP omp
Antigravity agy
Amp amp
Kilocode kilo
Cline cline
Command Code command-code
Droid droid
OpenClaude openclaude
Ante ante
Trae traecli
Prime Agent prime-agent
Aider aider
Goose goose
Kiro kiro-cli
Charm / Crush crush
Auggie auggie
Autohand Code autohand
Codebuff codebuff
Continue cn
Cursor cursor-agent
Kimi kimi
Mistral Vibe vibe
Qwen Code qwen
Rovo Dev rovo
Hermes hermes
Devin devin
OpenClaw openclaw

⚠️ Install and sign in first. Most assistants need to be authenticated before they'll run — claude (log in to your Anthropic account), codex (OpenAI login / API key), and so on. Run each tool once in a normal terminal, complete its login flow, and confirm it starts.

💡 Tip: if a command works when you type it in a normal terminal, it'll work here.

🚨 Assistants launch with approval prompts disabled

Each CLI is started with its own bypass flag (claude --dangerously-skip-permissions, codex --dangerously-bypass-approvals-and-sandbox, and so on), so the agent runs commands and edits files without asking you first. That's fast, but it means a repository you don't trust can steer the agent into destructive or data-leaking actions. Only use CLI Code on code you trust, or launch the assistants yourself from a plain terminal instead.

How to use it

Open an assistant

Press Cmd + Esc (macOS) or Ctrl + Esc (Windows / Linux).

A menu pops up listing every assistant. Pick one — it opens in a terminal to the side and starts running. If that assistant is already open, the shortcut just jumps back to it.

The CLI picker listing all assistants

Want a fresh session instead of reusing the open one? Use Cmd/Ctrl + Shift + Esc.

You can also open it from the editor toolbar — look for the CLI Code icon (circled):

CLI Code icon on the editor toolbar

Send the file you're working on

  1. Click into a file (optionally select a few lines).
  2. Click the assistant's terminal to focus it.
  3. Press Cmd + Alt + K (macOS) or Ctrl + Alt + K (Windows / Linux).

CLI Code drops a reference to your file into the prompt:

You did this It inserts
Just opened a file @src/app.ts
Selected one line @src/app.ts#L10
Selected several lines @src/app.ts#L10-20

Now just type your question — the assistant already knows which file (and lines) you mean.

Keyboard shortcuts

Action macOS Windows / Linux
Open / focus an assistant Cmd + Esc Ctrl + Esc
Open an assistant in a new terminal Cmd + Shift + Esc Ctrl + Shift + Esc
Send the current file to it Cmd + Alt + K Ctrl + Alt + K

All three are also in the Command Palette (Cmd/Ctrl + Shift + P) as Open CLI, Open CLI in new tab, and CLI: Insert At-Mentioned.

FAQ

The menu opens but the terminal says "command not found". The assistant isn't installed or isn't on your PATH. Open a normal terminal and check that the command (e.g. claude) runs. If it doesn't, install that tool first.

The assistant opens but asks me to log in. That's expected — CLI Code only launches the tool, it doesn't handle authentication. Complete the assistant's own login flow once (in any terminal); it will remember you afterwards.

Nothing happens when I press Cmd + Alt + K. Make sure (1) a file is open in the editor, and (2) the assistant's terminal is focused. The file reference goes into whichever CLI terminal is active.

The shortcut conflicts with something else. Rebind it in VS Code: Preferences → Keyboard Shortcuts, search for "CLI", and set your own keys.

License

MIT © 2026 Thanh Luan

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft