@earntori/cli 0.2.13 → 0.2.15
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 -9
- package/dist/index.js +10 -2
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
# @earntori/cli
|
|
2
2
|
|
|
3
|
-
The Tori command line.
|
|
3
|
+
The Tori command line. One command holds your coding agent to a standard.
|
|
4
4
|
|
|
5
5
|
```
|
|
6
|
-
npx @earntori/cli
|
|
7
|
-
npx @earntori/cli
|
|
8
|
-
npx @earntori/cli
|
|
9
|
-
npx @earntori/cli
|
|
10
|
-
npx @earntori/cli
|
|
11
|
-
npx @earntori/cli
|
|
6
|
+
npx @earntori/cli init set up this repo (signs you in with GitHub the first time)
|
|
7
|
+
npx @earntori/cli standards what this project is held to; `standards enable <id…>` adds one
|
|
8
|
+
npx @earntori/cli rules add "…" add a rule of your own
|
|
9
|
+
npx @earntori/cli check [paths…] run the checks yourself
|
|
10
|
+
npx @earntori/cli ledger the signed record of every check and fix
|
|
11
|
+
npx @earntori/cli receipt <id> verify one receipt
|
|
12
|
+
npx @earntori/cli connector new --label … a connector for Claude (Chat, Cowork) and agents you build
|
|
12
13
|
npx @earntori/cli logout
|
|
13
14
|
```
|
|
14
15
|
|
|
15
|
-
|
|
16
|
+
Tori checks the code your coding agent writes against OWASP- and CWE-aligned coding standards, and the standards your industry is held to, before the agent calls a task done. Each finding comes with its fix; the agent applies it. Every check and fix goes on a signed record you can verify offline and show whoever needs proof.
|
|
16
17
|
|
|
17
|
-
|
|
18
|
+
Coding agents (CLI and IDE): Claude Code, Codex, Cursor. Desktop agents: Claude (Chat, Cowork).
|
|
19
|
+
|
|
20
|
+
Guide: https://github.com/GAishZOEish/tori-examples#readme · https://usetori.dev · Issues: https://github.com/usetori/Tori-MCP/issues
|
package/dist/index.js
CHANGED
|
@@ -163,7 +163,7 @@ function writeJson(p, o) { mkdirSync(dirname(resolve(p)), { recursive: true });
|
|
|
163
163
|
// `install` writes that harness's files and returns their paths. Add a harness = add a row.
|
|
164
164
|
// Pinned package versions written into agent config (B1b). CLI version = this package's own;
|
|
165
165
|
// MCP version is a constant: bump it in the same commit as a @earntori/mcp release.
|
|
166
|
-
const TORI_MCP_VERSION = "0.1.
|
|
166
|
+
const TORI_MCP_VERSION = "0.1.8";
|
|
167
167
|
function cliVersion(cliBin) {
|
|
168
168
|
try {
|
|
169
169
|
return JSON.parse(readFileSync(resolve(dirname(realpathSync(cliBin)), "..", "package.json"), "utf8")).version ?? "latest";
|
|
@@ -268,11 +268,19 @@ async function init() {
|
|
|
268
268
|
wrote.push(...h.install(ctx));
|
|
269
269
|
if (pin)
|
|
270
270
|
wrote.push(join(".tori", "project.json"));
|
|
271
|
+
let next = "\n\nNext\n Give your agent a task. When it finishes, Tori's checks run.\n Guide: https://github.com/GAishZOEish/tori-examples#readme\n tori ledger the signed record of every check and fix";
|
|
272
|
+
try {
|
|
273
|
+
const r = await api(cfg, "GET", `/api/v1/standards?project=${encodeURIComponent(targetProject())}`);
|
|
274
|
+
const avail = r.standards.filter((s) => !s.enabled && s.rules > 0);
|
|
275
|
+
if (avail.length)
|
|
276
|
+
next += `\n Standards you can turn on for this project:\n ${avail.map((s) => `${s.id} (${s.rules} checks)`).join(" ")}\n tori standards enable ${avail.map((s) => s.id).join(" ")}`;
|
|
277
|
+
}
|
|
278
|
+
catch { }
|
|
271
279
|
out({ ok: true, harnesses: set.map((h) => h.id), wrote, local }, `\u2713 Tori installed in this project for ${set.map((h) => h.label).join(", ")}${local ? " (local builds)" : ""}${pin ? ` \u2014 pinned to ${pin}` : ""}\n` +
|
|
272
280
|
wrote.map((w) => ` ${w}`).join("\n") +
|
|
273
281
|
`\n\n${set.map((h) => h.after).join(" ")}\nTori's checks now run when the agent finishes a turn; findings are shown to the agent before it stops.` +
|
|
274
282
|
(local ? "" : `\nPinned to @earntori/cli@${ver} and @earntori/mcp@${TORI_MCP_VERSION}; re-run tori init after upgrading.`) +
|
|
275
|
-
(set.length === HARNESSES.length ? "" : "\n(Not detected: " + HARNESSES.filter((h) => !set.includes(h)).map((h) => `${h.label} \u2014 tori init --${h.id === "claude-code" ? "claude" : h.id}`).join("; ") + ".)"));
|
|
283
|
+
(set.length === HARNESSES.length ? "" : "\n(Not detected: " + HARNESSES.filter((h) => !set.includes(h)).map((h) => `${h.label} \u2014 tori init --${h.id === "claude-code" ? "claude" : h.id}`).join("; ") + ".)") + next);
|
|
276
284
|
}
|
|
277
285
|
function repoIndex() { try {
|
|
278
286
|
const out = execSync("git ls-files", { encoding: "utf8", stdio: ["ignore", "pipe", "ignore"] }).split("\n").filter(Boolean);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@earntori/cli",
|
|
3
|
-
"version": "0.2.
|
|
4
|
-
"description": "Tori CLI —
|
|
3
|
+
"version": "0.2.15",
|
|
4
|
+
"description": "Tori CLI — holds your coding agent to a standard: checks before it calls a task done, each finding with its fix, on a signed record you can verify offline.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"bin": {
|
|
@@ -26,12 +26,12 @@
|
|
|
26
26
|
"publishConfig": {
|
|
27
27
|
"access": "public"
|
|
28
28
|
},
|
|
29
|
-
"homepage": "https://
|
|
29
|
+
"homepage": "https://usetori.dev",
|
|
30
30
|
"repository": {
|
|
31
31
|
"type": "git",
|
|
32
32
|
"url": "git+https://github.com/usetori/tori.git"
|
|
33
33
|
},
|
|
34
34
|
"bugs": {
|
|
35
|
-
"url": "https://github.com/
|
|
35
|
+
"url": "https://github.com/usetori/Tori-MCP/issues"
|
|
36
36
|
}
|
|
37
37
|
}
|