@cregis-dev/cckit 0.6.3 → 0.6.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cregis-dev/cckit",
3
- "version": "0.6.3",
3
+ "version": "0.6.4",
4
4
  "description": "Enterprise-grade Claude Code configuration toolkit — orchestrates external tools to set up unified rules, skills, MCP and methodology for teams",
5
5
  "type": "module",
6
6
  "bin": {
package/registry.json CHANGED
@@ -69,7 +69,7 @@
69
69
  "id": "skill-vetter",
70
70
  "repo": "https://github.com/useai-pro/openclaw-skills-security",
71
71
  "skill": "skill-vetter",
72
- "installCommand": "npx skills add https://github.com/useai-pro/openclaw-skills-security@skill-vetter -y -a claude-code"
72
+ "installCommand": "npx skills add https://github.com/useai-pro/openclaw-skills-security --skill skill-vetter -y -a claude-code"
73
73
  }
74
74
  ],
75
75
  "bmad": {
@@ -71,7 +71,8 @@ export async function runInit(opts = {}, _deps = {}) {
71
71
  apiUrl: config.apiUrl || userSettings.apiUrl || DEFAULT_API_URL,
72
72
  apiKey: config.apiKey,
73
73
  forceApiKey: config.forceApiKey,
74
- modelId,
74
+ model: config.model, // CLI alias (e.g. 'kimi'), used for prompting
75
+ modelId, // Resolved ID (e.g. 'Kimi-K2.5'), used for env vars
75
76
  modelEnvKeys: userSettings.modelEnvKeys || [],
76
77
  yes: opts.yes,
77
78
  skip: false,
@@ -47,25 +47,24 @@ export async function configureUser(opts, logger, _deps = {}) {
47
47
 
48
48
  const existingEnv = existing.env || {}
49
49
 
50
- // 1. API URL — prompt for confirmation if not provided via CLI
50
+ // 1. API URL — always prompt for confirmation when not in --yes mode
51
51
  let apiUrl = opts.apiUrl
52
- if (!opts.yes && !opts.apiUrl) {
52
+ if (!opts.yes) {
53
53
  const input = await askFn(' Enter API URL (default: ' + opts.apiUrl + '): ')
54
54
  if (input && input.trim()) {
55
55
  apiUrl = input.trim()
56
56
  }
57
57
  }
58
58
 
59
- // 2. API Key — resolve from CLI flag, readline, or existing
59
+ // 2. API Key — prompt when not in --yes mode
60
60
  let apiKey = existingEnv.ANTHROPIC_AUTH_TOKEN || ''
61
61
  const hasExistingKey = Boolean(apiKey)
62
62
 
63
- if (opts.apiKey) {
64
- // CLI flag provided use it (force or new)
65
- apiKey = opts.apiKey
66
- } else if (!hasExistingKey || opts.forceApiKey) {
67
- // No existing key, or force update — prompt via readline
68
- if (!opts.yes) {
63
+ if (!opts.yes) {
64
+ // Use CLI value if provided, otherwise prompt
65
+ if (opts.apiKey) {
66
+ apiKey = opts.apiKey
67
+ } else {
69
68
  const prompt = hasExistingKey
70
69
  ? ' API Key already exists. Enter new key to replace (empty to keep): '
71
70
  : ' Enter your API Key (empty to skip): '
@@ -76,12 +75,15 @@ export async function configureUser(opts, logger, _deps = {}) {
76
75
  logger.warn('No API Key provided. You can set it later with `cckit install --api-key <key>`')
77
76
  }
78
77
  }
79
- // --yes mode without --api-key: skip prompt, keep existing
78
+ } else if (opts.apiKey) {
79
+ // --yes mode: use CLI flag if provided
80
+ apiKey = opts.apiKey
80
81
  }
82
+ // --yes mode without --api-key: keep existing
81
83
 
82
- // 3. Model — prompt for confirmation
84
+ // 3. Model — always prompt for confirmation when not in --yes mode
83
85
  let modelId = opts.modelId
84
- if (!opts.yes && !opts.model) {
86
+ if (!opts.yes) {
85
87
  const input = await askFn(' Enter model (default: ' + opts.modelId + '): ')
86
88
  if (input && input.trim()) {
87
89
  modelId = input.trim()