rakerun 0.0.0-stage → 0.1.1

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 +119 -2
  2. package/dist/rakerun.js +17125 -0
  3. package/package.json +57 -4
package/README.md CHANGED
@@ -1,3 +1,120 @@
1
- # Temporary Holding Version
1
+ # rakerun: the cloudraker.run 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
+ `rakerun` manages a cloudraker.run org from the terminal: repos, agents, runs, secrets,
4
+ connectors (remote MCP servers), tokens, webhooks, usage and Structured Knowledge.
5
+ It talks to the console API of the run gateway with an org token.
6
+
7
+ Files of an agent repo are not in scope. Edit them in the repo, then `git push`.
8
+
9
+ ## Install
10
+
11
+ ```sh
12
+ npm install -g @cloudraker/run-cli
13
+ rakerun --help
14
+ ```
15
+
16
+ Node 22 or newer. Two runtime dependencies, Ink and React, for the template picker. The push lint of `run-core` is bundled in.
17
+
18
+ ## First contact
19
+
20
+ ```sh
21
+ rakerun start
22
+ ```
23
+
24
+ `rakerun start` opens the console sign-up, creates the organization and a CLI token (the browser
25
+ hands it to the terminal), then asks for a project name, opens the template picker (grouped by
26
+ category; arrow keys, space to select, type to filter, enter), creates the repo, and deploys.
27
+ Three steps, one terminal.
28
+
29
+ ## Log in
30
+
31
+ ```sh
32
+ rakerun login --org acme
33
+ ```
34
+
35
+ `rakerun login` opens the console in the browser and listens on `127.0.0.1` for one callback. You
36
+ sign in (or sign up), the console mints a token named `rakerun`, and the browser hands it to the
37
+ terminal. No copy, no paste. The token is stored in `~/.config/rakerun/config.json` (mode 0600).
38
+
39
+ - `--paste`: a remote shell. The page shows one line to paste.
40
+ - `--token crr_...` or `--token -` (stdin): scripts and CI, no browser.
41
+ - Another host: `rakerun login --base-url https://acme.example.run --profile staging`. Each
42
+ profile holds one host and one token. Switch with `rakerun profile use <name>` or `--profile`.
43
+
44
+ Without a saved profile, `--base-url` and `--token` (or `CRR_BASE_URL` and `CRR_TOKEN`)
45
+ set the target for one call. A `--base-url` is the org host, `https://acme.cloudraker.run`.
46
+
47
+ ## Projects
48
+
49
+ ```sh
50
+ rakerun new my-agents --template linear-triage # repo, folder, template, git, remote
51
+ cd my-agents
52
+ rakerun lint # the push lint, locally
53
+ rakerun deploy -m "first agent" # commit everything, push, show the deploy log
54
+ rakerun template list
55
+ rakerun template import invoice-extractor # adds invoice-extractor/ to the project
56
+ ```
57
+
58
+ `rakerun deploy` wraps git: it lints, stages everything, commits, pushes and prints the gateway
59
+ messages (lint, `deployed N agent(s) at <sha>`, preview host). A branch other than the default
60
+ deploys a preview.
61
+
62
+ ## Git
63
+
64
+ ```sh
65
+ rakerun repo create triage
66
+ rakerun repo clone triage
67
+ ```
68
+
69
+ `rakerun repo clone` registers `rakerun` as the git credential helper of the org host, so every
70
+ `git push` and `git pull` to `/_git/*` uses the saved token. `rakerun git setup` does the
71
+ registration alone. The token needs the `git` scope.
72
+
73
+ ## Examples
74
+
75
+ ```sh
76
+ rakerun agent list
77
+ rakerun run start triage --input "Triage ticket EGR-123" --stream
78
+ echo '{"ticket": "EGR-123"}' | rakerun run start triage --stream
79
+ rakerun run list --agent triage --status failed --limit 20
80
+ rakerun run show run_01...
81
+ rakerun run stream run_01...
82
+ rakerun run turn run_01... --input "Yes, close it"
83
+
84
+ rakerun secret set LINEAR_TOKEN --repo agents --agent triage # value prompted, never echoed
85
+ rakerun secret list
86
+
87
+ rakerun connector add linear --url https://mcp.linear.app/mcp --auth oauth
88
+ rakerun connector connect linear # opens the sign-in
89
+ rakerun connector grant linear --repo agents --agent triage
90
+
91
+ rakerun token create ci --scopes run,read --agents triage
92
+ rakerun data records agents leads --limit 50
93
+ rakerun data add agents leads --data '{"email": "a@b.co", "score": 3}'
94
+ rakerun usage --from 2026-10-01 --to 2026-10-31
95
+ rakerun billing
96
+ ```
97
+
98
+ `--json` prints the raw API answer of any command. Exit codes: 0 ok, 1 API or runtime
99
+ error, 2 usage.
100
+
101
+ ## Scopes
102
+
103
+ | Command group | Token scope needed |
104
+ | --------------------------------------------- | ------------------ |
105
+ | Lists, `run show`, `run stream`, `usage` | `read` |
106
+ | `run start`, `run turn`, `run cancel` | `read` |
107
+ | `secret`, `connector`, `token`, `data` writes | `admin` |
108
+ | `repo create`, `webhook retry`, `billing` | `read` |
109
+ | `git` (clone, push) | `git` |
110
+
111
+ The console API treats a token with the `admin` scope as the admin role and a token
112
+ with the `read` scope as a member.
113
+
114
+ ## Develop
115
+
116
+ ```sh
117
+ pnpm dev -- repo list # node src/index.ts
118
+ pnpm test
119
+ pnpm build # dist/rakerun.js
120
+ ```