@machine0/cli 1.0.11 → 1.0.14

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 +23 -0
  2. package/dist/cli.js +204 -204
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -18,6 +18,29 @@ $ machine0 new my-vm
18
18
  $ machine0 ssh my-vm
19
19
  ```
20
20
 
21
+ ## Authentication
22
+
23
+ ### Browser login (interactive)
24
+
25
+ ```bash
26
+ $ machine0 account login
27
+ ```
28
+
29
+ Opens your browser to authenticate. The session token is saved to `~/.machine0/auth-token`.
30
+
31
+ ### API token (non-interactive / CI)
32
+
33
+ Set the `MACHINE0_API_TOKEN` environment variable to skip the browser login flow. This is useful for CI pipelines, scripts, and automation.
34
+
35
+ ```bash
36
+ export MACHINE0_API_TOKEN=your-api-token
37
+ machine0 ls
38
+ ```
39
+
40
+ The environment variable takes precedence over the session file. You can get a token by running `machine0 account login` and reading the session file, or from the [web dashboard](https://app.machine0.io).
41
+
42
+ `machine0 account login` and `machine0 account logout` still work when `MACHINE0_API_TOKEN` is set — they manage the session file independently and will warn you about the environment variable.
43
+
21
44
  ## Benefits
22
45
 
23
46
  - 🧰 **Fully Loaded:** VMs come pre-installed with everything you need to work with AI.