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