@rayul/kordis 0.0.1 → 0.1.0
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 +12 -0
- package/dist/index.js +14 -3
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -21,6 +21,18 @@ kordis setup
|
|
|
21
21
|
|
|
22
22
|
`kordis setup` injects a guide block into your agent tools' global instruction files (`~/.claude/CLAUDE.md`, `~/.codex/AGENTS.md`, `~/.gemini/GEMINI.md`) so the agent recognises `kordis` automatically in future sessions. The injection is idempotent — safe to re-run.
|
|
23
23
|
|
|
24
|
+
> **Restart your agent session** after the first install. Long-lived sessions (Claude Code, Codex, Gemini) read those instruction files at session start, so the newly injected guide only takes effect from the next session onward.
|
|
25
|
+
|
|
26
|
+
### Troubleshooting
|
|
27
|
+
|
|
28
|
+
`npm install` fails with `EACCES … Your cache folder contains root-owned files`? That's a leftover from a past `sudo npm install` on the same machine — not specific to `kordis`. Fix once with:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
sudo chown -R "$(id -u):$(id -g)" ~/.npm
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Then re-run the install — no `sudo` needed.
|
|
35
|
+
|
|
24
36
|
## Commands
|
|
25
37
|
|
|
26
38
|
| command | purpose |
|
package/dist/index.js
CHANGED
|
@@ -956,12 +956,12 @@ async function loadCliConfig() {
|
|
|
956
956
|
const raw = await readFile(configPath(), "utf8");
|
|
957
957
|
const parsed = JSON.parse(raw);
|
|
958
958
|
return {
|
|
959
|
-
apiUrl: apiUrlFromEnv ?? parsed.apiUrl ?? "https://api.kordis.
|
|
959
|
+
apiUrl: apiUrlFromEnv ?? parsed.apiUrl ?? "https://api.kordis.store",
|
|
960
960
|
...parsed.username ? { username: parsed.username } : {},
|
|
961
961
|
...parsed.sessionId ? { sessionId: parsed.sessionId } : {}
|
|
962
962
|
};
|
|
963
963
|
} catch {
|
|
964
|
-
return { apiUrl: apiUrlFromEnv ?? "https://api.kordis.
|
|
964
|
+
return { apiUrl: apiUrlFromEnv ?? "https://api.kordis.store" };
|
|
965
965
|
}
|
|
966
966
|
}
|
|
967
967
|
async function saveCliConfig(cfg) {
|
|
@@ -2384,6 +2384,7 @@ function setupCommand() {
|
|
|
2384
2384
|
throw err;
|
|
2385
2385
|
}
|
|
2386
2386
|
let anyFound = false;
|
|
2387
|
+
const changedTools = [];
|
|
2387
2388
|
for (const target of TARGETS) {
|
|
2388
2389
|
const dirPath = join4(home, target.dir);
|
|
2389
2390
|
const filePath = join4(home, target.file);
|
|
@@ -2396,6 +2397,8 @@ function setupCommand() {
|
|
|
2396
2397
|
anyFound = true;
|
|
2397
2398
|
try {
|
|
2398
2399
|
const result = await injectBlock(filePath, guideContent, dryRun);
|
|
2400
|
+
if (result !== "unchanged") changedTools.push(target.tool);
|
|
2401
|
+
if (opts.silent) continue;
|
|
2399
2402
|
const label = `${target.tool.padEnd(12)}`;
|
|
2400
2403
|
const dest = `~/${target.file}`;
|
|
2401
2404
|
if (result === "unchanged") {
|
|
@@ -2410,7 +2413,15 @@ function setupCommand() {
|
|
|
2410
2413
|
printHuman(c.red(` \u2717 ${target.tool}: ${err.message}`));
|
|
2411
2414
|
}
|
|
2412
2415
|
}
|
|
2413
|
-
if (
|
|
2416
|
+
if (opts.silent) {
|
|
2417
|
+
if (changedTools.length > 0 && !dryRun) {
|
|
2418
|
+
printHuman(
|
|
2419
|
+
c.green("\u2713 kordis") + ` registered with ${changedTools.join(", ")} \xB7 restart your agent session to apply`
|
|
2420
|
+
);
|
|
2421
|
+
}
|
|
2422
|
+
return;
|
|
2423
|
+
}
|
|
2424
|
+
if (!anyFound) {
|
|
2414
2425
|
printHuman(c.gray("No supported agent tools detected."));
|
|
2415
2426
|
printHuman(c.gray("Run `kordis setup` again after installing Claude Code, Codex, or Gemini CLI."));
|
|
2416
2427
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rayul/kordis",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.1.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Command-line client for the Kordis registry — discover, install, and publish agentic-coding packages.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"build": "tsup && mkdir -p assets && cp ../../packages/skills/KORDIS.md assets/KORDIS.md",
|
|
21
21
|
"typecheck": "tsc --noEmit",
|
|
22
22
|
"test": "vitest run",
|
|
23
|
-
"postinstall": "node ./bin/kordis.js setup --silent
|
|
23
|
+
"postinstall": "node ./bin/kordis.js setup --silent"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@iarna/toml": "^2.2.5",
|