IDE Integration with Command Code

Command Code reads the file you're editing and your current selection from your IDE when connected to the IDE extension, so you can say "fix this" or "explain the selected code" without pasting file paths or line numbers.


There are three ways to connect your IDE with Command Code:

Launch Command Code from your IDE's integrated terminal:

cmd

The extension installs automatically on first run. Find the extension in your IDE's marketplace to verify installation or manage it manually.

2. Using /ide command

Inside a Command Code session, run the following slash command:

/ide

This checks the connection status, installs the extension if needed, and shows diagnostic information.

3. Using --ide-setup flag

A non-interactive way to trigger the IDE extension installation:

cmd --ide-setup

Useful for scripting or when you want to install the extension without starting a full session.


Three pieces of visual feedback confirm the integration is live, one per stage of a typical session:

1. Connection flash

When Command Code connects or loses the IDE, a short indicator flashes at the bottom of the input and auto-hides after 5 seconds:

  • Connected --- IDE ✓ (green)
  • Disconnected --- run /ide (yellow). Run /ide to reconnect.

2. Current file indicator

While connected Command Code can see the file opened in your editor, the bottom left of the input box shows:

In auth.ts

When you select lines in the IDE from a file, it switches to a selection count:

15 lines selected

3. Selection confirmation

When you send a prompt with lines selected from a file, a dim hint appears below your message so you can verify exactly what was shared as context:

> refactor this to use async/await Selected 23 lines from auth.ts in Visual Studio Code

We support the following editors for Command Code IDE integration.

  • Visual Studio Code
  • Cursor
  • Windsurf

If yours isn't listed, let us know!