Skip to content

Commit f36aeac

Browse files
GotaGota
authored andcommitted
fix(cc-sdd): install commands on Linux by reusing mac templates (Fixes #44)
- Update manifests to include linux for commands_os_mac\n- Add Linux runtime tests for claude-code and gemini-cli\n- Update README (root + tool) and localized READMEs to note Linux support\n- Document platform behavior and examples
1 parent 9bcbbde commit f36aeac

File tree

11 files changed

+151
-12
lines changed

11 files changed

+151
-12
lines changed

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Publish Package
33
on:
44
push:
55
tags:
6-
- 'cc-sdd-v*'
6+
- 'v*.*.*' # Trigger on version tags like v1.0.0
77

88
permissions:
99
id-token: write # Required for OIDC

.gitignore

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,10 @@ coverage/
7171
# Project specific
7272
BLOG.md
7373
docs/cc-sdd/
74+
docs/kiro/prompt/
7475

75-
# Claude Code
76+
# Agent configurations
7677
.claude/agents/
7778
.claude/hooks/
78-
79-
docs/kiro/prompt/
79+
GEMINI.md
80+
AGENTS.md

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ One command installs **AI-DLC** (AI-Driven Development Life Cycle) with **SDD**
2121
npx cc-sdd@latest
2222

2323
# With language: --lang en (English) or --lang ja (Japanese) or --lang zh-TW (Traditional Chinese)
24-
# With OS: --os mac or --os windows (if auto-detection fails)
24+
# With OS: --os mac | --os windows | --os linux (if auto-detection fails)
2525
npx cc-sdd@latest --lang ja --os mac
2626

2727
# With different agents: gemini-cli
@@ -120,7 +120,7 @@ npx cc-sdd@latest --kiro-dir docs/specs
120120
**AI-DLC Integration** - Complete AI-Driven Development Life Cycle
121121
**Project Memory** - Steering that learns your codebase and patterns
122122
**Spec-Driven Development** - Structured requirements → design → tasks → implementation
123-
**Cross-Platform** - macOS and Windows support with auto-detection
123+
**Cross-Platform** - macOS, Linux, and Windows support with auto-detection (Linux reuses mac templates)
124124
**Multi-Language** - Japanese, English, Traditional Chinese
125125
**Safe Updates** - Interactive prompts with backup options
126126

tools/cc-sdd/README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ npx cc-sdd@latest --gemini-cli --lang ja # For Gemini CLI instead
8585

8686
```bash
8787
# Language and platform
88-
npx cc-sdd@latest --lang ja --os mac
88+
npx cc-sdd@latest --lang ja --os mac # macOS
89+
npx cc-sdd@latest --lang ja --os linux # Linux (shares mac templates)
8990

9091
# Safe operations
9192
npx cc-sdd@latest --dry-run --backup
@@ -116,3 +117,7 @@ project/
116117
---
117118

118119
**Beta Release** - Ready to use, actively improving. [Report issues](https://github.com/gotalab/claude-code-spec/issues) | MIT License
120+
121+
### Platform Support
122+
- Supported OS: macOS, Linux, Windows (auto-detected by default).
123+
- Linux uses the same command templates as macOS. Windows has dedicated templates.

tools/cc-sdd/README_ja.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,9 @@ npx cc-sdd@latest --gemini-cli --lang ja # Gemini CLI用
8585

8686
```bash
8787
# 言語とプラットフォーム
88-
npx cc-sdd@latest --lang ja --os mac
88+
npx cc-sdd@latest --lang ja --os mac # macOS
89+
npx cc-sdd@latest --lang ja --os linux # Linux(macテンプレートを共有)
90+
npx cc-sdd@latest --lang ja --os windows # Windows(専用テンプレート)
8991

9092
# 安全な操作
9193
npx cc-sdd@latest --dry-run --backup
@@ -116,3 +118,7 @@ project/
116118
---
117119

118120
**ベータリリース** - 使用可能、改善中。[問題を報告](https://github.com/gotalab/claude-code-spec/issues) | MIT License
121+
122+
### プラットフォーム対応
123+
- 対応OS: macOS / Linux / Windows(通常は自動検出)。
124+
- Linux は macOS と同じコマンドテンプレートを使用します。Windows は専用テンプレートを使用します。

tools/cc-sdd/README_zh-TW.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,9 @@ npx cc-sdd@latest --gemini-cli --lang zh-TW # Gemini CLI 用
8585

8686
```bash
8787
# 語言與平台
88-
npx cc-sdd@latest --lang zh-TW --os mac
88+
npx cc-sdd@latest --lang zh-TW --os mac # macOS
89+
npx cc-sdd@latest --lang zh-TW --os linux # Linux(與 mac 共用模板)
90+
npx cc-sdd@latest --lang zh-TW --os windows # Windows(專用模板)
8991

9092
# 安全操作
9193
npx cc-sdd@latest --dry-run --backup
@@ -116,3 +118,7 @@ project/
116118
---
117119

118120
**Beta 版本** - 可用且持續改進中。[回報問題](https://github.com/gotalab/claude-code-spec/issues) | MIT License
121+
122+
### 平台支援
123+
- 支援 OS:macOS / Linux / Windows(預設自動偵測)。
124+
- Linux 與 macOS 使用相同的指令模板;Windows 使用專用模板。

tools/cc-sdd/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cc-sdd",
3-
"version": "1.0.0-beta.3",
3+
"version": "1.0.0-beta.4",
44
"description": "Transform your coding workflow with AI-DLC and Spec-Driven Development. One command installs 7 powerful slash commands, Project Memory, and structured development workflows for Claude Code.",
55
"keywords": ["claude-code", "spec-driven-development", "kiro", "steering", "ai-development", "tdd", "ai-dlc", "ai-driven-development-life-cycle"],
66
"author": "Gota",

tools/cc-sdd/templates/manifests/claude-code.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"fromDir": "templates/agents/{{AGENT}}/commands/os-mac",
99
"toDir": "{{AGENT_COMMANDS_DIR}}"
1010
},
11-
"when": { "agent": "claude-code", "os": "mac" }
11+
"when": { "agent": "claude-code", "os": ["mac", "linux"] }
1212
},
1313
{
1414
"id": "commands_os_windows",

tools/cc-sdd/templates/manifests/gemini-cli.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"fromDir": "templates/agents/{{AGENT}}/commands/os-mac",
99
"toDir": "{{AGENT_COMMANDS_DIR}}"
1010
},
11-
"when": { "agent": "gemini-cli", "os": "mac" }
11+
"when": { "agent": "gemini-cli", "os": ["mac", "linux"] }
1212
},
1313
{
1414
"id": "commands_os_windows",

tools/cc-sdd/test/realManifestClaudeCode.test.ts

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,35 @@ describe('real claude-code manifest', () => {
6060
expect(ctx.logs.join('\n')).toMatch(/Applied plan:/);
6161
});
6262
});
63+
64+
describe('real claude-code manifest (linux)', () => {
65+
const runtimeLinux = { platform: 'linux' } as const;
66+
67+
it('dry-run prints plan including commands for linux via mac template', async () => {
68+
const ctx = makeIO();
69+
const code = await runCli(['--dry-run', '--lang', 'en', '--manifest', manifestPath], runtimeLinux, ctx.io, {});
70+
expect(code).toBe(0);
71+
const out = ctx.logs.join('\n');
72+
expect(out).toMatch(/Plan \(dry-run\)/);
73+
expect(out).toContain('[templateDir] commands_os_mac: templates/agents/claude-code/commands/os-mac -> .claude/commands/kiro');
74+
expect(out).toContain('[templateFile] doc_main: templates/agents/claude-code/docs/CLAUDE/CLAUDE.en.tpl.md -> ./CLAUDE.md');
75+
});
76+
77+
it('apply writes CLAUDE.md and command files to cwd on linux', async () => {
78+
const cwd = await mkTmp();
79+
const ctx = makeIO();
80+
const code = await runCli(['--lang', 'en', '--manifest', manifestPath, '--overwrite=force'], runtimeLinux, ctx.io, {}, { cwd, templatesRoot: process.cwd() });
81+
expect(code).toBe(0);
82+
83+
const doc = join(cwd, 'CLAUDE.md');
84+
expect(await exists(doc)).toBe(true);
85+
const text = await readFile(doc, 'utf8');
86+
expect(text).toMatch(/Claude Code Spec-Driven Development/);
87+
expect(text).toContain('Steering: `.kiro/steering/`');
88+
89+
const cmd = join(cwd, '.claude/commands/kiro/spec-init.md');
90+
expect(await exists(cmd)).toBe(true);
91+
92+
expect(ctx.logs.join('\n')).toMatch(/Applied plan:/);
93+
});
94+
});

0 commit comments

Comments
 (0)