fibre. It lets you do from your terminal everything you would otherwise
do with the API or an SDK: start a sandbox, run commands in it and watch their output, open an interactive shell,
copy files and folders in and out, and clean up afterwards. It is just as useful in scripts and CI, and for coding
agents, because every command can print its result as JSON.
Install
The CLI is a standalone program, so you do not need Node.js or anything else installed. Run the command for your system:Terminal
Output
Output
output
Sign in
The CLI needs an API key, just like the SDKs. Runfibre login, create a key in the dashboard under API keys,
and paste it when asked. The CLI checks the key with Fibre and saves it for the next commands, in a file only you
can read.
Terminal
FIBRE_API_KEY environment variable and every command uses
it. fibre whoami shows which key and account the CLI is using.
Start a sandbox and work in it
fibre create starts a sandbox and prints its details. It accepts the same options as the API, written as flags:
--size, --image, --label, --lifetime, --idle-timeout and more. Here we ask for JSON, so a script can read
the ID:
Terminal
Output
Output
output
fibre exec runs a command in the sandbox as if it ran on your machine. Its output appears in your terminal
as it is written, and fibre exec exits with the command’s own exit code, so it works in scripts and in &&
chains. Put the command after --:
Terminal
Output
Output
output
Copy files in and out
fibre cp copies a file or a whole folder. Write the sandbox side as <id>:/path:
Terminal
Output
Output
output
fibre cp <id>:/work/report.json .
Run one command in a fresh sandbox
When you only need a sandbox for one command,fibre run does it all: it starts a sandbox, runs the command with
its output live, and exits with the command’s exit code. With --rm, it deletes the sandbox afterwards.
Terminal
Output
Output
output
Clean up
Terminal
For scripts and agents
Three things make the CLI easy to use from code:--jsonworks on every command. The result is printed as JSON, and so are errors, under"error".- Exit codes are stable:
0success,1a failure,2a usage error,3an API error,4not signed in or a rejected key.fibre runandfibre execexit with the command’s own code. - There is no colour or animation when the output is not a terminal, or when
NO_COLORis set.
All commands
fibre <command> --help describes every option.