shiva-code 0.5.1 → 0.5.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.
- package/dist/index.js +56 -22
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -81,7 +81,7 @@ import {
|
|
|
81
81
|
} from "./chunk-3RG5ZIWI.js";
|
|
82
82
|
|
|
83
83
|
// src/index.ts
|
|
84
|
-
import { Command as
|
|
84
|
+
import { Command as Command36 } from "commander";
|
|
85
85
|
import * as readline from "readline";
|
|
86
86
|
|
|
87
87
|
// src/commands/auth/login.ts
|
|
@@ -12663,8 +12663,41 @@ async function handlePreview(filepath) {
|
|
|
12663
12663
|
}
|
|
12664
12664
|
}
|
|
12665
12665
|
|
|
12666
|
-
// src/commands/
|
|
12666
|
+
// src/commands/memory/remember.ts
|
|
12667
12667
|
import { Command as Command26 } from "commander";
|
|
12668
|
+
var rememberCommand = new Command26("remember").description("Memory in der Cloud speichern").argument("<text>", "Der Text der gespeichert werden soll").option("-k, --key <key>", "Schl\xFCssel/Titel f\xFCr die Memory").option("-c, --category <category>", "Kategorie (context, learning, preference, fact)", "fact").action(async (text, options) => {
|
|
12669
|
+
if (!isAuthenticated()) {
|
|
12670
|
+
log.error("Nicht angemeldet");
|
|
12671
|
+
log.info("Anmelden mit: shiva login");
|
|
12672
|
+
return;
|
|
12673
|
+
}
|
|
12674
|
+
const projectPath = process.cwd();
|
|
12675
|
+
const config2 = getProjectConfig(projectPath);
|
|
12676
|
+
if (!config2.projectId) {
|
|
12677
|
+
log.error("Projekt nicht mit Cloud verbunden");
|
|
12678
|
+
log.info("Verbinden mit: shiva init && shiva sync");
|
|
12679
|
+
return;
|
|
12680
|
+
}
|
|
12681
|
+
const key = options.key || text.substring(0, 50).replace(/[^a-zA-Z0-9]/g, "_");
|
|
12682
|
+
try {
|
|
12683
|
+
const result = await api.addMemory(config2.projectId, {
|
|
12684
|
+
key,
|
|
12685
|
+
value: text,
|
|
12686
|
+
category: options.category
|
|
12687
|
+
});
|
|
12688
|
+
if (result.success) {
|
|
12689
|
+
log.success("Memory gespeichert!");
|
|
12690
|
+
log.dim(`ID: ${result.memoryId}`);
|
|
12691
|
+
} else {
|
|
12692
|
+
log.error(result.message || "Fehler beim Speichern");
|
|
12693
|
+
}
|
|
12694
|
+
} catch (error) {
|
|
12695
|
+
log.error(error instanceof Error ? error.message : "Fehler beim Speichern");
|
|
12696
|
+
}
|
|
12697
|
+
});
|
|
12698
|
+
|
|
12699
|
+
// src/commands/system/doctor.ts
|
|
12700
|
+
import { Command as Command27 } from "commander";
|
|
12668
12701
|
import { execSync as execSync4 } from "child_process";
|
|
12669
12702
|
import * as fs11 from "fs";
|
|
12670
12703
|
import * as path13 from "path";
|
|
@@ -12922,7 +12955,7 @@ function printResult(result) {
|
|
|
12922
12955
|
console.log(` ${colors.dim("\u2192")} ${colors.dim(result.hint)}`);
|
|
12923
12956
|
}
|
|
12924
12957
|
}
|
|
12925
|
-
var doctorCommand = new
|
|
12958
|
+
var doctorCommand = new Command27("doctor").description("System-Check f\xFCr SHIVA und Claude Code").option("-v, --verbose", "Zeige zus\xE4tzliche Details").option("-j, --json", "Ausgabe als JSON").action(async (options) => {
|
|
12926
12959
|
if (!options.json) {
|
|
12927
12960
|
log.newline();
|
|
12928
12961
|
console.log(colors.orange.bold("\u{1F3E5} SHIVA Doctor - System Health Check"));
|
|
@@ -12991,7 +13024,7 @@ var doctorCommand = new Command26("doctor").description("System-Check f\xFCr SHI
|
|
|
12991
13024
|
});
|
|
12992
13025
|
|
|
12993
13026
|
// src/commands/system/upgrade.ts
|
|
12994
|
-
import { Command as
|
|
13027
|
+
import { Command as Command28 } from "commander";
|
|
12995
13028
|
import { execSync as execSync5, spawn as spawn6 } from "child_process";
|
|
12996
13029
|
import * as fs12 from "fs";
|
|
12997
13030
|
import * as path14 from "path";
|
|
@@ -13095,7 +13128,7 @@ async function runUpgrade(pm) {
|
|
|
13095
13128
|
});
|
|
13096
13129
|
});
|
|
13097
13130
|
}
|
|
13098
|
-
var upgradeCommand = new
|
|
13131
|
+
var upgradeCommand = new Command28("upgrade").description("SHIVA CLI aktualisieren").option("-c, --check", "Nur auf Updates pr\xFCfen, nicht installieren").option("-f, --force", "Update erzwingen, auch wenn aktuell").option("--npm", "npm verwenden").option("--yarn", "yarn verwenden").option("--pnpm", "pnpm verwenden").action(async (options) => {
|
|
13099
13132
|
log.newline();
|
|
13100
13133
|
console.log(colors.orange.bold("\u{1F680} SHIVA Upgrade"));
|
|
13101
13134
|
log.newline();
|
|
@@ -13140,12 +13173,12 @@ var upgradeCommand = new Command27("upgrade").description("SHIVA CLI aktualisier
|
|
|
13140
13173
|
log.plain(` ${getUpgradeCommand(pm)}`);
|
|
13141
13174
|
}
|
|
13142
13175
|
});
|
|
13143
|
-
var selfUpdateCommand = new
|
|
13176
|
+
var selfUpdateCommand = new Command28("self-update").description('Alias f\xFCr "shiva upgrade"').action(async () => {
|
|
13144
13177
|
await upgradeCommand.parseAsync(["upgrade"], { from: "user" });
|
|
13145
13178
|
});
|
|
13146
13179
|
|
|
13147
13180
|
// src/commands/system/telemetry.ts
|
|
13148
|
-
import { Command as
|
|
13181
|
+
import { Command as Command29 } from "commander";
|
|
13149
13182
|
import Conf5 from "conf";
|
|
13150
13183
|
var telemetryConfig = new Conf5({
|
|
13151
13184
|
projectName: "shiva-code",
|
|
@@ -13181,7 +13214,7 @@ var DATA_NOT_COLLECTED = [
|
|
|
13181
13214
|
"Pers\xF6nliche Daten oder IP-Adressen",
|
|
13182
13215
|
"Code oder Datei-Inhalte"
|
|
13183
13216
|
];
|
|
13184
|
-
var telemetryCommand = new
|
|
13217
|
+
var telemetryCommand = new Command29("telemetry").description("Telemetrie/Analytics verwalten").option("--enable", "Telemetrie aktivieren (opt-in)").option("--disable", "Telemetrie deaktivieren (opt-out)").option("--status", "Aktuellen Status anzeigen").option("-j, --json", "Ausgabe als JSON").action((options) => {
|
|
13185
13218
|
const isEnabled = telemetryConfig.get("enabled");
|
|
13186
13219
|
const optInAt = telemetryConfig.get("optInAt");
|
|
13187
13220
|
const optOutAt = telemetryConfig.get("optOutAt");
|
|
@@ -13272,8 +13305,8 @@ var telemetryCommand = new Command28("telemetry").description("Telemetrie/Analyt
|
|
|
13272
13305
|
});
|
|
13273
13306
|
|
|
13274
13307
|
// src/commands/system/completions.ts
|
|
13275
|
-
import { Command as
|
|
13276
|
-
var completionsCommand = new
|
|
13308
|
+
import { Command as Command30 } from "commander";
|
|
13309
|
+
var completionsCommand = new Command30("completions").description("Shell-Completion-Skripte generieren").argument("[shell]", "Shell-Typ: bash, zsh, fish").option("--install", "Direkt installieren (nur bash/zsh)").action(async (shell, options) => {
|
|
13277
13310
|
if (!shell) {
|
|
13278
13311
|
log.newline();
|
|
13279
13312
|
console.log(colors.orange.bold("SHIVA Code - Shell Completions"));
|
|
@@ -13668,9 +13701,9 @@ async function installFishCompletion() {
|
|
|
13668
13701
|
}
|
|
13669
13702
|
|
|
13670
13703
|
// src/commands/system/stats.ts
|
|
13671
|
-
import { Command as
|
|
13704
|
+
import { Command as Command31 } from "commander";
|
|
13672
13705
|
import ora18 from "ora";
|
|
13673
|
-
var statsCommand = new
|
|
13706
|
+
var statsCommand = new Command31("stats").description("Session-Statistiken und Analytics anzeigen").option("-d, --days <n>", "Zeitraum in Tagen", "30").option("--json", "JSON Output").action(async (options) => {
|
|
13674
13707
|
const spinner = ora18("Sammle Statistiken...").start();
|
|
13675
13708
|
try {
|
|
13676
13709
|
const projects = await getAllClaudeProjects();
|
|
@@ -13826,9 +13859,9 @@ function formatNumber(n) {
|
|
|
13826
13859
|
}
|
|
13827
13860
|
|
|
13828
13861
|
// src/commands/advanced/docker.ts
|
|
13829
|
-
import { Command as
|
|
13862
|
+
import { Command as Command32 } from "commander";
|
|
13830
13863
|
import ora19 from "ora";
|
|
13831
|
-
var dockerCommand = new
|
|
13864
|
+
var dockerCommand = new Command32("docker").description("Docker-Integration verwalten");
|
|
13832
13865
|
dockerCommand.command("status").description("Docker-Verf\xFCgbarkeit pr\xFCfen").action(() => {
|
|
13833
13866
|
log.brand();
|
|
13834
13867
|
log.header("Docker Status");
|
|
@@ -14058,7 +14091,7 @@ dockerCommand.action(() => {
|
|
|
14058
14091
|
});
|
|
14059
14092
|
|
|
14060
14093
|
// src/commands/advanced/workflow.ts
|
|
14061
|
-
import { Command as
|
|
14094
|
+
import { Command as Command33 } from "commander";
|
|
14062
14095
|
import * as fs13 from "fs";
|
|
14063
14096
|
import * as path15 from "path";
|
|
14064
14097
|
import * as os7 from "os";
|
|
@@ -14082,7 +14115,7 @@ var builtInWorkflows = {
|
|
|
14082
14115
|
]
|
|
14083
14116
|
}
|
|
14084
14117
|
};
|
|
14085
|
-
var workflowCommand = new
|
|
14118
|
+
var workflowCommand = new Command33("workflow").description("Automatisierte Workflows ausf\xFChren").action(async () => {
|
|
14086
14119
|
await listWorkflows();
|
|
14087
14120
|
});
|
|
14088
14121
|
workflowCommand.command("list").alias("ls").description("Verf\xFCgbare Workflows anzeigen").action(async () => {
|
|
@@ -14337,7 +14370,7 @@ async function executeStep(step) {
|
|
|
14337
14370
|
}
|
|
14338
14371
|
|
|
14339
14372
|
// src/commands/advanced/hook.ts
|
|
14340
|
-
import { Command as
|
|
14373
|
+
import { Command as Command34 } from "commander";
|
|
14341
14374
|
import { existsSync as existsSync21, readFileSync as readFileSync10, writeFileSync as writeFileSync10, mkdirSync as mkdirSync6 } from "fs";
|
|
14342
14375
|
import { homedir as homedir8 } from "os";
|
|
14343
14376
|
import { join as join13 } from "path";
|
|
@@ -14372,7 +14405,7 @@ function removeShivaHooks(eventHooks) {
|
|
|
14372
14405
|
(entry) => !entry.hooks?.some((h) => h.command?.includes("shiva"))
|
|
14373
14406
|
);
|
|
14374
14407
|
}
|
|
14375
|
-
var hookCommand = new
|
|
14408
|
+
var hookCommand = new Command34("hook").description("Claude Code Hook Integration verwalten");
|
|
14376
14409
|
hookCommand.command("install").description("SHIVA Hooks in Claude Code installieren").option("--github", "GitHub Context Injection aktivieren").option("--sync", "Cloud Sync Hooks aktivieren (Standard)").option("--scan", "Package Security Scanning aktivieren").option("--all", "Alle Hooks aktivieren").action((options) => {
|
|
14377
14410
|
log.brand();
|
|
14378
14411
|
const claudePath = join13(homedir8(), ".claude");
|
|
@@ -14708,11 +14741,11 @@ hookCommand.command("scan-command").description("Scanne Bash-Befehle auf Package
|
|
|
14708
14741
|
});
|
|
14709
14742
|
|
|
14710
14743
|
// src/commands/advanced/package.ts
|
|
14711
|
-
import { Command as
|
|
14744
|
+
import { Command as Command35 } from "commander";
|
|
14712
14745
|
import * as fs14 from "fs";
|
|
14713
14746
|
import inquirer13 from "inquirer";
|
|
14714
14747
|
import ora21 from "ora";
|
|
14715
|
-
var packageCommand = new
|
|
14748
|
+
var packageCommand = new Command35("package").description("Projekt-Gruppen (Packages) verwalten").action(() => {
|
|
14716
14749
|
listPackages();
|
|
14717
14750
|
});
|
|
14718
14751
|
packageCommand.command("list").description("Alle Packages auflisten").option("--json", "JSON Output").action((options) => {
|
|
@@ -14895,8 +14928,8 @@ function listPackages() {
|
|
|
14895
14928
|
}
|
|
14896
14929
|
|
|
14897
14930
|
// src/index.ts
|
|
14898
|
-
var program = new
|
|
14899
|
-
program.name("shiva").description("SHIVA Code - Control Station for Claude Code").version("0.5.
|
|
14931
|
+
var program = new Command36();
|
|
14932
|
+
program.name("shiva").description("SHIVA Code - Control Station for Claude Code").version("0.5.2");
|
|
14900
14933
|
program.addCommand(loginCommand);
|
|
14901
14934
|
program.addCommand(logoutCommand);
|
|
14902
14935
|
program.addCommand(sessionsCommand);
|
|
@@ -14924,6 +14957,7 @@ program.addCommand(contextCommand);
|
|
|
14924
14957
|
program.addCommand(tagsCommand);
|
|
14925
14958
|
program.addCommand(exportCommand);
|
|
14926
14959
|
program.addCommand(importCommand);
|
|
14960
|
+
program.addCommand(rememberCommand);
|
|
14927
14961
|
program.addCommand(statsCommand);
|
|
14928
14962
|
program.addCommand(doctorCommand);
|
|
14929
14963
|
program.addCommand(upgradeCommand);
|