Skip to content

Commit d92cfbc

Browse files
committed
Add 'env' agent field; stop Claude Code's IDE extension auto-install
Launch Claude Code with its official CLAUDE_CODE_IDE_SKIP_AUTO_INSTALL=1 environment variable so it no longer auto-installs its companion IDE extension, consistent with Super CLI's one-extension-for-every-CLI philosophy. Add a generic optional 'env' agent field that sets environment variables on the agent terminal.
1 parent ff729a4 commit d92cfbc

7 files changed

Lines changed: 35 additions & 7 deletions

File tree

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@
33
All notable changes to this project are documented here. The format is based on
44
[Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
55

6+
## [0.4.1]
7+
8+
- Claude Code no longer auto-installs its companion IDE extension when launched from Super CLI. The
9+
launcher sets Claude Code's official `CLAUDE_CODE_IDE_SKIP_AUTO_INSTALL` environment variable on the
10+
agent's terminal — in keeping with Super CLI's "one extension for every CLI" philosophy.
11+
- New optional agent field `env` to set environment variables for an agent's terminal.
12+
613
## [0.4.0]
714

815
- Added **Cursor CLI** (`cursor-agent`), **Droid CLI** (`droid`), **Crush** (`crush`), **Hermes**

README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ reuses a built-in `id` — overrides that built-in (for example to point at a cu
8484
only when missing, existing keys untouched). For example, opt out of a CLI's companion
8585
editor-extension auto-install via its own config: `{ "file": "~/.commandcode/config.json",
8686
"defaults": { "autoInstallExtension": false } }`.
87+
- `env` — optional environment variables set for the agent's terminal, e.g. to opt out of a CLI's
88+
IDE-extension auto-install via its own variable: `{ "CLAUDE_CODE_IDE_SKIP_AUTO_INSTALL": "1" }`.
8789

8890
Only the user (global) value of `superCli.agents` is used; workspace overrides are ignored so that
8991
an untrusted repository cannot inject commands.
@@ -108,10 +110,12 @@ settings.
108110
directory.
109111
- **Nothing happens on launch.** Make sure the workspace is trusted — the launcher is disabled in
110112
untrusted workspaces because it runs terminal commands.
111-
- **Command Code's companion extension.** Super CLI keeps your editor free of per-CLI companion
112-
extensions: when you launch Command Code it sets `autoInstallExtension: false` in
113-
`~/.commandcode/config.json` (Command Code's own official opt-out), so it stops auto-installing its
114-
editor extension. To keep that extension, set the value back to `true` there.
113+
- **Companion editor extensions (Command Code, Claude Code).** Super CLI keeps your editor free of
114+
per-CLI companion extensions. It launches **Command Code** with `autoInstallExtension: false` in
115+
`~/.commandcode/config.json`, and **Claude Code** with the `CLAUDE_CODE_IDE_SKIP_AUTO_INSTALL=1`
116+
environment variable — both official opt-outs — so they stop auto-installing their editor
117+
extensions. Install those extensions yourself if you want them (for Command Code set the value back
118+
to `true`).
115119

116120
## Support
117121

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"displayName": "Super CLI",
44
"description": "One VS Code extension to launch any coding agent CLI (Claude Code, Codex, Copilot, Antigravity, and your own) from a single side terminal.",
55
"publisher": "mikesoft",
6-
"version": "0.4.0",
6+
"version": "0.4.1",
77
"repository": {
88
"type": "git",
99
"url": "https://github.com/TheStreamCode/super-cli.git"
@@ -223,6 +223,13 @@
223223
"description": "Keys to ensure are present in the file. Existing keys are never overwritten."
224224
}
225225
}
226+
},
227+
"env": {
228+
"type": "object",
229+
"description": "Optional environment variables to set for the agent's terminal. Useful to opt out of a CLI's IDE-extension auto-install via its own environment variable.",
230+
"additionalProperties": {
231+
"type": "string"
232+
}
226233
}
227234
}
228235
}

src/agents.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export interface Agent {
1616
installCommand?: InstallCommand;
1717
autoInstall?: boolean;
1818
ensureConfig?: EnsureConfig;
19+
env?: Record<string, string>;
1920
}
2021

2122
/** Built-in agent presets shipped with the extension. Users override them by reusing an id. */
@@ -27,6 +28,9 @@ export const BUILTIN_AGENTS: readonly Agent[] = [
2728
icon: 'sparkle',
2829
installCommand: 'npm install -g @anthropic-ai/claude-code',
2930
autoInstall: true,
31+
// Super CLI is one extension for every CLI, so skip Claude Code's IDE extension
32+
// auto-install using its own official environment variable.
33+
env: { CLAUDE_CODE_IDE_SKIP_AUTO_INSTALL: '1' },
3034
},
3135
{
3236
id: 'codex',

src/terminal.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,7 @@ export async function launchAgent(agent: Agent, context: vscode.ExtensionContext
229229
name: buildTerminalName(agent.label, sequence, agent.label),
230230
location: location === 'panel' ? vscode.TerminalLocation.Panel : { viewColumn: vscode.ViewColumn.Beside },
231231
cwd,
232+
env: agent.env,
232233
});
233234
terminal.show();
234235
watchForMissingAgent(terminal, agent, context);

test/agents.test.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,11 @@ test('OpenCode ships as a built-in preset', () => {
5353
assert.equal(opencode.installCommand, 'npm install -g opencode-ai');
5454
});
5555

56+
test('Claude Code skips its IDE extension auto-install via env', () => {
57+
const claude = BUILTIN_AGENTS.find((a) => a.id === 'claude');
58+
assert.equal(claude.env.CLAUDE_CODE_IDE_SKIP_AUTO_INSTALL, '1');
59+
});
60+
5661
test('Command Code opts out of its companion editor-extension auto-install', () => {
5762
const cc = BUILTIN_AGENTS.find((a) => a.id === 'command-code');
5863
assert.ok(cc);

0 commit comments

Comments
 (0)