Skip to content

The command line

pnpm --filter @fiber/cli build makes apps/cli/dist/fiber.js: one file that needs Node 24 and nothing else. node fiber.js --help lists the commands.

Terminal window
export FIBER_API_URL=https://ci.example.com
fiber login # with GitHub; or --username NAME
fiber pipelines apply --project <id>
fiber run <pipeline> --follow
  • login uses GitHub where the server has FIBER_DEVICE_SIGN_IN on (see sign-in), or a password with --username: asked for, or from --password-stdin. Never as an argument.

  • A session is kept in ~/.fiber/sessions.json, for its owner only, and is sent only to the server it is of. logout ends it. In scripts set FIBER_TOKEN, which needs --server or FIBER_API_URL.

  • A server is reached over https, but on this machine.

  • --wait and --follow exit with how the run ended: 0 when it succeeded, 1 when not, 3 when it had not ended in time. 1 is also an error, and 2 a wrong command. A poll that fails is tried 5 times; starting a run is not, as it may have started. A pipe that is closed does not end the wait. Where there is no time for all of the output of a run that ended, that is said, and the exit is the run’s.

  • Control characters of output are taken out, so that a step cannot act on the terminal. --json has all, escaped.

  • pipelines apply updates the pipeline of that name, or makes one. Where two have it, give --id.

  • artifacts download checks the file against its hash, replaces nothing that is there, and leaves nothing when it fails. A name that is hidden, is like an option, or holds a path needs --out.

  • secrets set asks for a value of one line, or takes all of stdin with --value-stdin, less one newline at its end.

  • agents create and rotate print the token on stdout, once: TOKEN=$(fiber agents create --name a). Without --project an agent takes any project’s steps, and only an instance admin may make or list those.

  • tasks start <project> <kind> starts a durable task and prints its id; tasks kinds lists the kinds there are. Its input is JSON, from --input or all of stdin with --input-stdin, and is checked here before it is sent. An input is seen by the project’s readers, so a credential in it is not hidden. --wake-at takes an RFC 3339 time, at most 30 days away. See tasks.

  • source <(fiber completions bash); zsh and fish too.

  • agent runs steps on this machine: it starts fiber-runner.js, from beside fiber.js or --runner, for the server named by --server or FIBER_API_URL, never the one last signed in to, with an agent’s token. The token comes from FIBER_AGENT_TOKEN, all of stdin with --token-stdin, or is asked for; never as an argument. --docker and --workspace DIR set FIBER_AGENT_USE_DOCKER and FIBER_AGENT_WORKSPACE_DIR; the rest of the runner’s settings are read from the environment. FIBER_TOKEN is not passed on. It exits as the runner does: 0 when stopped, 2 when its token or protocol is refused. Ctrl-C reaches the runner once, and SIGTERM to fiber is passed on; SIGINT, SIGHUP and SIGQUIT sent to fiber alone are not. Under a service manager that signals every process, run fiber-runner.js itself.