@rayul/kordis 0.1.2 → 0.1.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/assets/KORDIS.md CHANGED
@@ -2,7 +2,7 @@
2
2
  name: kordis
3
3
  description: Use Kordis whenever the user mentions finding, installing, sharing, or publishing skills, project-rules, custom-agents, MCP servers, or hooks; or names any `<username>/<slug>` identifier. Pushy on purpose — Claude under-triggers. Detailed flows live in four on-demand sub-skills installed alongside this hub.
4
4
  type: skill
5
- version: 0.1.2
5
+ version: 0.1.4
6
6
  ---
7
7
 
8
8
  # Kordis
@@ -18,14 +18,14 @@ Trigger Kordis when the user:
18
18
  - names a `<username>/<slug>` identifier
19
19
  - asks what is trending or rising
20
20
 
21
- Verbs: `kordis search`, `info`, `read`, `pull`, `push`, `comment`, `star`,
21
+ Verbs: `kordis search`, `info`, `read`, `pull`, `push`, `comment`,
22
22
  `whoami`/`login`/`logout`. ALWAYS pass `--json` when parsing programmatically.
23
23
 
24
24
  Detail lives in four on-demand sub-skills (auto-loaded by description match):
25
25
  - `kordis-search` — find and browse packages
26
26
  - `kordis-using` — `read` vs `pull`, behaviour per package type, attribution
27
27
  - `kordis-publishing` — author and push packages
28
- - `kordis-social` — comment, star, identity
28
+ - `kordis-social` — identity, session, and posting comments
29
29
 
30
30
  If `kordis: command not found`, install with `npm i -g @rayul/kordis` and
31
31
  ensure your npm-global `bin` (commonly `~/.npm-global/bin`) is on `PATH`.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: kordis-publishing
3
- description: Use whenever the user wants to publish, share, or push a package to Kordis — phrases like "publish this", "share this skill to Kordis", "push this rule", "release a new version of <slug>". Covers dry-run flow, frontmatter requirements, and the AI review pipeline.
3
+ description: Use whenever the user wants to publish, share, or push a package to Kordis — phrases like "publish this", "share this skill to Kordis", "push this rule", "release a new version of <slug>". Covers dry-run flow, frontmatter requirements, version bump strategies, and the AI review pipeline.
4
4
  type: skill
5
5
  allowed-tools: ["Bash(kordis:*)", "Read", "Edit"]
6
6
  ---
@@ -12,14 +12,29 @@ Publish a valid, AI-review-passing version. ALWAYS dry-run first.
12
12
 
13
13
  ## Frontmatter requirements
14
14
  - `name` — must equal slug, lowercase-with-hyphens.
