ccraft 1.0.0 → 1.0.2

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.
@@ -43,7 +43,7 @@ import { runLogout } from '../src/commands/logout.js';
43
43
  const program = new Command();
44
44
 
45
45
  program
46
- .name('claude-craft')
46
+ .name('ccraft')
47
47
  .description('Scaffold Claude Code project structure')
48
48
  .version(VERSION);
49
49
 
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "ccraft",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "Intelligent Claude Code project configurator — role-aware agents, skills, rules, MCPs, and workflows",
5
5
  "type": "module",
6
6
  "bin": {
7
- "claude-craft": "./bin/claude-craft.js"
7
+ "ccraft": "./bin/claude-craft.js"
8
8
  },
9
9
  "files": [
10
10
  "bin/",
@@ -1,14 +1,14 @@
1
1
  /**
2
2
  * Auth command — store API key for claude-craft server.
3
3
  *
4
- * Usage: claude-craft auth <key> [-s <server-url>]
4
+ * Usage: ccraft auth <key> [-s <server-url>]
5
5
  */
6
6
  import chalk from 'chalk';
7
7
  import { validateKey, saveConfig, loadConfig, ApiError } from '../utils/api-client.js';
8
8
  import * as logger from '../utils/logger.js';
9
9
 
10
10
  export async function runAuth(key, options = {}) {
11
- const serverUrl = options.server || process.env.CLAUDE_CRAFT_SERVER_URL || 'https://api.claude-craft.dev';
11
+ const serverUrl = 'https://claude-craft-server.up.railway.app';
12
12
 
13
13
  if (!key.startsWith('ck_live_')) {
14
14
  logger.error('Invalid key format. API keys must start with ' + chalk.bold('ck_live_'));
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Logout command — clear stored API key.
3
3
  *
4
- * Usage: claude-craft logout
4
+ * Usage: ccraft logout
5
5
  */
6
6
  import chalk from 'chalk';
7
7
  import { loadConfig, saveConfig } from '../utils/api-client.js';
@@ -141,7 +141,7 @@ export async function runUpdate(options = {}) {
141
141
 
142
142
  if (!storedProfile) {
143
143
  logger.error(
144
- 'No stored user profile found. Re-run: ' + chalk.bold('claude-craft install') +
144
+ 'No stored user profile found. Re-run: ' + chalk.bold('ccraft install') +
145
145
  ' to rebuild the profile cache.',
146
146
  );
147
147
  process.exit(1);
@@ -149,7 +149,7 @@ export async function runUpdate(options = {}) {
149
149
 
150
150
  if (!previousAnalysis) {
151
151
  logger.error(
152
- 'No stored project analysis found. Re-run: ' + chalk.bold('claude-craft install') +
152
+ 'No stored project analysis found. Re-run: ' + chalk.bold('ccraft install') +
153
153
  ' to rebuild the analysis cache.',
154
154
  );
155
155
  process.exit(1);
@@ -10,7 +10,7 @@ import { VERSION } from '../constants.js';
10
10
  const CONFIG_DIR = join(homedir(), '.claude-craft');
11
11
  const CONFIG_PATH = join(CONFIG_DIR, 'config.json');
12
12
  function getDefaultServerUrl() {
13
- return process.env.CLAUDE_CRAFT_SERVER_URL || 'https://api.claude-craft.dev';
13
+ return 'https://claude-craft-server.up.railway.app';
14
14
  }
15
15
  const TIMEOUT_MS = 30_000;
16
16
 
@@ -54,7 +54,7 @@ export async function callGenerate(profile, analysis, options = {}) {
54
54
  const config = loadConfig();
55
55
  if (!config?.apiKey) {
56
56
  throw new ApiError(
57
- 'No API key configured. Run: claude-craft auth <key>',
57
+ 'No API key configured. Run: ccraft auth <key>',
58
58
  'NO_API_KEY',
59
59
  );
60
60
  }
@@ -99,13 +99,13 @@ export async function callGenerate(profile, analysis, options = {}) {
99
99
  case 401:
100
100
  case 403:
101
101
  throw new ApiError(
102
- body.error || 'API key invalid or expired. Run: claude-craft auth <new-key>',
102
+ body.error || 'API key invalid or expired. Run: ccraft auth <new-key>',
103
103
  'AUTH_ERROR',
104
104
  res.status,
105
105
  );
106
106
  case 426:
107
107
  throw new ApiError(
108
- body.error || 'Client incompatible with server. Run: npm update -g claude-craft',
108
+ body.error || 'Client incompatible with server. Run: npm update -g ccraft',
109
109
  'VERSION_MISMATCH',
110
110
  426,
111
111
  );
@@ -141,7 +141,7 @@ export async function callUpdate(profile, currentAnalysis, previousAnalysis, ins
141
141
  const config = loadConfig();
142
142
  if (!config?.apiKey) {
143
143
  throw new ApiError(
144
- 'No API key configured. Run: claude-craft auth <key>',
144
+ 'No API key configured. Run: ccraft auth <key>',
145
145
  'NO_API_KEY',
146
146
  );
147
147
  }
@@ -186,13 +186,13 @@ export async function callUpdate(profile, currentAnalysis, previousAnalysis, ins
186
186
  case 401:
187
187
  case 403:
188
188
  throw new ApiError(
189
- body.error || 'API key invalid or expired. Run: claude-craft auth <new-key>',
189
+ body.error || 'API key invalid or expired. Run: ccraft auth <new-key>',
190
190
  'AUTH_ERROR',
191
191
  res.status,
192
192
  );
193
193
  case 426:
194
194
  throw new ApiError(
195
- body.error || 'Client incompatible with server. Run: npm update -g claude-craft',
195
+ body.error || 'Client incompatible with server. Run: npm update -g ccraft',
196
196
  'VERSION_MISMATCH',
197
197
  426,
198
198
  );
@@ -58,7 +58,7 @@ export async function runPreflight(options = {}) {
58
58
  console.log(' ' + dotPad('claude-craft project', colors.success('ok')));
59
59
  } else {
60
60
  console.log(' ' + dotPad('claude-craft project', colors.error('not found')));
61
- envErrors.push('No claude-craft project found. Run: claude-craft install first.');
61
+ envErrors.push('No claude-craft project found. Run: ccraft install first.');
62
62
  }
63
63
  }
64
64
 
@@ -70,13 +70,13 @@ export async function runPreflight(options = {}) {
70
70
  apiConfig = await promptForApiKey();
71
71
  } else {
72
72
  console.log(' ' + dotPad('API key', colors.error('missing')));
73
- envErrors.push('No API key configured. Run: claude-craft auth <key>');
73
+ envErrors.push('No API key configured. Run: ccraft auth <key>');
74
74
  }
75
75
  }
76
76
 
77
77
  // ── 4. API key validation (also proves server is reachable) ─────────
78
78
  if (apiConfig?.apiKey) {
79
- const serverUrl = apiConfig.serverUrl || process.env.CLAUDE_CRAFT_SERVER_URL || 'https://api.claude-craft.dev';
79
+ const serverUrl = 'https://claude-craft-server.up.railway.app';
80
80
 
81
81
  try {
82
82
  const valid = await validateKey(apiConfig.apiKey, serverUrl);
@@ -84,7 +84,7 @@ export async function runPreflight(options = {}) {
84
84
  console.log(' ' + dotPad('API key', colors.success('valid')));
85
85
  } else {
86
86
  console.log(' ' + dotPad('API key', colors.error('invalid')));
87
- envErrors.push('API key is invalid or expired. Run: claude-craft auth <new-key>');
87
+ envErrors.push('API key is invalid or expired. Run: ccraft auth <new-key>');
88
88
  }
89
89
  } catch (err) {
90
90
  if (err instanceof ApiError && err.code === 'NETWORK_ERROR') {
@@ -21,7 +21,7 @@ export async function promptForApiKey() {
21
21
  });
22
22
 
23
23
  if (!key || !key.trim()) {
24
- logger.error('No key provided. Run: ' + chalk.bold('claude-craft auth <key>'));
24
+ logger.error('No key provided. Run: ' + chalk.bold('ccraft auth <key>'));
25
25
  process.exit(1);
26
26
  }
27
27