vakna attach: watch a box's terminal, read-only
Note
This page is generated from a mock CLI, and its numbers are placeholders.
Verified against vakna 0.0.0-mock on · generated from the CLI's own definitions
vakna attach: watch a box's terminal, read-only; resumes it if suspended. Proposed: the real CLI doesn't have this command yet.
Synopsis
sh
vakna attach <box>Flags
| Flag | Default | What it does |
|---|---|---|
--format <format> |
text |
text, or json: one JSON object per line |
--json |
off |
the same as --format json |
-h, --help |
off |
this help |
Examples
Example
sh
vakna attach webprints attached web · watching, read-only 0.09s
pnpm build… 61% [====== ]
:3000 listening
detached
Exit code 0.
Another example
sh
vakna attach web --format jsonprints {"v":1,"event":"attached","box":"web","id":"sbx_eu1a_01JB81M3N4P5Q6R7S8T9V0W1X2","mode":"read-only","ms":90,"mocked":true}
{"v":1,"event":"job","box":"web","command":"pnpm build","pct":61,"mocked":true}
{"v":1,"event":"port","box":"web","port":3000,"state":"listening","mocked":true}
{"v":1,"event":"detached","box":"web","mocked":true}
Exit code 0.
When it fails
sh
vakna attach apjprints vakna: no box "apj"
hint: vakna list # did you mean api?
Exit code 1.
Exit codes
| Code | Meaning |
|---|---|
| 0 | ok |
| 1 | vakna failed; under shell, run, try or fork, the command in the box failed |
| 2 | usage: a missing argument, an unknown flag or command |
JSON output
With --format json (or --json) every line is one JSON object. v is the format's version; mocked marks numbers from the mock.
sh
vakna attach web --format jsonprints {"v":1,"event":"attached","box":"web","id":"sbx_eu1a_01JB81M3N4P5Q6R7S8T9V0W1X2","mode":"read-only","ms":90,"mocked":true}
{"v":1,"event":"job","box":"web","command":"pnpm build","pct":61,"mocked":true}
{"v":1,"event":"port","box":"web","port":3000,"state":"listening","mocked":true}
{"v":1,"event":"detached","box":"web","mocked":true}
Errors
vakna: unknown command, unknown flag or missing argument: Runvakna <command> --helpand fix the command line it points to.vakna: no box "<box>": Runvakna listand use a name from it.vakna: "<id>" matches more than one box: Use the box's name or its full id;vakna listshows both.
--help
This page and the help text come from one definition.
Output
vakna attach · watch a box's terminal, read-only; resumes it if suspended
Proposed: the real CLI doesn't have this command yet.
usage
vakna attach <box>
flags
--format <format> text, or json: one JSON object per line (default: text)
--json the same as --format json (default: off)
-h, --help this help (default: off)
examples
vakna attach web
vakna attach web --format json
exit codes
0 ok
1 vakna failed; under shell, run, try or fork, the command in the box failed
2 usage: a missing argument, an unknown flag or command