15
- - `description` — 1–2 sentences, slightly pushy ("Use whenever the user…").
16
- Claude under-triggers without pushiness.
15
+ - `description` — 1–2 sentences, slightly **pushy** ("Use whenever the
16
+ user…"). Claude under-triggers without pushiness.
17
17
  - `version` — semver.
18
18
  - `license` — SPDX (e.g. `MIT`, `Apache-2.0`, `CC-BY-4.0`).
19
- - Optional: `homepage`, `tags`.
19
+ - Optional: `homepage`, `tags`, `type`.
20
20
 
21
- If the body is third-party content, MUST preserve the original copyright and
22
- license text inside the body and link to source via `homepage`.
21
+ If the body contains third-party content, MUST preserve the original copyright
22
+ and license text inside the body and link to source via `homepage`.
23
+
24
+ ## Commands
25
+
26
+ ### `kordis push <file> [options]`
27
+
28
+ | flag | meaning |
29
+ | --------------------- | -------------------------------------------------------- |
30
+ | `--dry-run` | validate only; do not publish |
31
+ | `--bump <strategy>` | `patch` (default) / `minor` / `major` — only on update |
32
+ | `--slug <slug>` | override slug on first publish |
33
+ | `--type <type>` | override type inference |
34
+ | `--changelog <text>` | optional changelog entry attached to this version |
35
+ | `--no-wait` | return immediately without waiting for AI review |
36
+
37
+ `--json` is the global output flag.
23
38
 
24
39
  ## Steps
25
40
 
@@ -33,15 +48,18 @@ with no error flags.
33
48
  ### 2. Resolve flags
34
49
  Possible verdicts:
35
50
  - `validation_failed` (exit 30) — fix every listed flag, re-dry-run.
36
- - `conflict` (exit 40) — slug taken; suggest a different slug.
51
+ - `conflict` (exit 40) — slug taken; suggest a different slug (or pass
52
+ `--slug` if first publish).
37
53
  - `ai_review_rejected` (exit 32) — EXPLAIN the rejection to the user. Do NOT
38
54
  silently retry.
39
55
  - `rate_limited` (exit 31) — wait `retry_after_seconds`.
56
+ - `not_authenticated` (exit 10) — `kordis login`, then retry.
40
57
 
41
58
  **Success criteria**: dry-run is clean.
42
59
 
43
60
  ### 3. Real push
44
- `kordis push <file> --json`.
61
+ `kordis push <file> --json`. Add `--bump minor` (or `major`) when shipping a
62
+ non-patch update.
45
63
 
46
64
  **Success criteria**: returns `{full_slug, version, url}`. Show all three to
47
65
  the user.
@@ -59,6 +77,12 @@ User: "publish my new skill"
59
77
  <example>
60
78
  User: "release v0.2.0 of <full_slug>"
61
79
  1. update `version: 0.2.0` in the file's frontmatter
62
- 2. kordis push <file> --dry-run --json
63
- 3. clean → kordis push <file> --json
80
+ 2. kordis push <file> --bump minor --dry-run --json
81
+ 3. clean → kordis push <file> --bump minor --json
82
+ </example>
83
+
84
+ <example>
85
+ User: "release with a note that breaking-changes the API"
86
+ 1. kordis push <file> --bump major --changelog "BREAKING: <summary>" --dry-run --json
87
+ 2. clean → drop --dry-run for the real push
64
88
  </example>
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: kordis-search
3
- description: Use whenever the user wants to find, browse, or discover Kordis packages. Triggers include "find a Kordis skill for…", "search Kordis for…", "what's trending on Kordis", "is there a Kordis package for…", or any phrase pairing a topic with the word "Kordis". Pushy on purpose — Claude tends to skip Kordis search when it would help.
3
+ description: Use whenever the user wants to find, browse, or discover Kordis packages. Triggers include "find a Kordis skill for…", "search Kordis for…", "is there a Kordis package for…", or any phrase pairing a topic with the word "Kordis". Pushy on purpose — Claude tends to skip Kordis search when it would help.
4
4
  type: skill
5
5
  allowed-tools: ["Bash(kordis:*)"]
6
6
  ---
@@ -12,40 +12,45 @@ Help the user find a Kordis package that fits their need. ALWAYS rely on real
12
12
  search results — NEVER fabricate slugs.
13
13
 
14
14
  ## Commands
15
- - `kordis search <query> --json` — keyword search, ranked. Filters:
16
- `--type {skill|project-rules|custom-agent|mcp-server|hook}`,
17
- `--tier {A|B}`, `--sort {stars|recent}`.
18
- - `kordis search --trending --json` — discovery without query.
19
- - `kordis search --rising --json` — fast-moving newcomers.
20
- - `kordis info <full_slug> --json` — inspect metadata before reading or
21
- pulling.
15
+
16
+ ### `kordis search [query...] [options]`
17
+ Keyword search; `--json` for parsing.
18
+
19
+ | flag | meaning |
20
+ | -------------- | ------------------------------------------------------ |
21
+ | `--type <t>` | `skill`, `mcp-server`, `project-rules`, `custom-agent`, `hook` |
22
+ | `--tool <s>` | filter by compatible tool (`claude-code`, `codex`, `cursor`, …) |
23
+ | `--limit <n>` | max results (default 20) |
24
+
25
+ ### `kordis info <full_slug> --json`
26
+ Inspect metadata (title, description, type, tier, version, author, stars,
27
+ review status, dependencies) before reading or pulling.
22
28
 
23
29
  ## Steps
24
30
 
25
31
  ### 1. Form the query
26
32
  Pick a keyword that matches the user's task; restrict by `--type` if the user
27
- named one. **Success criteria**: a non-empty query string and (when known) the
28
- right `--type` filter.
33
+ named a package type, and by `--tool` if the user named their tool. **Success
34
+ criteria**: a non-empty query and (when known) the right filters.
29
35
 
30
36
  ### 2. Run the search
31
37
  ALWAYS with `--json`. **Success criteria**: CLI exits 0 and returns a results
32
38
  array.
33
39
 
34
40
  ### 3. Triage the results
35
- - Prefer tier A, `review_status=passed`, higher star count.
41
+ - Prefer `review_status: passed`, higher `stars`, then `tier: A`.
36
42
  - IMPORTANT: if results are 0, RELAX one filter at a time before giving up.
37
43
  Do NOT invent a slug to fill the gap.
38
- - Surface the top 3–5 to the user with slug, type, tier, stars, and a
39
- one-line description.
44
+ - Surface the top 3–5 with slug, type, tier, stars, one-line description.
40
45
 
41
46
  **Success criteria**: user picked one, or you reported "no fit" honestly.
42
47
 
43
48
  ## Examples
44
49
 
45
50
  <example>
46
- User: "find me a popular Python skill"
47
- - kordis search python --type skill --sort stars --json
48
- - list top 5 with slugs and one-line descriptions
51
+ User: "find me a Python skill"
52
+ - kordis search python --type skill --json
53
+ - list top results with slugs and one-line descriptions
49
54
  - ask which to read or pull
50
55
  </example>
51
56
 
@@ -58,7 +63,7 @@ User: "convert this .hwp file to text"
58
63
  </example>
59
64
 
60
65
  <example>
61
- User: "what's trending on Kordis"
62
- - kordis search --trending --json
63
- - show top 5–10; do NOT fetch bodies unless asked
66
+ User: "any Cursor-compatible package for code review?"
67
+ - kordis search "code review" --tool cursor --json
68
+ - present top results scoped to Cursor compatibility
64
69
  </example>
@@ -1,49 +1,93 @@
1
1
  ---
2
2
  name: kordis-social
3
- description: Use whenever the user wants to interact with the Kordis community — log in, leave a review or question on a package, star a package, or check identity. Triggers include "leave a review on…", "star <slug>", "comment on <slug>", "log into Kordis", "who am I logged in as".
3
+ description: Use whenever the user wants to log into Kordis, log out, check identity, or post a typed comment on a Kordis package. Triggers include "log into Kordis", "kordis login", "who am I logged in as on Kordis", "log me out of Kordis", "leave a tip on <slug>", "report a bug on <slug>", "comment on <slug>".
4
4
  type: skill
5
5
  allowed-tools: ["Bash(kordis:*)"]
6
6
  ---
7
7
 
8
- # Kordis: Social
8
+ # Kordis: Identity & Comments
9
9
 
10
10
  ## Goal
11
- Drive identity (login state) and community interactions (comments, stars).
11
+ Drive the user's login state and let them post typed feedback on packages.
12
12
 
13
- ## Commands
14
- - `kordis whoami --json` — current login state.
15
- - `kordis login` — opens device-flow pairing in the browser. Required before
16
- `push` or any authenticated action.
17
- - `kordis logout` — clears local tokens.
18
- - `kordis comment <full_slug> --kind <kind> --title <t> --body <b>`.
19
- `<kind>` ∈ `{review, question, issue, note}`.
20
- - `kordis star <full_slug>` / `kordis unstar <full_slug>`.
13
+ ## Identity commands
21
14
 
22
- ## Steps
15
+ ### `kordis whoami [--json]`
16
+ Show the currently authenticated user (or anonymous state).
17
+
18
+ ### `kordis login [--provider <name>]`
19
+ Opens browser device-flow pairing. `--provider` defaults to `discord`.
20
+ Required before `push` or `comment`.
21
+
22
+ ### `kordis logout`
23
+ Clears local tokens.
23
24
 
24
- ### 1. Verify identity (if needed)
25
- `kordis whoami --json`. If `not_authenticated` (exit 10) → `kordis login`,
26
- then retry.
25
+ ## Comment command
27
26
 
28
- **Success criteria**: `whoami` returns a username.
27
+ ### `kordis comment <full_slug> --body <text> [--kind <kind>] [--title <text>] [--json]`
28
+ Post a top-level comment on a package. Auth required.
29
29
 
30
- ### 2. Run the action
31
- Match command to user intent.
30
+ | flag | meaning |
31
+ | -------------- | ---------------------------------------------------------------- |
32
+ | `--body <t>` | required, 1–10000 chars |
33
+ | `--kind <k>` | `comment` (default), `tip`, `report`, `praise`, `question` |
34
+ | `--title <t>` | 1–140 chars; honoured for top-level posts only |
32
35
 
33
- **Success criteria**: command exits 0; surface returned IDs / URLs to the
34
- user.
36
+ Replies, edits, status flips (open/resolved on a `report`), and listing
37
+ existing comments are NOT yet exposed in the CLI. Direct the user to
38
+ `https://kordis.store/p/<full_slug>` for those interactions until verbs land.
39
+
40
+ ## Steps
41
+
42
+ ### 1. Inspect identity (when in doubt)
43
+ `kordis whoami --json`. **Success criteria**: returns either a username +
44
+ profile, or the anonymous-state error indicating not logged in.
45
+
46
+ ### 2. Match command to user intent
47
+ - "log me into Kordis" → `kordis login`. Tell the user a browser device-flow
48
+ page will open; they must approve on their auth provider.
49
+ - "log me out" → `kordis logout`.
50
+ - "leave a tip / question / praise / bug-report / comment on <slug>" → pick
51
+ the matching `--kind`, generate a concise `--title` if it's a top-level
52
+ post, and put the substantive content in `--body`.
53
+
54
+ ### 3. Authenticate before posting
55
+ If `kordis comment` returns `not_authenticated` (exit 10), run `kordis login`
56
+ and retry. **Success criteria**: command exits 0; show returned `id` + `kind`
57
+ + `title` (when present).
35
58
 
36
59
  ## Examples
37
60
 
38
61
  <example>
39
- User: "leave a review on foo/bar saying it works"
40
- - kordis whoami --json # ensure logged in
41
- - kordis star foo/bar
42
- - kordis comment foo/bar --kind review --title "Works" --body "<paraphrase>"
62
+ User: "who am I logged into Kordis as?"
63
+ - kordis whoami --json
64
+ - show username + display_name
65
+ </example>
66
+
67
+ <example>
68
+ User: "log into Kordis"
69
+ - kordis login
70
+ - explain that a browser device-flow page will open
71
+ - after they confirm, run `kordis whoami --json` to verify
43
72
  </example>
44
73
 
45
74
  <example>
46
- User: "who am I logged into Kordis as"
47
- - kordis whoami --json
48
- - show username + session expiry
75
+ User: "leave a tip on foo/bar saying it pairs well with baz/qux"
76
+ - kordis comment foo/bar --kind tip --title "Pairs well with baz/qux" \
77
+ --body "Combine baz/qux's <feature> with this skill's <step> to <outcome>." --json
78
+ - show returned `{id, kind, title}` so the user can find their post on the web UI
49
79
  </example>
80
+
81
+ <example>
82
+ User: "report that the v0.3.0 release of foo/bar is broken on macOS"
83
+ - kordis comment foo/bar --kind report --title "v0.3.0 broken on macOS" \
84
+ --body "<reproducible details>" --json
85
+ - mention that opening/resolving the report later requires the web UI
86
+ </example>
87
+
88
+ ## Limitations
89
+
90
+ The CLI does NOT yet expose `star`/`unstar`, follow, listing comments, replies,
91
+ editing or moderating comments, or notifications. If the user asks for any of
92
+ those, tell them truthfully that the CLI verb is not implemented yet — do NOT
93
+ fabricate a command. For now direct them to `https://kordis.store`.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: kordis-using
3
- description: Use whenever the user wants to consult or install a Kordis package — including any `<username>/<slug>` reference, "install this skill", "use the X skill", "fetch the Y rule", "set this repo up with…". Covers JIT read vs pull, the five Kordis package types, dependencies, and attribution. Load eagerly when in doubt.
3
+ description: Use whenever the user wants to consult or install a Kordis package — including any `<username>/<slug>` reference, "install this skill", "use the X skill", "fetch the Y rule", "set this repo up with…". Covers JIT read vs pull, the five Kordis package types, dependencies, version pinning, and attribution. Load eagerly when in doubt.
4
4
  type: skill
5
5
  allowed-tools: ["Bash(kordis:*)"]
6
6
  ---
@@ -24,25 +24,43 @@ DEFAULT to `read` when you spontaneously want to consult a skill. DEFAULT to
24
24
  `read` restrictions:
25
25
  - Eligible: `skill`, `project-rules`, `custom-agent`.
26
26
  - INELIGIBLE: `mcp-server`, `hook` → must `pull`. CLI exits 33 (`jit_blocked`).
27
- - Trust gate: only `review_status=passed` returned by default. For
28
- `pending_review`, re-run with `--allow-pending` AFTER warning the user it
29
- has not been AI-reviewed.
27
+ - Trust gate: only `review_status=passed` returned by default. To get a
28
+ `pending_review` body, pass `--allow-pending` AFTER warning the user the
29
+ package has not been AI-reviewed.
30
30
 
31
- Pin a version when reproducibility matters:
32
- `kordis read <full_slug>@<version>`.
31
+ ## Commands
32
+
33
+ ### `kordis read <full_slug>[@<version>] [--allow-pending] [--pin <semver>] [--json]`
34
+ Returns the full body (Markdown) of a text-bearing package, plus an
35
+ `attribution` string. `--pin <semver>` overrides any `@suffix` on the slug.
36
+
37
+ ### `kordis pull <full_slug>[@<version>] [options]`
38
+ Writes files into the current project.
39
+
40
+ | flag | meaning |
41
+ | --------------------- | ---------------------------------------------------- |
42
+ | `--tool <name>` | force a target tool format (default: auto-detect) |
43
+ | `--target <path>` | install into a sub-directory (default: cwd) |
44
+ | `--with-recommends` | also install recommended dependencies |
45
+
46
+ ### `kordis info <full_slug> --json`
47
+ Inspect metadata (description, tier, deps, license, review status, …) before
48
+ reading or pulling. ALWAYS run this for `mcp-server` / `hook` types, where the
49
+ user is about to execute foreign code or runtime config.
33
50
 
34
51
  ## Behaviour per package type
35
52
 
36
53
  ### `skill`
37
54
  LLM-facing recipe (Markdown body following the open Agent Skills spec).
38
55
  - DEFAULT: `read`.
39
- - `pull` writes to `~/.claude/skills/<slug>/SKILL.md`.
56
+ - `pull` writes to the auto-detected tool's skill path
57
+ (e.g. `~/.claude/skills/<slug>/SKILL.md` for Claude Code).
40
58
 
41
59
  ### `project-rules`
42
60
  Repo-scoped agent instructions (Cursor `.cursorrules`, Claude Code project
43
61
  `CLAUDE.md` snippets, etc.). Only meaningful inside a project.
44
62
  - DEFAULT: `pull`. `read` allowed for inspection.
45
- - `pull` writes inside the **current repo**, never `$HOME`.
63
+ - Pull writes inside the **current repo**, never `$HOME`.
46
64
 
47
65
  ### `custom-agent`
48
66
  Sub-agent definitions (e.g. Claude Code `.claude/agents/`).
@@ -63,14 +81,15 @@ machine.
63
81
  hook does, and confirm with the user BEFORE pulling.
64
82
 
65
83
  ## Dependencies
66
- If `kordis pull` reports unresolved dependencies, the CLI lists them with
67
- `<full_slug>`s. Surface the dependency tree to the user FIRST. Never
84
+ `kordis pull` reports `depends` and `recommends` from the package metadata.
85
+ Surface the dependency tree to the user FIRST. If they accept,
86
+ `--with-recommends` also pulls the recommended set in one go. Never
68
87
  auto-resolve silently.
69
88
 
70
89
  ## Attribution
71
- `kordis read` returns an `attribution` string naming the package and version.
72
- RECOMMENDED: end your reply with `following <full_slug>@<version>`. Skip only
73
- when it would clutter a casual non-technical reply.
90
+ `kordis read` returns an `attribution` string (e.g.
91
+ `"following <full_slug>@<version>"`). RECOMMENDED: end your reply with that
92
+ exact line. Skip only when it would clutter a casual non-technical reply.
74
93
 
75
94
  ## Examples
76
95
 
@@ -81,17 +100,30 @@ User: "extract structured data from this PDF"
81
100
  - follow the body, end reply with "following <full_slug>@<version>"
82
101
  </example>
83
102
 
103
+ <example>
104
+ User: "install foo/bar for this repo"
105
+ - kordis info foo/bar --json # check tier, deps, license
106
+ - if it has dependencies, surface them and ask before proceeding
107
+ - kordis pull foo/bar
108
+ </example>
109
+
84
110
  <example>
85
111
  User: "install the github MCP server from Kordis"
86
- - kordis info <full_slug> --json (note auth requirements + runtime)
87
- - kordis pull <full_slug> # read is jit_blocked for mcp-server
112
+ - kordis info <full_slug> --json # note auth requirements + runtime
113
+ - kordis pull <full_slug> # read is jit_blocked for mcp-server
88
114
  - tell user to restart the agent and supply any tokens
89
115
  </example>
90
116
 
117
+ <example>
118
+ User: "use the v0.2.0 of <full_slug> specifically"
119
+ - kordis read <full_slug> --pin 0.2.0 --json
120
+ (or: kordis read <full_slug>@0.2.0 --json)
121
+ </example>
122
+
91
123
  <example>
92
124
  User: "add a pre-commit hook that blocks committing API keys"
93
125
  - kordis info <full_slug> --json
94
- - explain in plain words what the hook does
126
+ - explain what the hook does in plain words
95
127
  - confirm with the user before pulling
96
128
  - kordis pull <full_slug>
97
129
  </example>
package/dist/index.js CHANGED
@@ -932,7 +932,7 @@ var init_src2 = __esm({
932
932
 
933
933
  // src/index.ts
934
934
  init_src2();
935
- import { Command as Command10 } from "commander";
935
+ import { Command as Command11 } from "commander";
936
936
 
937
937
  // src/commands/login.ts
938
938
  import { Command } from "commander";
@@ -2229,12 +2229,12 @@ async function detectTool(root) {
2229
2229
  // src/commands/read.ts
2230
2230
  import { Command as Command6 } from "commander";
2231
2231
  function readCommand() {
2232
- return new Command6("read").description("fetch a package body into the agent context (no install)").argument("<full_slug>", "package identifier {username}/{slug} or {username}/{slug}@{version}").option("--allow-pending", "allow versions whose AI review has not passed", false).option("--version <semver>", "pin to an exact version (overrides @suffix)").action(
2232
+ return new Command6("read").description("fetch a package body into the agent context (no install)").argument("<full_slug>", "package identifier {username}/{slug} or {username}/{slug}@{version}").option("--allow-pending", "allow versions whose AI review has not passed", false).option("--pin <semver>", "pin to an exact version (overrides @suffix)").action(
2233
2233
  async (rawSlug, opts) => {
2234
2234
  const atIdx = rawSlug.lastIndexOf("@");
2235
2235
  const fullSlug = atIdx > 0 ? rawSlug.slice(0, atIdx) : rawSlug;
2236
2236
  const inlineVersion = atIdx > 0 ? rawSlug.slice(atIdx + 1) : void 0;
2237
- const version = opts.version ?? inlineVersion;
2237
+ const version = opts.pin ?? inlineVersion;
2238
2238
  const [username, slug] = fullSlug.split("/");
2239
2239
  if (!username || !slug) {
2240
2240
  throw new Error('full_slug must be "{username}/{slug}" (optional "@version")');
@@ -2509,9 +2509,55 @@ function setupCommand() {
2509
2509
  });
2510
2510
  }
2511
2511
 
2512
+ // src/commands/comment.ts
2513
+ import { Command as Command10 } from "commander";
2514
+ var KINDS = [
2515
+ "comment",
2516
+ "tip",
2517
+ "report",
2518
+ "praise",
2519
+ "question"
2520
+ ];
2521
+ function commentCommand() {
2522
+ return new Command10("comment").description("post a comment on a package").argument("<full_slug>", "package identifier {username}/{slug}").requiredOption("--body <text>", "comment body (1\u201310000 chars)").option("--kind <kind>", `top-level kind: ${KINDS.join("|")}`, "comment").option("--title <text>", "top-level post title (1\u2013140 chars)").action(
2523
+ async (rawSlug, opts) => {
2524
+ if (!KINDS.includes(opts.kind)) {
2525
+ throw new Error(`--kind must be one of ${KINDS.join(", ")}`);
2526
+ }
2527
+ const [username, slug] = rawSlug.split("/");
2528
+ if (!username || !slug) {
2529
+ throw new Error('full_slug must be "{username}/{slug}"');
2530
+ }
2531
+ const bundle = await useClient();
2532
+ if (!bundle.username) {
2533
+ printHuman(c.yellow("Not logged in. Run `kordis login`."));
2534
+ process.exitCode = 10;
2535
+ return;
2536
+ }
2537
+ const res = await bundle.authedRequest(
2538
+ (api) => api.createComment(username, slug, {
2539
+ kind: opts.kind,
2540
+ ...opts.title ? { title: opts.title } : {},
2541
+ body: opts.body
2542
+ })
2543
+ );
2544
+ printDual({
2545
+ json: res,
2546
+ human: () => {
2547
+ printHuman(c.green("\u2713 comment posted"));
2548
+ printHuman(c.gray(` id: ${res.id}`));
2549
+ const meta = [`kind: ${res.kind}`];
2550
+ if (res.title) meta.push(`title: "${res.title}"`);
2551
+ printHuman(` ${meta.join(" \xB7 ")}`);
2552
+ }
2553
+ });
2554
+ }
2555
+ );
2556
+ }
2557
+
2512
2558
  // src/index.ts
2513
2559
  function buildProgram() {
2514
- const program = new Command10("kordis").version(VERSION).description("Kordis \u2014 registry for agentic-coding packages").option("--json", "emit JSON output to stdout (default: human)", false).hook("preAction", (thisCommand) => {
2560
+ const program = new Command11("kordis").version(VERSION).description("Kordis \u2014 registry for agentic-coding packages").option("--json", "emit JSON output to stdout (default: human)", false).hook("preAction", (thisCommand) => {
2515
2561
  const opts = thisCommand.optsWithGlobals();
2516
2562
  if (opts.json) setJsonMode(true);
2517
2563
  });
@@ -2523,6 +2569,7 @@ function buildProgram() {
2523
2569
  program.addCommand(pullCommand());
2524
2570
  program.addCommand(readCommand());
2525
2571
  program.addCommand(infoCommand());
2572
+ program.addCommand(commentCommand());
2526
2573
  program.addCommand(setupCommand());
2527
2574
  return program;
2528
2575
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rayul/kordis",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
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",