@gruntas/cli 0.0.0-stage → 2026.11.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.
Files changed (3) hide show
  1. package/README.md +51 -2
  2. package/bin/gruntas.js +100 -0
  3. package/package.json +37 -4
package/README.md CHANGED
@@ -1,3 +1,52 @@
1
- # Temporary Holding Version
1
+ # @gruntas/cli
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ A coding agent harness: one session, on any machine, model or agent. It runs
4
+ Claude, GPT, Grok or any OpenAI-compatible model on your existing subscription
5
+ or an API key, or drives Claude Code and Codex; syncs sessions between your
6
+ machines end-to-end encrypted; follows Claude Code's permissions, skills and
7
+ hooks; and publishes screenshots, diffs and logs as links that unfurl in
8
+ GitHub, Slack, Linear and Basecamp.
9
+
10
+ ```bash
11
+ npx @gruntas/cli connect # sign in to a provider
12
+ npx @gruntas/cli # open the agent here
13
+ npx @gruntas/cli -p "fix the build"
14
+ ```
15
+
16
+ Publishing works on its own too, with no account:
17
+
18
+ ```bash
19
+ npx @gruntas/cli push screenshot.png \
20
+ --pull-request="https://github.com/acme/storefront/pull/412"
21
+ ```
22
+
23
+ ```
24
+ ✓ Uploaded screenshot.png → https://gruntas.com/a/art_2e1d
25
+ 412 KB · expires tomorrow
26
+ ```
27
+
28
+ ## What this package is
29
+
30
+ A launcher. gruntas itself is a single static Rust binary with no runtime and no
31
+ dependencies — this package carries the full build, the agent included; this package exists because the website says `npx @gruntas/cli push`
32
+ and some people are already in Node.
33
+
34
+ Installing it pulls one more package — `@gruntas/cli-linux-x64` or whichever
35
+ matches your machine — through the same npm registry as everything else. There
36
+ is no postinstall script and no download from a second host, so it works behind
37
+ a proxy, under `npm ci --ignore-scripts`, and off a private mirror.
38
+
39
+ If Node is not already in the picture, skip it. The binary is the primary
40
+ channel:
41
+
42
+ ```bash
43
+ cargo install --locked --git https://github.com/gruntas/gruntas --features harness gruntas
44
+ # or grab an archive from https://github.com/gruntas/gruntas/releases/latest
45
+ ```
46
+
47
+ ## Documentation
48
+
49
+ The agent, commands, flags, output formats, MCP, and what the CLI refuses to
50
+ upload and why: <https://github.com/gruntas/gruntas>.
51
+
52
+ MIT.
package/bin/gruntas.js ADDED
@@ -0,0 +1,100 @@
1
+ #!/usr/bin/env node
2
+ // Find the binary npm installed for this platform, then become it.
3
+ //
4
+ // The binary arrives as an optional dependency, not as a postinstall download,
5
+ // so the only host an install talks to is the npm registry the machine is
6
+ // already pointed at. That is what makes this work behind a proxy, under
7
+ // `npm ci --ignore-scripts`, and off a private mirror.
8
+ //
9
+ // This file is duplicated in npm/mcp/bin/gruntas-mcp.js. Two published packages
10
+ // each have to stand alone, and a shared module would mean a third package or a
11
+ // codegen step to save sixty lines. npm/build.mjs checks both copies name the
12
+ // same platforms, which is the drift that would actually bite.
13
+ "use strict";
14
+
15
+ const { spawnSync } = require("node:child_process");
16
+ const path = require("node:path");
17
+
18
+ // Keyed by `${process.platform}-${process.arch}`, so the lookup is the identity.
19
+ const PACKAGES = {
20
+ "darwin-arm64": "@gruntas/cli-darwin-arm64",
21
+ "darwin-x64": "@gruntas/cli-darwin-x64",
22
+ "linux-arm64": "@gruntas/cli-linux-arm64",
23
+ "linux-x64": "@gruntas/cli-linux-x64",
24
+ "win32-x64": "@gruntas/cli-win32-x64",
25
+ };
26
+
27
+ const BINARY = "gruntas";
28
+
29
+ // fail prints the reason and the next action, then stops. Every exit from here
30
+ // is a person or an agent who cannot upload, so neither is left guessing.
31
+ function fail(lines) {
32
+ process.stderr.write(BINARY + ": " + lines.join("\n") + "\n");
33
+ process.exit(1);
34
+ }
35
+
36
+ function locate() {
37
+ const host = process.platform + "-" + process.arch;
38
+ const pkg = PACKAGES[host];
39
+
40
+ if (!pkg) {
41
+ fail([
42
+ "no prebuilt binary for " + host + ".",
43
+ "",
44
+ "Built for: " + Object.keys(PACKAGES).sort().join(", ") + ".",
45
+ "Everywhere else, build it yourself with Rust (rustup.rs):",
46
+ "",
47
+ " cargo install --locked --git https://github.com/gruntas/gruntas --features harness gruntas",
48
+ ]);
49
+ }
50
+
51
+ let manifest;
52
+ try {
53
+ manifest = require.resolve(pkg + "/package.json");
54
+ } catch {
55
+ fail([
56
+ pkg + " is not installed, so there is no " + BINARY + " binary to run.",
57
+ "",
58
+ "It is an optional dependency, and installers skip those under",
59
+ "--no-optional, --omit=optional and --ignore-optional. A lockfile",
60
+ "written on another platform does the same thing.",
61
+ "",
62
+ " npm install @gruntas/cli --include=optional",
63
+ "",
64
+ "Or take the binary straight from the release, no Node involved:",
65
+ "",
66
+ " https://github.com/gruntas/gruntas/releases/latest",
67
+ ]);
68
+ }
69
+
70
+ return path.join(
71
+ path.dirname(manifest),
72
+ "bin",
73
+ BINARY + (process.platform === "win32" ? ".exe" : ""),
74
+ );
75
+ }
76
+
77
+ const binary = locate();
78
+
79
+ // stdio: "inherit" hands the child the real file descriptors, so nothing here
80
+ // sits between the binary and the terminal — or between it and a pipe.
81
+ const result = spawnSync(binary, process.argv.slice(2), { stdio: "inherit" });
82
+
83
+ if (result.error) {
84
+ fail([
85
+ "could not run " + binary + ": " + result.error.message,
86
+ "",
87
+ "The file is there but would not start. On a shared volume or an",
88
+ "extracted archive that usually means the execute bit was lost:",
89
+ "",
90
+ " chmod +x " + binary,
91
+ ]);
92
+ }
93
+
94
+ // Re-raise the signal that killed the child, so `gruntas` dies the way the binary
95
+ // did and a caller waiting on the exit status reads the same thing either way.
96
+ if (result.signal) {
97
+ process.kill(process.pid, result.signal);
98
+ }
99
+
100
+ process.exit(result.status === null ? 1 : result.status);
package/package.json CHANGED
@@ -1,6 +1,39 @@
1
1
  {
2
2
  "name": "@gruntas/cli",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "2026.11.0",
4
+ "description": "A coding agent harness: one session on any machine, model or agent — Claude, GPT, Grok, any OpenAI-compatible model, Claude Code or Codex — synced end-to-end encrypted, with a permalink for everything it produces.",
5
+ "keywords": [
6
+ "gruntas",
7
+ "coding-agent",
8
+ "agent-harness",
9
+ "agent",
10
+ "llm",
11
+ "cli",
12
+ "permalink",
13
+ "screenshot"
14
+ ],
15
+ "homepage": "https://gruntas.com",
16
+ "bugs": "https://github.com/gruntas/gruntas/issues",
17
+ "repository": {
18
+ "type": "git",
19
+ "url": "git+https://github.com/gruntas/gruntas.git",
20
+ "directory": "npm/cli"
21
+ },
22
+ "license": "MIT",
23
+ "bin": {
24
+ "gruntas": "bin/gruntas.js"
25
+ },
26
+ "files": [
27
+ "bin"
28
+ ],
29
+ "engines": {
30
+ "node": ">=18"
31
+ },
32
+ "optionalDependencies": {
33
+ "@gruntas/cli-darwin-arm64": "2026.11.0",
34
+ "@gruntas/cli-darwin-x64": "2026.11.0",
35
+ "@gruntas/cli-linux-arm64": "2026.11.0",
36
+ "@gruntas/cli-linux-x64": "2026.11.0",
37
+ "@gruntas/cli-win32-x64": "2026.11.0"
38
+ }
39
+ }