Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,9 @@

/dist/
.env
# Added by code-review-graph
.code-review-graph/

# Override global ignore for template addon files
!plugins/*/template/addons/claude-code/.claude/
!plugins/*/template/addons/claude-code/.claude/**
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [1.0.7] - 2026-04-23

### Added
- **Claude Code addon** (`--claude-code`) — injects `CLAUDE.md` (project context with stack, commands, architecture) and `.claude/skills/` with pre-configured skills into generated projects: `backend-patterns`, `api-design`, `database-migrations`, `docker-patterns`, `security-review`, `tdd-workflow`, `deployment-patterns` (Node.js); `python-patterns`, `python-testing`, `backend-patterns`, `postgres-patterns`, `database-migrations`, `docker-patterns`, `security-review` (Python)
- **Cursor addon** (`--cursor`) — injects `.cursor/skills/` with the same skill set (same content, `skill.md` format) for Cursor Agent
- **AI agent multi-select prompt** — when neither `--claude-code` nor `--cursor` is passed, interactive mode shows a multiselect: `Claude Code` and `Cursor` can be selected independently or together
- Both addons work with `archgen add claude-code` and `archgen add cursor` on existing projects

### Fixed
- Integration snapshot tests: `mockFs.exists` now returns `true` for template/addon paths so addon conditions are correctly evaluated in test environment

## [1.0.6] - 2026-04-10

### Fixed
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ Answer a few prompts. Your project is ready in under a second.
- Optional WebSocket support with Socket.io + JWT auth
- Optional OAuth2 (Google + GitHub) via `@fastify/oauth2`
- Optional API documentation via Scalar + Swagger UI
- Optional Claude Code setup — `CLAUDE.md` + pre-configured skills for Claude Code agent
- Optional Cursor setup — `.cursor/skills/` with pre-configured skills for Cursor agent
- Auto update notifier — hints when a new version is available
- Interactive CLI prompts — no flags required
- Post-scaffold addon injection with `archgen add`
Expand Down Expand Up @@ -58,6 +60,9 @@ archgen create my-api --language node --docker --testing --ci
archgen create my-api --language node --all # enable all addons at once
archgen create my-service --language python --author "John Doe"
archgen create my-app --database postgresql
archgen create my-app --claude-code # add Claude Code setup (CLAUDE.md + skills)
archgen create my-app --cursor # add Cursor agent setup (.cursor/skills/)
archgen create my-app --claude-code --cursor # add both AI agent setups
archgen create my-app --force # overwrite existing directory
archgen create my-app --dry-run # preview files without writing
archgen create my-app --skip-git # skip automatic git init
Expand All @@ -73,6 +78,8 @@ archgen add ci
archgen add websocket # Socket.io + JWT auth + notification helpers
archgen add oauth # Google + GitHub OAuth2 routes
archgen add api-docs # Scalar UI at /reference + Swagger UI at /docs
archgen add claude-code # Claude Code setup (CLAUDE.md + .claude/skills/)
archgen add cursor # Cursor agent setup (.cursor/skills/)
archgen add ci --dry-run # preview changes without writing
```

Expand Down
2 changes: 2 additions & 0 deletions cli/command/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ export const createCommand = new Command("create")
.option("--websocket", "Include WebSocket support via Socket.io (Node.js only)")
.option("--oauth", "Include OAuth2 providers — Google + GitHub (Node.js only)")
.option("--api-docs", "Include Scalar API reference UI (Node.js only)")
.option("--claude-code", "Include Claude Code setup (CLAUDE.md + .claude/skills/)")
.option("--cursor", "Include Cursor agent setup (.cursor/skills/)")
.option("--all", "Include all addons (docker + testing + ci)", false)
.option("-a, --author <n>", "Author name")
.option("-d, --description <desc>", "Project description")
Expand Down
23 changes: 22 additions & 1 deletion cli/prompts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ export async function promptMissingOptions(
testing: false,
ci: false,
husky: false,
claudeCode: false,
cursor: false,
...options,
language: options.language ?? "node",
};
Expand Down Expand Up @@ -97,6 +99,19 @@ export async function promptMissingOptions(
});
}

if (options.claudeCode === undefined && options.cursor === undefined) {
questions.push({
type: "multiselect",
name: "aiAgents",
message: "Include AI agent setup? (Space to select, Enter to confirm)",
choices: [
{ title: "Claude Code (CLAUDE.md + .claude/skills/)", value: "claude", selected: false },
{ title: "Cursor (.cursor/skills/)", value: "cursor", selected: false },
],
hint: "none to skip",
});
}

if (questions.length === 0) return options;

const answers = await prompts(questions, {
Expand All @@ -115,5 +130,11 @@ export async function promptMissingOptions(
process.exit(0);
}

return { ...options, ...answers };
const raw = { ...options, ...answers } as Record<string, unknown>;
if (Array.isArray(raw.aiAgents)) {
raw.claudeCode = (raw.aiAgents as string[]).includes("claude");
raw.cursor = (raw.aiAgents as string[]).includes("cursor");
delete raw.aiAgents;
}
return raw as unknown as GenerateOptions;
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@kidkender/archgen",
"version": "1.0.6",
"version": "1.0.7",
"description": "Generate production-ready Node.js and Python project structures in seconds",
"main": "dist/index.js",
"module": "dist/index.mjs",
Expand Down
2 changes: 1 addition & 1 deletion plugins/node/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ import { PluginConfig } from "../../types";
export const nodeConfig: PluginConfig = {
name: "node-typescript",
description: "Node.js Typescript backend with Fastify",
addons: ["docker", "testing", "ci", "husky", "websocket", "oauth", "api-docs"],
addons: ["docker", "testing", "ci", "husky", "websocket", "oauth", "api-docs", "claude-code", "cursor"],
};
19 changes: 19 additions & 0 deletions plugins/node/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,16 @@ export class NodePlugin extends BasePlugin {
path: path.join(addonsPath, "api-docs"),
label: "API docs (Scalar)",
},
{
condition: !!options.claudeCode,
path: path.join(addonsPath, "claude-code"),
label: "Claude Code setup",
},
{
condition: !!options.cursor,
path: path.join(addonsPath, "cursor"),
label: "Cursor agent setup",
},
];
}

Expand Down Expand Up @@ -181,6 +191,15 @@ export class NodePlugin extends BasePlugin {
if (options.apiDocs) {
console.log(" Scalar API reference available at: http://localhost:3000/reference");
}
if (options.claudeCode) {
console.log("");
console.log(" Claude Code — open this project in Claude Code to use pre-configured skills");
console.log(" Skills: /backend-patterns /api-design /tdd-workflow and more");
}
if (options.cursor) {
console.log("");
console.log(" Cursor — .cursor/skills/ ready, open project in Cursor to use agent skills");
}
console.log("");
}
}
Loading
Loading