@easybits.cloud/cli 0.4.1 → 0.5.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/README.md ADDED
@@ -0,0 +1,113 @@
1
+ # @easybits.cloud/cli
2
+
3
+ The official CLI for [EasyBits](https://www.easybits.cloud), the cloud for AI agents:
4
+ sandboxes, hosting, custom domains, SQL databases, agents and files from your terminal.
5
+ Built for people and for coding agents — every command takes `--json` and exit codes are stable.
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ npm i -g @easybits.cloud/cli # installs `easybits`
11
+ npx -y @easybits.cloud/cli --help # or run it without installing
12
+ ```
13
+
14
+ Requires Node 22+.
15
+
16
+ ## Log in
17
+
18
+ ```bash
19
+ easybits login # opens your browser (OAuth2 + PKCE); session renews itself
20
+ easybits login eb_sk_live_YOUR_KEY # or save an API key instead
21
+ easybits usage
22
+ easybits logout
23
+ ```
24
+
25
+ Running a command without a session in a terminal starts the login automatically;
26
+ without a terminal (agents, CI) it exits `3`. Precedence: `EASYBITS_API_KEY` env var >
27
+ `--token <key>` > browser session > saved API key. Keys: https://www.easybits.cloud/dash/developer.
28
+
29
+ ## Commands
30
+
31
+ ```bash
32
+ # Sandboxes (alias: sb)
33
+ easybits sandboxes ls
34
+ easybits sandboxes create --template node --name scratch
35
+ easybits sandboxes get sb_abc123
36
+ easybits sandboxes exec sb_abc123 -- npm test
37
+ easybits sandboxes logs sb_abc123 --unit myapp --lines 100
38
+ easybits sandboxes files ls sb_abc123 /data/work
39
+ easybits sandboxes files read sb_abc123 /etc/os-release
40
+ easybits sandboxes files write sb_abc123 /data/work/app.js ./app.js
41
+ easybits sandboxes suspend sb_abc123
42
+ easybits sandboxes resume sb_abc123
43
+ easybits sandboxes snapshot sb_abc123 --name before-upgrade
44
+ easybits sandboxes destroy sb_abc123
45
+
46
+ # Hosting: permanent machines (alias: deploy)
47
+ easybits machines ls
48
+ easybits machines deploy sb_abc123 -m "v1.2"
49
+ easybits machines releases sb_abc123
50
+ easybits machines logs sb_abc123 --grep ERROR
51
+ easybits machines rollback sb_abc123 rel_789
52
+ easybits machines secrets ls sb_abc123
53
+ easybits machines secrets set sb_abc123 DATABASE_URL=postgres://...
54
+ easybits machines secrets unset sb_abc123 DATABASE_URL
55
+ easybits init --port 3000 # GitHub Actions workflow that deploys on every push
56
+
57
+ # Domains
58
+ easybits domains ls sb_abc123
59
+ easybits domains add sb_abc123 shop.example.com --port 3000
60
+ easybits domains verify sb_abc123 shop.example.com
61
+ easybits domains rm sb_abc123 shop.example.com
62
+
63
+ # Databases
64
+ easybits db ls
65
+ easybits db create leads
66
+ easybits db query leads "SELECT * FROM leads" --json
67
+ easybits db rm leads
68
+
69
+ # Agents
70
+ easybits agents ls
71
+ easybits agents create --template goose --name helper
72
+ easybits agents message ag_123 "hello"
73
+ easybits agents destroy ag_123
74
+
75
+ # Files, websites, account
76
+ easybits files ls
77
+ easybits files upload ./report.pdf
78
+ easybits files delete FILE_ID
79
+ easybits websites ls
80
+ easybits usage
81
+
82
+ # MCP, SSH, docs
83
+ easybits config # MCP config (streamable HTTP)
84
+ easybits mcp # MCP config (stdio)
85
+ easybits ssh-key # public key for sandbox SSH
86
+ easybits docs cli # a docs section as markdown (--en for English)
87
+ ```
88
+
89
+ Every command has help with examples: `easybits <command> <subcommand> --help`.
90
+
91
+ ## SSH over 443
92
+
93
+ Add to `~/.ssh/config`, then `ssh <sandbox-name>.ghosty`:
94
+
95
+ ```
96
+ Host *.ghosty
97
+ ProxyCommand easybits ssh-proxy %h
98
+ User root
99
+ ```
100
+
101
+ ## For coding agents
102
+
103
+ - `--json`: stdout is JSON only, errors included: `{"error":"…","code":3,"hint":"…"}` (`code` = exit code).
104
+ - Exit codes: `0` ok · `1` API error · `2` usage error · `3` no session, expired or rejected.
105
+ - Login for a person: `easybits login --json` prints `{"event":"login_url","url":…}` first (show it to them), then `{"event":"logged_in","email":…}`.
106
+ - `sandboxes exec` without `--json` exits with the remote command's code; with `--json` it exits 0 and reports `exitCode`.
107
+ - Skill: `npx skills add https://easybits.cloud` (includes `easybits-cli`).
108
+
109
+ Full reference: https://www.easybits.cloud/docs#cli · https://www.easybits.cloud/en/docs/cli.md
110
+
111
+ ## License
112
+
113
+ MIT