ccraft 1.0.11 → 1.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -11
- package/bin/claude-craft.js +3 -12
- package/package.json +1 -1
- package/src/commands/install.js +376 -187
- package/src/commands/update.js +1 -12
- package/src/ui/phase-header.js +9 -3
- package/src/ui/tasks.js +12 -32
- package/src/utils/analysis-cache.js +2 -32
- package/src/utils/api-client.js +6 -8
- package/src/utils/api-file-writer.js +2 -6
- package/src/commands/create.js +0 -568
- package/src/utils/claude-scorer.js +0 -101
package/README.md
CHANGED
|
@@ -39,10 +39,10 @@ That's it. Your `.claude/` directory is now populated with agents, skills, rules
|
|
|
39
39
|
### Starting a New Project?
|
|
40
40
|
|
|
41
41
|
```bash
|
|
42
|
-
ccraft
|
|
42
|
+
ccraft install --name my-app --description "REST API for inventory management"
|
|
43
43
|
```
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
`ccraft install` auto-detects whether you're working with an existing project or starting fresh. If the target directory is empty or doesn't exist, it switches to new-project mode — scaffolds the directory, runs Claude Code's bootstrap, then generates the full `.claude/` configuration on top.
|
|
46
46
|
|
|
47
47
|
## How It Works
|
|
48
48
|
|
|
@@ -106,7 +106,9 @@ ccraft auth sk-xxxxxxxxxxxx --server https://custom-server.example.com
|
|
|
106
106
|
|
|
107
107
|
### `ccraft install`
|
|
108
108
|
|
|
109
|
-
Generate Claude Code configuration
|
|
109
|
+
Generate Claude Code configuration. Auto-detects whether you're configuring an existing project or creating a new one.
|
|
110
|
+
|
|
111
|
+
**Existing project** (target directory has files):
|
|
110
112
|
|
|
111
113
|
```bash
|
|
112
114
|
ccraft install # Interactive mode
|
|
@@ -115,18 +117,27 @@ ccraft install -p nextjs # Apply a framework preset
|
|
|
115
117
|
ccraft install -d /path/to/project # Target a specific directory
|
|
116
118
|
```
|
|
117
119
|
|
|
118
|
-
**
|
|
119
|
-
|
|
120
|
-
### `ccraft create`
|
|
121
|
-
|
|
122
|
-
Scaffold a new project from scratch with Claude Code configuration built in.
|
|
120
|
+
**New project** (target directory is empty/missing, or `--name`/`--description` provided):
|
|
123
121
|
|
|
124
122
|
```bash
|
|
125
|
-
ccraft
|
|
126
|
-
ccraft
|
|
127
|
-
ccraft
|
|
123
|
+
ccraft install --name my-app --description "REST API for inventory management"
|
|
124
|
+
ccraft install -d ./new-project # Empty dir triggers new-project mode
|
|
125
|
+
ccraft install -y --name my-app # Non-interactive new project
|
|
128
126
|
```
|
|
129
127
|
|
|
128
|
+
In new-project mode, ccraft creates the directory, initializes git, generates `.claude/` configuration, then runs Claude Code's `/bootstrap:auto` to scaffold the project.
|
|
129
|
+
|
|
130
|
+
**Options:**
|
|
131
|
+
|
|
132
|
+
| Flag | Description |
|
|
133
|
+
|------|-------------|
|
|
134
|
+
| `-y, --yes` | Accept all defaults (non-interactive) |
|
|
135
|
+
| `-n, --name <name>` | Project name (triggers new-project mode) |
|
|
136
|
+
| `--description <text>` | Project description (triggers new-project mode) |
|
|
137
|
+
| `-p, --preset <preset>` | Apply a framework preset (`nextjs`, `go-api`, `python`, `rust`, `aspnet`, `cmake`) |
|
|
138
|
+
| `--pro` | Developer mode — skip persona selection, show all options |
|
|
139
|
+
| `-d, --dir <path>` | Target directory (default: cwd) |
|
|
140
|
+
|
|
130
141
|
### `ccraft update`
|
|
131
142
|
|
|
132
143
|
Re-analyze your project and install new components for any stack changes. Run this after adding new frameworks or dependencies.
|
package/bin/claude-craft.js
CHANGED
|
@@ -35,7 +35,6 @@ loadEnvFile(resolvePath(cliRoot, '.env'));
|
|
|
35
35
|
import { Command } from 'commander';
|
|
36
36
|
import { VERSION, PRESET_ALIASES } from '../src/constants.js';
|
|
37
37
|
import { runInstall } from '../src/commands/install.js';
|
|
38
|
-
import { runCreate } from '../src/commands/create.js';
|
|
39
38
|
import { runUpdate } from '../src/commands/update.js';
|
|
40
39
|
import { runAuth } from '../src/commands/auth.js';
|
|
41
40
|
import { runLogout } from '../src/commands/logout.js';
|
|
@@ -58,20 +57,12 @@ program
|
|
|
58
57
|
.description('Remove stored API key')
|
|
59
58
|
.action(runLogout);
|
|
60
59
|
|
|
61
|
-
program
|
|
62
|
-
.command('create')
|
|
63
|
-
.description('Create a new project from scratch with Claude scaffolding')
|
|
64
|
-
.option('-y, --yes', 'Accept all defaults (non-interactive)')
|
|
65
|
-
.option('-n, --name <name>', 'Project name (non-interactive mode)')
|
|
66
|
-
.option('--description <text>', 'Project description (non-interactive mode)')
|
|
67
|
-
.option('--pro', 'Developer mode — skip persona selection, show all options')
|
|
68
|
-
.option('-d, --dir <path>', 'Parent directory to create the project in (default: cwd)')
|
|
69
|
-
.action(runCreate);
|
|
70
|
-
|
|
71
60
|
program
|
|
72
61
|
.command('install')
|
|
73
|
-
.description('Generate Claude Code configuration
|
|
62
|
+
.description('Generate Claude Code configuration — auto-detects new vs existing projects')
|
|
74
63
|
.option('-y, --yes', 'Accept all defaults (non-interactive)')
|
|
64
|
+
.option('-n, --name <name>', 'Project name (triggers new-project mode)')
|
|
65
|
+
.option('--description <text>', 'Project description (triggers new-project mode)')
|
|
75
66
|
.option(`-p, --preset <preset>`, `Apply a framework preset (${Object.keys(PRESET_ALIASES).join(', ')})`)
|
|
76
67
|
.option('--pro', 'Developer mode — skip persona selection, show all options')
|
|
77
68
|
.option('-d, --dir <path>', 'Target directory (default: cwd)')
|