@pirol/nido 0.2.0 → 0.2.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.
- package/README.md +63 -81
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,50 +1,52 @@
|
|
|
1
1
|
# nido
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
beschrieben. Man gibt nido einen Ordner, nido lässt darin einen Agenten
|
|
6
|
-
arbeiten und holt die Ergebnisse zurück. Jede Sandbox läuft in einer eigenen
|
|
7
|
-
Kata-VM.
|
|
3
|
+
Run coding agents and commands in isolated sandboxes. Give nido a folder, it lets an agent work
|
|
4
|
+
on it in a sandbox and brings the results back.
|
|
8
5
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
Kunden und reicht die Aufrufe an das OpenShell-Gateway weiter. Die Doku für
|
|
12
|
-
Kunden steht unter [pirol.ai/docs/sandboxes](https://pirol.ai/docs/sandboxes).
|
|
6
|
+
Every sandbox is its own small virtual machine (Kata Containers) in Frankfurt, run by
|
|
7
|
+
[Pirol](https://pirol.ai).
|
|
13
8
|
|
|
14
|
-
|
|
9
|
+
> **Closed beta.** Free during the beta, for invited accounts only, up to 5 sandboxes per account.
|
|
10
|
+
> Ask for access at [hello@pirol.ai](mailto:hello@pirol.ai).
|
|
15
11
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
12
|
+
Full documentation: [pirol.ai/docs/sandboxes](https://pirol.ai/docs/sandboxes)
|
|
13
|
+
|
|
14
|
+
## Install
|
|
15
|
+
|
|
16
|
+
Requires Node 20 or newer.
|
|
19
17
|
|
|
20
18
|
```bash
|
|
21
19
|
npm install -g @pirol/nido
|
|
22
20
|
nido login
|
|
23
21
|
```
|
|
24
22
|
|
|
25
|
-
`nido login`
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
die Umgebungsvariable `PIROL_API_KEY`. `NIDO_API_URL` zeigt nido auf eine
|
|
29
|
-
andere API, etwa eine lokale.
|
|
23
|
+
`nido login` opens your browser. You confirm with your Pirol account, and nido stores a key in
|
|
24
|
+
`~/.nido/config.json` (readable only by you). Without a browser, use `nido login --manual`. In CI,
|
|
25
|
+
set `PIROL_API_KEY` instead.
|
|
30
26
|
|
|
31
|
-
|
|
27
|
+
## Run an agent on a folder
|
|
32
28
|
|
|
33
29
|
```bash
|
|
34
|
-
cd
|
|
30
|
+
cd my-project
|
|
31
|
+
nido init # writes nido.json
|
|
32
|
+
nido secret set anthropic # once; asks for the key without echo
|
|
33
|
+
nido run
|
|
35
34
|
```
|
|
36
35
|
|
|
37
|
-
|
|
36
|
+
`nido run`:
|
|
38
37
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
38
|
+
1. Creates the sandbox if it does not exist yet. The name comes from `name` or the folder name.
|
|
39
|
+
A new sandbox is ready in about 20 seconds.
|
|
40
|
+
2. Uploads changed files. Unchanged files are not uploaded again; files you deleted locally are
|
|
41
|
+
deleted in the sandbox too.
|
|
42
|
+
3. Runs the agent and shows each step on one line.
|
|
43
|
+
4. Brings `output/` back. A file you changed locally is not overwritten; the sandbox version is
|
|
44
|
+
saved next to it, for example as `report.remote.md`.
|
|
46
45
|
|
|
47
|
-
`nido
|
|
46
|
+
The sandbox keeps running afterwards. The next `nido run` reuses it, `nido run --fresh` starts
|
|
47
|
+
over. `nido pull` fetches `output/` again.
|
|
48
|
+
|
|
49
|
+
### nido.json
|
|
48
50
|
|
|
49
51
|
```json
|
|
50
52
|
{
|
|
@@ -57,40 +59,23 @@ nido run
|
|
|
57
59
|
}
|
|
58
60
|
```
|
|
59
61
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
1. Sandbox anlegen, falls es sie noch nicht gibt. Der Name kommt aus
|
|
63
|
-
`name` oder dem Ordnernamen. Ein neuer Start dauert etwa 20 Sekunden.
|
|
64
|
-
2. Geänderte Dateien hochladen. nido merkt sich die Hashes in
|
|
65
|
-
`.nido/state.json`. Unveränderte Dateien gehen nicht noch einmal hoch,
|
|
66
|
-
lokal gelöschte verschwinden auch in der Sandbox.
|
|
67
|
-
3. Den Agenten starten. Bei Claude zeigt nido jeden Schritt in einer Zeile.
|
|
68
|
-
4. `output/` zurückholen. Neue Dateien landen im Ordner. Eine Datei, die
|
|
69
|
-
man lokal geändert hat, überschreibt nido nicht. Die Fassung aus der
|
|
70
|
-
Sandbox heißt dann zum Beispiel `report.remote.md`.
|
|
71
|
-
|
|
72
|
-
Die Sandbox bleibt danach stehen. Der nächste `nido run` nutzt sie weiter,
|
|
73
|
-
`nido run --fresh` fängt neu an.
|
|
74
|
-
|
|
75
|
-
Statt eines Agenten geht auch ein Befehl, das braucht keinen Schlüssel:
|
|
62
|
+
Instead of an agent, run any command. It needs no key:
|
|
76
63
|
|
|
77
64
|
```json
|
|
78
65
|
{ "command": "python analyze.py", "output": "output/" }
|
|
79
66
|
```
|
|
80
67
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
|
84
|
-
|
|
85
|
-
| `
|
|
86
|
-
| `
|
|
87
|
-
| `
|
|
88
|
-
| `
|
|
89
|
-
| `
|
|
90
|
-
| `
|
|
91
|
-
| `
|
|
92
|
-
| `network` | Hosts, die die Sandbox auf Port 443 erreichen darf. Sonst ist das Netz zu |
|
|
93
|
-
| `output` | Ordner, den nido zurückholt, Standard `output/` |
|
|
68
|
+
| Field | Meaning |
|
|
69
|
+
| --- | --- |
|
|
70
|
+
| `agent` | `claude`; more will follow |
|
|
71
|
+
| `task` | What the agent should do |
|
|
72
|
+
| `command` | Instead of `agent`: a command as a string (runs in bash) or a list |
|
|
73
|
+
| `name` | Sandbox name; defaults to the folder name |
|
|
74
|
+
| `image` | Your own container image; defaults to an image with Claude Code, Codex and OpenCode |
|
|
75
|
+
| `files.exclude` | Patterns like in `.gitignore`; `.git` and `.nido` are always excluded |
|
|
76
|
+
| `secrets` | Names of stored secrets, never values |
|
|
77
|
+
| `network` | Hosts the sandbox may reach on port 443; everything else is blocked |
|
|
78
|
+
| `output` | Folder that comes back after the run; default `output/` |
|
|
94
79
|
|
|
95
80
|
## Secrets
|
|
96
81
|
|
|
@@ -102,14 +87,10 @@ nido secret ls
|
|
|
102
87
|
nido secret rm github
|
|
103
88
|
```
|
|
104
89
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
niemand mehr, auch der Kunde nicht.
|
|
108
|
-
In der Sandbox steht nur ein Platzhalter. Der Proxy von OpenShell setzt den
|
|
109
|
-
echten Wert erst beim Aufruf ein, und nur für die Hosts des Dienstes, etwa
|
|
110
|
-
`api.anthropic.com`. Andere Namen kennt nido noch nicht.
|
|
90
|
+
A secret is stored once and can never be read again, not even by you. Inside the sandbox the agent
|
|
91
|
+
only sees a placeholder; the real value is added on the way to the provider's API.
|
|
111
92
|
|
|
112
|
-
##
|
|
93
|
+
## More commands
|
|
113
94
|
|
|
114
95
|
```bash
|
|
115
96
|
nido create shop --secret anthropic --network pypi.org
|
|
@@ -120,26 +101,27 @@ nido cp shop:/sandbox/work/output ./out
|
|
|
120
101
|
nido logs shop
|
|
121
102
|
nido stop shop && nido start shop
|
|
122
103
|
nido rm shop
|
|
104
|
+
nido whoami
|
|
105
|
+
nido logout
|
|
123
106
|
```
|
|
124
107
|
|
|
125
|
-
|
|
108
|
+
Paths inside a sandbox must be below `/sandbox`.
|
|
126
109
|
|
|
127
|
-
|
|
128
|
-
npm test # unit tests
|
|
129
|
-
npm run build # dist/
|
|
130
|
-
```
|
|
110
|
+
## Limits in the beta
|
|
131
111
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
in
|
|
135
|
-
|
|
112
|
+
- Up to 5 sandboxes per account.
|
|
113
|
+
- No interactive shell yet; use `nido exec`.
|
|
114
|
+
- The agent runs in the foreground. If the connection drops, `nido pull` fetches what is already
|
|
115
|
+
in `output/`.
|
|
116
|
+
- No persistent workspaces or backups yet. Keep anything important in `output/`.
|
|
136
117
|
|
|
137
|
-
|
|
118
|
+
## Development
|
|
138
119
|
|
|
139
|
-
|
|
120
|
+
```bash
|
|
121
|
+
cd nido && npm install && npm run build && npm link
|
|
122
|
+
npm test
|
|
123
|
+
```
|
|
140
124
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
`nido pull` das, was schon in `output/` liegt.
|
|
145
|
-
- Keine dauerhaften Arbeitsbereiche und kein Backup (#695).
|
|
125
|
+
`NIDO_API_URL` points nido at another API, for example a local agents-api. Upload and
|
|
126
|
+
download rules live in `src/sync.ts` as pure functions, API calls in `src/api.ts`, login in
|
|
127
|
+
`src/login.ts`. Publish with `npm publish` in this folder; it builds and tests first.
|