aico-cli 0.1.2 → 0.1.3
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/dist/cli.d.mts
CHANGED
package/dist/cli.d.ts
CHANGED
package/dist/cli.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import cac from 'cac';
|
|
3
3
|
import ansis from 'ansis';
|
|
4
|
-
import { J as readAicoConfig, K as updateAicoConfig, N as getTranslation, k as AI_OUTPUT_LANGUAGES, O as inquirer, P as addNumbersToChoices, Q as version, q as backupExistingConfig, r as copyConfigFiles, x as applyAiLanguageDirective, R as configureAiPersonality, C as CLAUDE_DIR, I as I18N, T as
|
|
4
|
+
import { J as readAicoConfig, K as updateAicoConfig, N as getTranslation, k as AI_OUTPUT_LANGUAGES, O as inquirer, P as addNumbersToChoices, Q as version, q as backupExistingConfig, r as copyConfigFiles, x as applyAiLanguageDirective, R as configureAiPersonality, C as CLAUDE_DIR, I as I18N, T as isWindows, U as readCcrConfig, V as isCcrInstalled, W as installCcr, X as configureCcrFeature, Y as handleExitPromptError, Z as handleGeneralError, _ as readAicoConfigAsync, $ as COMETIX_COMMANDS, a0 as COMETIX_COMMAND_NAME, a1 as installCometixLine, o as openSettingsJson, b as importRecommendedPermissions, a as importRecommendedEnv, z as readMcpConfig, G as fixWindowsMcpConfig, B as writeMcpConfig, a2 as selectMcpServices, D as backupMcpConfig, M as MCP_SERVICES, F as buildMcpServerConfig, a3 as EscapeKeyPressed, E as mergeMcpServers, a4 as displayBanner, a5 as selectAndInstallWorkflows, a6 as displayBannerWithInfo, i as init, a7 as executeWithEscapeSupport, a8 as checkAndUpdateTools } from './shared/aico-cli.Bev0wEf2.mjs';
|
|
5
5
|
import inquirer$1 from 'inquirer';
|
|
6
6
|
import { existsSync } from 'node:fs';
|
|
7
7
|
import { x } from 'tinyexec';
|
|
@@ -116,7 +116,8 @@ async function runCcrUi(scriptLang, apiKey) {
|
|
|
116
116
|
`));
|
|
117
117
|
}
|
|
118
118
|
try {
|
|
119
|
-
const
|
|
119
|
+
const ccrCommand = isWindows() ? "npx ccr ui" : "ccr ui";
|
|
120
|
+
const { stdout, stderr } = await execAsync$1(ccrCommand);
|
|
120
121
|
if (stdout) console.log(stdout);
|
|
121
122
|
if (stderr) console.error(ansis.yellow(stderr));
|
|
122
123
|
console.log(ansis.green(`\u2714 ${i18n.ccr.ccrUiStarted}`));
|
|
@@ -130,7 +131,8 @@ async function runCcrStatus(scriptLang) {
|
|
|
130
131
|
console.log(ansis.cyan(`
|
|
131
132
|
\u{1F4CA} ${i18n.ccr.checkingCcrStatus}`));
|
|
132
133
|
try {
|
|
133
|
-
const
|
|
134
|
+
const ccrCommand = isWindows() ? "npx ccr status" : "ccr status";
|
|
135
|
+
const { stdout, stderr } = await execAsync$1(ccrCommand);
|
|
134
136
|
if (stdout) {
|
|
135
137
|
console.log("\n" + ansis.bold(i18n.ccr.ccrStatusTitle));
|
|
136
138
|
console.log(stdout);
|
|
@@ -146,7 +148,8 @@ async function runCcrRestart(scriptLang) {
|
|
|
146
148
|
console.log(ansis.cyan(`
|
|
147
149
|
\u{1F504} ${i18n.ccr.restartingCcr}`));
|
|
148
150
|
try {
|
|
149
|
-
const
|
|
151
|
+
const ccrCommand = isWindows() ? "npx ccr restart" : "ccr restart";
|
|
152
|
+
const { stdout, stderr } = await execAsync$1(ccrCommand);
|
|
150
153
|
if (stdout) console.log(stdout);
|
|
151
154
|
if (stderr) console.error(ansis.yellow(stderr));
|
|
152
155
|
console.log(ansis.green(`\u2714 ${i18n.ccr.ccrRestarted}`));
|
|
@@ -160,7 +163,8 @@ async function runCcrStart(scriptLang) {
|
|
|
160
163
|
console.log(ansis.cyan(`
|
|
161
164
|
\u25B6\uFE0F ${i18n.ccr.startingCcr}`));
|
|
162
165
|
try {
|
|
163
|
-
const
|
|
166
|
+
const ccrCommand = isWindows() ? "npx ccr start" : "ccr start";
|
|
167
|
+
const { stdout, stderr } = await execAsync$1(ccrCommand);
|
|
164
168
|
if (stdout) console.log(stdout);
|
|
165
169
|
if (stderr) console.error(ansis.yellow(stderr));
|
|
166
170
|
console.log(ansis.green(`\u2714 ${i18n.ccr.ccrStarted}`));
|
|
@@ -180,7 +184,8 @@ async function runCcrStop(scriptLang) {
|
|
|
180
184
|
console.log(ansis.cyan(`
|
|
181
185
|
\u23F9\uFE0F ${i18n.ccr.stoppingCcr}`));
|
|
182
186
|
try {
|
|
183
|
-
const
|
|
187
|
+
const ccrCommand = isWindows() ? "npx ccr stop" : "ccr stop";
|
|
188
|
+
const { stdout, stderr } = await execAsync$1(ccrCommand);
|
|
184
189
|
if (stdout) console.log(stdout);
|
|
185
190
|
if (stderr) console.error(ansis.yellow(stderr));
|
|
186
191
|
console.log(ansis.green(`\u2714 ${i18n.ccr.ccrStopped}`));
|
|
@@ -1217,6 +1222,25 @@ function customizeHelp(sections) {
|
|
|
1217
1222
|
return sections;
|
|
1218
1223
|
}
|
|
1219
1224
|
|
|
1225
|
+
if (!Array.prototype.findLastIndex) {
|
|
1226
|
+
Array.prototype.findLastIndex = function(predicate, thisArg) {
|
|
1227
|
+
if (this == null) {
|
|
1228
|
+
throw new TypeError("Array.prototype.findLastIndex called on null or undefined");
|
|
1229
|
+
}
|
|
1230
|
+
if (typeof predicate !== "function") {
|
|
1231
|
+
throw new TypeError("predicate must be a function");
|
|
1232
|
+
}
|
|
1233
|
+
const array = Object(this);
|
|
1234
|
+
const length = array.length >>> 0;
|
|
1235
|
+
for (let i = length - 1; i >= 0; i--) {
|
|
1236
|
+
if (predicate.call(thisArg, array[i], i, array)) {
|
|
1237
|
+
return i;
|
|
1238
|
+
}
|
|
1239
|
+
}
|
|
1240
|
+
return -1;
|
|
1241
|
+
};
|
|
1242
|
+
}
|
|
1243
|
+
|
|
1220
1244
|
async function main() {
|
|
1221
1245
|
const cli = cac("aico");
|
|
1222
1246
|
setupCommands(cli);
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as AICO_CONFIG_FILE, k as AI_OUTPUT_LANGUAGES, C as CLAUDE_DIR, e as CLAUDE_MD_FILE, f as ClAUDE_CONFIG_FILE, I as I18N, j as LANG_LABELS, L as LEGACY_AICO_CONFIG_FILE, M as MCP_SERVICES, S as SETTINGS_FILE, h as SUPPORTED_LANGS, H as addCompletedOnboarding, x as applyAiLanguageDirective, q as backupExistingConfig, D as backupMcpConfig, F as buildMcpServerConfig, d as cleanupPermissions, c as commandExists, s as configureApi, r as copyConfigFiles, p as ensureClaudeDir, G as fixWindowsMcpConfig, w as getExistingApiConfig, y as getMcpConfigPath, g as getPlatform, a as importRecommendedEnv, b as importRecommendedPermissions, i as init, n as installClaudeCode, l as isClaudeCodeInstalled, m as mergeAndCleanPermissions, t as mergeConfigs, E as mergeMcpServers, v as mergeSettingsFile, o as openSettingsJson, z as readMcpConfig, u as updateDefaultModel, B as writeMcpConfig } from './shared/aico-cli.
|
|
1
|
+
export { A as AICO_CONFIG_FILE, k as AI_OUTPUT_LANGUAGES, C as CLAUDE_DIR, e as CLAUDE_MD_FILE, f as ClAUDE_CONFIG_FILE, I as I18N, j as LANG_LABELS, L as LEGACY_AICO_CONFIG_FILE, M as MCP_SERVICES, S as SETTINGS_FILE, h as SUPPORTED_LANGS, H as addCompletedOnboarding, x as applyAiLanguageDirective, q as backupExistingConfig, D as backupMcpConfig, F as buildMcpServerConfig, d as cleanupPermissions, c as commandExists, s as configureApi, r as copyConfigFiles, p as ensureClaudeDir, G as fixWindowsMcpConfig, w as getExistingApiConfig, y as getMcpConfigPath, g as getPlatform, a as importRecommendedEnv, b as importRecommendedPermissions, i as init, n as installClaudeCode, l as isClaudeCodeInstalled, m as mergeAndCleanPermissions, t as mergeConfigs, E as mergeMcpServers, v as mergeSettingsFile, o as openSettingsJson, z as readMcpConfig, u as updateDefaultModel, B as writeMcpConfig } from './shared/aico-cli.Bev0wEf2.mjs';
|
|
2
2
|
import 'ansis';
|
|
3
3
|
import 'inquirer';
|
|
4
4
|
import 'node:fs';
|
|
@@ -14,7 +14,7 @@ import ora from 'ora';
|
|
|
14
14
|
import { exec } from 'tinyexec';
|
|
15
15
|
import { rm, mkdir, copyFile as copyFile$1 } from 'node:fs/promises';
|
|
16
16
|
|
|
17
|
-
const version = "0.1.
|
|
17
|
+
const version = "0.1.3";
|
|
18
18
|
|
|
19
19
|
const common$1 = {
|
|
20
20
|
// Basic
|
|
@@ -5179,11 +5179,13 @@ const execAsync$1 = promisify(exec$1);
|
|
|
5179
5179
|
async function isCcrInstalled() {
|
|
5180
5180
|
let commandExists = false;
|
|
5181
5181
|
try {
|
|
5182
|
-
|
|
5182
|
+
const ccrCommand = isWindows() ? "npx ccr version" : "ccr version";
|
|
5183
|
+
await execAsync$1(ccrCommand);
|
|
5183
5184
|
commandExists = true;
|
|
5184
5185
|
} catch {
|
|
5185
5186
|
try {
|
|
5186
|
-
|
|
5187
|
+
const whichCommand = isWindows() ? "where ccr" : "which ccr";
|
|
5188
|
+
await execAsync$1(whichCommand);
|
|
5187
5189
|
commandExists = true;
|
|
5188
5190
|
} catch {
|
|
5189
5191
|
commandExists = false;
|
|
@@ -6025,4 +6027,4 @@ async function openSettingsJson() {
|
|
|
6025
6027
|
}
|
|
6026
6028
|
}
|
|
6027
6029
|
|
|
6028
|
-
export {
|
|
6030
|
+
export { COMETIX_COMMANDS as $, AICO_CONFIG_FILE as A, writeMcpConfig as B, CLAUDE_DIR as C, backupMcpConfig as D, mergeMcpServers as E, buildMcpServerConfig as F, fixWindowsMcpConfig as G, addCompletedOnboarding as H, I18N as I, readAicoConfig as J, updateAicoConfig as K, LEGACY_AICO_CONFIG_FILE as L, MCP_SERVICES as M, getTranslation as N, inquirer as O, addNumbersToChoices as P, version as Q, configureAiPersonality as R, SETTINGS_FILE as S, isWindows as T, readCcrConfig as U, isCcrInstalled as V, installCcr as W, configureCcrFeature as X, handleExitPromptError as Y, handleGeneralError as Z, readAicoConfigAsync as _, importRecommendedEnv as a, COMETIX_COMMAND_NAME as a0, installCometixLine as a1, selectMcpServices as a2, EscapeKeyPressed as a3, displayBanner as a4, selectAndInstallWorkflows as a5, displayBannerWithInfo as a6, executeWithEscapeSupport as a7, checkAndUpdateTools as a8, importRecommendedPermissions as b, commandExists as c, cleanupPermissions as d, CLAUDE_MD_FILE as e, ClAUDE_CONFIG_FILE as f, getPlatform as g, SUPPORTED_LANGS as h, init as i, LANG_LABELS as j, AI_OUTPUT_LANGUAGES as k, isClaudeCodeInstalled as l, mergeAndCleanPermissions as m, installClaudeCode as n, openSettingsJson as o, ensureClaudeDir as p, backupExistingConfig as q, copyConfigFiles as r, configureApi as s, mergeConfigs as t, updateDefaultModel as u, mergeSettingsFile as v, getExistingApiConfig as w, applyAiLanguageDirective as x, getMcpConfigPath as y, readMcpConfig as z };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aico-cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"packageManager": "pnpm@9.15.9",
|
|
5
5
|
"description": "AI CLI",
|
|
6
6
|
"repository": {
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"cac": "^6.7.14",
|
|
40
40
|
"dayjs": "^1.11.13",
|
|
41
41
|
"find-up-simple": "^1.0.1",
|
|
42
|
-
"inquirer": "^12.9.
|
|
42
|
+
"inquirer": "^12.9.3",
|
|
43
43
|
"ora": "^8.2.0",
|
|
44
44
|
"pathe": "^2.0.3",
|
|
45
45
|
"tinyexec": "^1.0.1"
|