yarkr-cli 1.0.0 → 1.0.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/README.md +44 -12
- package/dist/yarkr.js +17 -15
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -4,29 +4,61 @@ Install skills, agents and MCP toolsets from [Yarkr](https://yarkr.com) into the
|
|
|
4
4
|
Claude Code, Codex, opencode, Cursor and more.
|
|
5
5
|
|
|
6
6
|
```sh
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
npm install -g yarkr-cli # Node 22 or newer; or run any command with `npx yarkr-cli …`
|
|
8
|
+
yarkr add posterus-ltd/code-review-checklist # a public package, no account needed
|
|
9
|
+
yarkr add posterus-ltd/github --harness codex # pick the harnesses to write
|
|
9
10
|
```
|
|
10
11
|
|
|
11
|
-
|
|
12
|
+
## Sync an ark to your machine
|
|
13
|
+
|
|
14
|
+
An ark is a curated set of skills, agents and toolsets hosted in the registry. `yarkr sync` writes each one into the
|
|
15
|
+
harness's own layout (`~/.claude/skills/…`, `~/.agents/…`, MCP configs and so on):
|
|
16
|
+
|
|
17
|
+
```sh
|
|
18
|
+
yarkr arks # list public arks
|
|
19
|
+
yarkr sync acme/starter # install one into this folder
|
|
20
|
+
yarkr sync acme/starter -g # …or into your home directory
|
|
21
|
+
yarkr sync acme/starter --harness claude-code # only write Claude Code's files
|
|
22
|
+
yarkr ark # what your arks give you, and which version
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Signed in, a bare `yarkr sync` installs every ark you're a member of, plus your personal ark. Run it again to pick up
|
|
26
|
+
whatever an admin added or removed; `yarkr sync --check` exits 1 when you're behind.
|
|
27
|
+
|
|
28
|
+
## Set up an existing repo
|
|
29
|
+
|
|
30
|
+
In a project, `yarkr init` creates `yarkr.json` (and `.yarkrrc`), detecting the harnesses already used there.
|
|
31
|
+
`yarkr add` and `yarkr sync` then pin every package in `yarkr.lock`, so teammates and CI get the same releases:
|
|
12
32
|
|
|
13
33
|
```sh
|
|
14
|
-
|
|
15
|
-
yarkr init
|
|
34
|
+
cd my-repo
|
|
35
|
+
yarkr init --ark acme/engineering # optional: install a team's ark into this project
|
|
16
36
|
yarkr add posterus-ltd/playwright-test-authoring
|
|
17
|
-
|
|
37
|
+
git add yarkr.json yarkr.lock .yarkrrc .claude AGENTS.md && git commit
|
|
38
|
+
yarkr sync --check # in CI: exit 1 when anything is out of date
|
|
18
39
|
```
|
|
19
40
|
|
|
20
|
-
|
|
21
|
-
(a skill that's a single markdown file, or a folder with a README instead of
|
|
22
|
-
at the root, and nothing has to move:
|
|
41
|
+
To publish from the repo instead, there's nothing to init: Yarkr finds `SKILL.md` folders, `agents/*.md` and
|
|
42
|
+
`.mcp.json` on its own. Anything else (a skill that's a single markdown file, or a folder with a README instead of
|
|
43
|
+
SKILL.md) goes in one `yarkr.index.yaml` at the root, and nothing has to move. Lint it before you push:
|
|
23
44
|
|
|
24
45
|
```sh
|
|
46
|
+
yarkr lint # what will be published, and what the hub would refuse
|
|
47
|
+
yarkr lint --strict # in CI: fail on warnings too
|
|
25
48
|
yarkr guide index-repo -o ~/.claude/skills/index-repo/ # a skill your agent uses to write the index
|
|
26
|
-
yarkr lint # what will be published, and what's wrong
|
|
27
49
|
```
|
|
28
50
|
|
|
29
|
-
|
|
30
|
-
|
|
51
|
+
## Sign in for private packages
|
|
52
|
+
|
|
53
|
+
Public packages and public arks work signed out. Your org's private packages and arks need a token:
|
|
54
|
+
|
|
55
|
+
```sh
|
|
56
|
+
yarkr login # signs in in the browser; the token goes to your keychain (or ~/.yarkrrc)
|
|
57
|
+
yarkr login --no-browser # over SSH: open the printed link anywhere, then paste the token
|
|
58
|
+
yarkr whoami # check who you're signed in as
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
In CI, store a read-only token as a secret and set `YARKR_TOKEN`. `yarkr` uses the public hub at `https://yarkr.com`
|
|
62
|
+
unless you point it at your own instance with `yarkr login --registry <url>`.
|
|
31
63
|
|
|
32
64
|
Docs: [docs/cli.md](https://github.com/posterus-ltd/yarkr-public/blob/main/docs/cli.md) · Source: [github.com/posterus-ltd/yarkr-public](https://github.com/posterus-ltd/yarkr-public) · MIT
|
package/dist/yarkr.js
CHANGED
|
@@ -41811,18 +41811,20 @@ async function context(flags = {}) {
|
|
|
41811
41811
|
const cwd = process.cwd();
|
|
41812
41812
|
const conn = await resolveConnection({ dir: cwd, registry: flags.registry });
|
|
41813
41813
|
const api = new Api(conn);
|
|
41814
|
-
const
|
|
41815
|
-
|
|
41816
|
-
const dir = userStateDir();
|
|
41814
|
+
const userMode = !!(flags.global || flags.user);
|
|
41815
|
+
const dir = userMode ? userStateDir() : cwd;
|
|
41817
41816
|
let config2 = await loadProjectConfig(dir, { required: false });
|
|
41818
41817
|
if (!config2) {
|
|
41819
|
-
const detected2 = detectHarnesses2(os5.homedir());
|
|
41820
|
-
config2 = { channel: "stable", scope: "user", harnesses: detected2.length ? detected2 : ["claude-code"], packages: {}, arks: "auto" };
|
|
41821
|
-
|
|
41822
|
-
|
|
41823
|
-
|
|
41818
|
+
const detected2 = detectHarnesses2(userMode ? os5.homedir() : cwd);
|
|
41819
|
+
config2 = { channel: "stable", scope: userMode ? "user" : "project", harnesses: detected2.length ? detected2 : ["claude-code"], packages: {}, arks: "auto" };
|
|
41820
|
+
if (!flags.dryRun && !flags.check && !flags.readOnly) {
|
|
41821
|
+
await mkdir3(dir, { recursive: true });
|
|
41822
|
+
await saveProjectConfig(dir, config2);
|
|
41823
|
+
if (userMode) ui.info(`Installing your arks into your home directory (${config2.harnesses.join(", ")}). Settings: ${path5.join(dir, CONFIG_FILE)}.`);
|
|
41824
|
+
else ui.info(`Created ${CONFIG_FILE} here for ${config2.harnesses.join(", ")}. Use -g to install into your home directory instead.`);
|
|
41825
|
+
}
|
|
41824
41826
|
}
|
|
41825
|
-
return { dir, config: config2, conn, api, lock: await loadLock(dir), userMode
|
|
41827
|
+
return { dir, config: config2, conn, api, lock: await loadLock(dir), userMode };
|
|
41826
41828
|
}
|
|
41827
41829
|
async function sync(flags, update2, arkRefs = []) {
|
|
41828
41830
|
const { dir, config: config2, conn, api, lock, userMode } = await context(flags);
|
|
@@ -42499,7 +42501,7 @@ async function mcpRemove(scopes, flags) {
|
|
|
42499
42501
|
if (!flags.noSync) await sync(flags);
|
|
42500
42502
|
}
|
|
42501
42503
|
async function mcpList(flags) {
|
|
42502
|
-
const { config: config2, conn } = await context(flags);
|
|
42504
|
+
const { config: config2, conn } = await context({ ...flags, readOnly: true });
|
|
42503
42505
|
const rows = (config2.mcp ?? []).map((m) => connectionFor(conn.server, m));
|
|
42504
42506
|
if (flags.json) return console.log(JSON.stringify(rows, null, 2));
|
|
42505
42507
|
if (!rows.length) {
|
|
@@ -45039,11 +45041,11 @@ async function repoLint(dir, opts) {
|
|
|
45039
45041
|
}
|
|
45040
45042
|
|
|
45041
45043
|
// src/index.ts
|
|
45042
|
-
var VERSION = true ? "1.0.
|
|
45044
|
+
var VERSION = true ? "1.0.2" : "0.0.0-dev";
|
|
45043
45045
|
var act = (fn) => async (...a) => {
|
|
45044
45046
|
await fn(...a);
|
|
45045
45047
|
};
|
|
45046
|
-
var syncFlags = (c) => c.option("--harness <ids...>", `limit to some harnesses (${HARNESS_IDS.join(", ")})`).option("--dry-run", "show what would change; write nothing").option("--check", "exit 1 if anything is out of date (for CI)").option("--force", "overwrite files edited locally").option("--require-signatures", "refuse unsigned releases").option("--
|
|
45048
|
+
var syncFlags = (c) => c.option("--harness <ids...>", `limit to some harnesses (${HARNESS_IDS.join(", ")})`).option("--dry-run", "show what would change; write nothing").option("--check", "exit 1 if anything is out of date (for CI)").option("--force", "overwrite files edited locally").option("--require-signatures", "refuse unsigned releases").option("-g, --global", "install into your home directory instead of this folder").addOption(new Option("--user").hideHelp()).option("--registry <url>", "registry to use (default: from .yarkrrc)");
|
|
45047
45049
|
function buildProgram() {
|
|
45048
45050
|
const program2 = new Command().name("yarkr").description("Yarkr: install your org's skills, agents and MCP configs into every harness.").version(VERSION).option("-q, --quiet", "only print warnings and errors").hook("preAction", (cmd) => {
|
|
45049
45051
|
ui.quiet = !!cmd.opts().quiet;
|
|
@@ -45059,11 +45061,11 @@ function buildProgram() {
|
|
|
45059
45061
|
program2.command("arks").description("list public arks: curated sets anyone can sync or connect over MCP").option("--json").action(act(publicArks));
|
|
45060
45062
|
program2.command("lint").argument("[dir]", "a repo checkout", ".").description("check a repo is set up as a Yarkr source: what it publishes, problems the hub would refuse, and index typos or weak descriptions").option("--namespace <ns>", "namespace to show names in (default: the git owner)").option("--strict", "exit 1 on warnings too").option("--json").action(act(repoLint));
|
|
45061
45063
|
program2.command("guide").argument("[name]", "a guide, e.g. create-ark; omit to list them").description("print instructions for your agent, e.g. how to build an ark for a topic").option("-o, --out <path>", "write to a file, or <dir>/SKILL.md for a directory (e.g. ~/.claude/skills/create-ark/)").option("--topic <topic>", "create-ark: what the ark is about").addOption(new Option("--type <type>", "create-ark: the kind of package it holds").choices(["skill", "agent", "mcp"])).action(act(guide));
|
|
45062
|
-
syncFlags(program2.command("add").argument("<packages...>", "namespace/name[@range]").description("add packages to yarkr.json (
|
|
45064
|
+
syncFlags(program2.command("add").argument("<packages...>", "namespace/name[@range]").description("add packages to yarkr.json (with -g: to your personal ark, or your user config when signed out) and sync").option("--no-sync", "only edit yarkr.json")).action(act((pkgs, o) => add(pkgs, { ...o, noSync: o.sync === false })));
|
|
45063
45065
|
syncFlags(program2.command("remove").argument("<packages...>", "packages, or arks listed in yarkr.json").description("remove packages or arks (or opt out of optional ark items) and delete their files").option("--no-sync", "only edit yarkr.json")).action(act((pkgs, o) => remove(pkgs, { ...o, noSync: o.sync === false })));
|
|
45064
45066
|
syncFlags(program2.command("update").argument("[packages...]").description("move packages to the newest release their range allows")).action(act((pkgs, o) => update(pkgs, o)));
|
|
45065
45067
|
syncFlags(
|
|
45066
|
-
program2.command("sync").argument("[arks...]", "arks to add first: <org>/<ark>, yours or another org's public ark (which needs no sign-in)").description("install locked releases into each harness's native layout
|
|
45068
|
+
program2.command("sync").argument("[arks...]", "arks to add first: <org>/<ark>, yours or another org's public ark (which needs no sign-in)").description("install locked releases into each harness's native layout in this folder (with -g: your home directory)")
|
|
45067
45069
|
).action(act((refs, o) => sync(o, void 0, refs)));
|
|
45068
45070
|
program2.command("yank").argument("<release>", "namespace/name@version").description("yank a release (org admins): ranges and stable skip it, exact pins still install it").option("--reason <text>", "why, shown to everyone who installed it").option("--undo", "un-yank it").action(act(yank));
|
|
45069
45071
|
program2.command("diff").argument("[package]").description("show local edits to synced files").option("--name-only").action(act(diff));
|
|
@@ -45086,7 +45088,7 @@ function buildProgram() {
|
|
|
45086
45088
|
act((scopes, o) => mcpAdd(scopes, { ...o, noSync: o.sync === false }))
|
|
45087
45089
|
);
|
|
45088
45090
|
mcpFlags(mcp.command("remove").argument("<scopes...>").description("remove MCP connections from every harness")).action(act((scopes, o) => mcpRemove(scopes, { ...o, noSync: o.sync === false })));
|
|
45089
|
-
mcp.command("list").description("show configured MCP connections").option("--
|
|
45091
|
+
mcp.command("list").description("show configured MCP connections").option("-g, --global", "your user config instead of this folder's").addOption(new Option("--user").hideHelp()).option("--json").action(act((o) => mcpList(o)));
|
|
45090
45092
|
program2.command("mcp-config").argument("<harness>", HARNESS_IDS.join(" | ")).description("print the config that connects a harness to Yarkr's MCP server").option("--token-env <name>", "environment variable holding the token", "YARKR_TOKEN").option("--registry <url>").action(act(mcpConfig));
|
|
45091
45093
|
return program2;
|
|
45092
45094
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "yarkr-cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Install skills, agents and MCP toolsets from Yarkr into Claude Code, Codex, opencode, Cursor and more",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://yarkr.com",
|
|
@@ -47,8 +47,8 @@
|
|
|
47
47
|
"typescript": "~5.9.3",
|
|
48
48
|
"vitest": "^3.2.4",
|
|
49
49
|
"yaml": "^2.8.1",
|
|
50
|
-
"@yarkr/core": "0.1.0",
|
|
51
50
|
"@yarkr/evals": "0.1.0",
|
|
51
|
+
"@yarkr/core": "0.1.0",
|
|
52
52
|
"@yarkr/schema": "0.1.0"
|
|
53
53
|
},
|
|
54
54
|
"scripts": {
|