feat(install): add Qwen Code runtime support (#2019) (#2077)

Adds Qwen Code as a supported installation target. Users can now run
`npx get-shit-done-cc --qwen` to install all 68+ GSD commands as skills
to `~/.qwen/skills/gsd-*/SKILL.md`, following the same open standard as
Claude Code 2.1.88+.

Changes:
- `bin/install.js`: --qwen flag, getDirName/getGlobalDir/getConfigDirFromHome
  support, QWEN_CONFIG_DIR env var, install/uninstall pipelines, interactive
  picker option 12 (Trae→13, Windsurf→14, All→15), .qwen path replacements in
  copyCommandsAsClaudeSkills and copyWithPathReplacement, legacy commands/gsd
  cleanup, fix processAttribution hardcoded 'claude' → runtime-aware
- `README.md`: Qwen Code in tagline, runtime list, verification commands,
  skills format NOTE, install/uninstall examples, flag reference, env vars
- `tests/qwen-install.test.cjs`: 13 tests covering directory mapping, env var
  precedence, install/uninstall lifecycle, artifact preservation
- `tests/qwen-skills-migration.test.cjs`: 11 tests covering frontmatter
  conversion, path replacement, stale skill cleanup, SKILL.md format validation
- `tests/multi-runtime-select.test.cjs`: Updated for new option numbering

Closes #2019

Co-authored-by: Muhammad <basirovmb1988@gmail.com>
Co-authored-by: Jonathan Lima <eezyjb@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Tom Boucher
2026-04-10 21:55:44 -04:00
committed by GitHub
parent 5c0e801322
commit 7a674c81b7
5 changed files with 589 additions and 35 deletions

View File

@@ -29,10 +29,11 @@ const runtimeMap = {
'9': 'gemini',
'10': 'kilo',
'11': 'opencode',
'12': 'trae',
'13': 'windsurf'
'12': 'qwen',
'13': 'trae',
'14': 'windsurf'
};
const allRuntimes = ['claude', 'antigravity', 'augment', 'cline', 'codebuddy', 'codex', 'copilot', 'cursor', 'gemini', 'kilo', 'opencode', 'trae', 'windsurf'];
const allRuntimes = ['claude', 'antigravity', 'augment', 'cline', 'codebuddy', 'codex', 'copilot', 'cursor', 'gemini', 'kilo', 'opencode', 'qwen', 'trae', 'windsurf'];
/**
* Simulate the parsing logic from promptRuntime without requiring readline.
@@ -41,7 +42,7 @@ const allRuntimes = ['claude', 'antigravity', 'augment', 'cline', 'codebuddy', '
function parseRuntimeInput(input) {
input = input.trim() || '1';
if (input === '14') {
if (input === '15') {
return allRuntimes;
}
@@ -89,16 +90,20 @@ describe('multi-runtime selection parsing', () => {
assert.deepStrictEqual(parseRuntimeInput('11'), ['opencode']);
});
test('single choice for qwen', () => {
assert.deepStrictEqual(parseRuntimeInput('12'), ['qwen']);
});
test('single choice for trae', () => {
assert.deepStrictEqual(parseRuntimeInput('12'), ['trae']);
assert.deepStrictEqual(parseRuntimeInput('13'), ['trae']);
});
test('single choice for windsurf', () => {
assert.deepStrictEqual(parseRuntimeInput('13'), ['windsurf']);
assert.deepStrictEqual(parseRuntimeInput('14'), ['windsurf']);
});
test('choice 14 returns all runtimes', () => {
assert.deepStrictEqual(parseRuntimeInput('14'), allRuntimes);
test('choice 15 returns all runtimes', () => {
assert.deepStrictEqual(parseRuntimeInput('15'), allRuntimes);
});
test('empty input defaults to claude', () => {
@@ -107,13 +112,13 @@ describe('multi-runtime selection parsing', () => {
});
test('invalid choices are ignored, falls back to claude if all invalid', () => {
assert.deepStrictEqual(parseRuntimeInput('15'), ['claude']);
assert.deepStrictEqual(parseRuntimeInput('16'), ['claude']);
assert.deepStrictEqual(parseRuntimeInput('0'), ['claude']);
assert.deepStrictEqual(parseRuntimeInput('abc'), ['claude']);
});
test('invalid choices mixed with valid are filtered out', () => {
assert.deepStrictEqual(parseRuntimeInput('1,15,7'), ['claude', 'copilot']);
assert.deepStrictEqual(parseRuntimeInput('1,16,7'), ['claude', 'copilot']);
assert.deepStrictEqual(parseRuntimeInput('abc 3 xyz'), ['augment']);
});
@@ -129,7 +134,7 @@ describe('multi-runtime selection parsing', () => {
});
describe('install.js source contains multi-select support', () => {
test('runtimeMap is defined with all 13 runtimes', () => {
test('runtimeMap is defined with all 14 runtimes', () => {
for (const [key, name] of Object.entries(runtimeMap)) {
assert.ok(
installSrc.includes(`'${key}': '${name}'`),
@@ -146,21 +151,25 @@ describe('install.js source contains multi-select support', () => {
}
});
test('all shortcut uses option 14', () => {
test('all shortcut uses option 15', () => {
assert.ok(
installSrc.includes("if (input === '14')"),
'all shortcut uses option 14'
installSrc.includes("if (input === '15')"),
'all shortcut uses option 15'
);
});
test('prompt lists Trae as option 12 and All as option 14', () => {
test('prompt lists Qwen Code as option 12, Trae as option 13 and All as option 15', () => {
assert.ok(
installSrc.includes('12${reset}) Trae'),
'prompt lists Trae as option 12'
installSrc.includes('12${reset}) Qwen Code'),
'prompt lists Qwen Code as option 12'
);
assert.ok(
installSrc.includes('14${reset}) All'),
'prompt lists All as option 14'
installSrc.includes('13${reset}) Trae'),
'prompt lists Trae as option 13'
);
assert.ok(
installSrc.includes('15${reset}) All'),
'prompt lists All as option 15'
);
});