@fibteq/altair-runner 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.
- package/LICENSE +661 -0
- package/README.md +87 -2
- package/dist/cli.js +91 -0
- package/dist/index.js +67 -0
- package/package.json +50 -3
package/README.md
CHANGED
|
@@ -1,3 +1,88 @@
|
|
|
1
|
-
#
|
|
1
|
+
# altair-runner
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Connects your computer to an Altair server, so a project can work in one of your
|
|
4
|
+
local folders with the coding CLI you already use: Claude Code, Codex CLI or
|
|
5
|
+
Gemini CLI.
|
|
6
|
+
|
|
7
|
+
- It opens an **outbound** WebSocket to the server. No port is opened, and it works behind NAT.
|
|
8
|
+
- The server sends a task (a folder, a CLI and a prompt). The runner starts the CLI in that folder, streams its
|
|
9
|
+
progress back and returns its final answer.
|
|
10
|
+
- The CLI runs with **your own login on your computer**. altair-runner never reads, sends or stores your Claude,
|
|
11
|
+
OpenAI or Google credentials. The only secret it keeps is its own Altair runner token, in
|
|
12
|
+
`~/.altair-runner/config.json` (readable by you only).
|
|
13
|
+
- It only works in folders you shared with `altair-runner share`. A path from the server that is not one of them
|
|
14
|
+
(after resolving symlinks) is refused.
|
|
15
|
+
|
|
16
|
+
## Use
|
|
17
|
+
|
|
18
|
+
Requires Node 22+ and at least one of `claude`, `codex` or `gemini` on your `PATH`, already signed in.
|
|
19
|
+
|
|
20
|
+
```sh
|
|
21
|
+
altair-runner pair ABCD-1234 --server https://altair.example.com # code from Altair > Devices
|
|
22
|
+
cd ~/code/my-project && altair-runner share # repeat for each folder
|
|
23
|
+
altair-runner start # leave it running
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Other commands: `altair-runner status`, `altair-runner unshare <folder>`, `altair-runner logout`.
|
|
27
|
+
Folders shared while `start` is running show up in Altair within a few seconds.
|
|
28
|
+
|
|
29
|
+
### What the CLI may do
|
|
30
|
+
|
|
31
|
+
`altair-runner start --access <level>` (saved for next time):
|
|
32
|
+
|
|
33
|
+
| level | Claude Code | Codex | Gemini CLI |
|
|
34
|
+
|---|---|---|---|
|
|
35
|
+
| `read` | `--permission-mode plan` | `--sandbox read-only` | `--approval-mode default` |
|
|
36
|
+
| `edit` (default) | `--permission-mode acceptEdits` | `--sandbox workspace-write` | `--approval-mode auto_edit` |
|
|
37
|
+
| `full` | `--permission-mode bypassPermissions` | `--sandbox danger-full-access` | `--approval-mode yolo` |
|
|
38
|
+
|
|
39
|
+
With `edit`, the CLI can change files in the folder but cannot run commands that would need your approval. Use
|
|
40
|
+
`full` only for folders and projects you trust: it lets the CLI run any command without asking.
|
|
41
|
+
|
|
42
|
+
Tasks in the same Altair thread continue the same Claude Code session (`--resume`), so follow-ups keep context.
|
|
43
|
+
|
|
44
|
+
### For apps that run it (the desktop app)
|
|
45
|
+
|
|
46
|
+
- `ALTAIR_SERVER` and `ALTAIR_RUNNER_TOKEN` override the saved pairing, and an env token is never written to disk.
|
|
47
|
+
An app that already has the user's session can pair without a code: `POST /api/runners/pairing` (as the user)
|
|
48
|
+
returns a code, and `POST /api/runner/pair` trades it for the runner token.
|
|
49
|
+
- `ALTAIR_RUNNER_HOME` moves the config folder.
|
|
50
|
+
- `altair-runner start --json` prints one status object per line (`connecting`, `online`, `offline`, `task`,
|
|
51
|
+
`stopped`); `altair-runner status --json` prints the config without the token.
|
|
52
|
+
- The build is a single JavaScript file with no native dependencies (`dist/cli.js`), so it can be packed into one
|
|
53
|
+
binary with Node SEA or `bun build --compile`.
|
|
54
|
+
|
|
55
|
+
## Packages
|
|
56
|
+
|
|
57
|
+
The CLI is published as [`@fibteq/altair-runner`](https://www.npmjs.com/package/@fibteq/altair-runner).
|
|
58
|
+
[`altair-runner`](https://www.npmjs.com/package/altair-runner) (in `packages/altair-runner-alias`) is a short name that
|
|
59
|
+
depends on it, so `npx altair-runner` works. `npx @fibteq/altair-runner` runs the same CLI.
|
|
60
|
+
|
|
61
|
+
`startRunner()` and `pair()` are exported too, for the desktop app to bundle the runner instead of shelling out to it.
|
|
62
|
+
|
|
63
|
+
## From this repository
|
|
64
|
+
|
|
65
|
+
```sh
|
|
66
|
+
pnpm install
|
|
67
|
+
pnpm --filter @fibteq/altair-runner build
|
|
68
|
+
node packages/altair-runner/dist/cli.js --help
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Releasing
|
|
72
|
+
|
|
73
|
+
Needs an npm account that is a member of the `fibteq` npm organization.
|
|
74
|
+
|
|
75
|
+
1. Bump `version` in `package.json` here and in `packages/altair-runner-alias/package.json`, and `RUNNER_VERSION`
|
|
76
|
+
in `src/runner.ts` (a test checks they match). Bump `RUNNER_PROTOCOL_VERSION` in `@altair/protocol` only when the
|
|
77
|
+
wire format changes; the server refuses runners on another protocol version and tells them to update.
|
|
78
|
+
2. Publish the runner first, then the short name, with `pnpm` (it replaces `workspace:` versions and uses the
|
|
79
|
+
built files from `publishConfig`):
|
|
80
|
+
|
|
81
|
+
```sh
|
|
82
|
+
npm login
|
|
83
|
+
pnpm --filter @fibteq/altair-runner publish --access public
|
|
84
|
+
pnpm --filter altair-runner publish --access public
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
`prepublishOnly` builds and tests the runner before it is published. Check the contents first with
|
|
88
|
+
`pnpm --filter @fibteq/altair-runner pack` if in doubt.
|