דלג לתוכן הראשי

Install the CLI

The lumen command line manages your workspace from a terminal or a CI job: list and apply flows, start a run on files and follow it, and add connections. It has no setup step. The first command that needs you signs you in.

  • 5 minutes
  • macOS, Linux, Windows

Install it​

lumen is one binary with no dependencies. Pick one way to get it.

brew install --cask buji-code/tap/lumen

The cask installs the binary and the shell completions for bash, zsh and fish.

Release publishing

The release configuration for the archives and the Homebrew cask is in the repository, but the job that publishes them is not switched on yet. Until the first CLI release is published, build from source.

Check that it runs:

lumen version

Turn on tab completion for your shell with lumen completion bash, lumen completion zsh, lumen completion fish or lumen completion powershell. Completion offers resource types, the names of your flows and connections, fields and enum values.

Sign in​

Run any command that talks to your workspace:

lumen get flows

The first time, lumen prints Opening your browser to sign in..., you sign in as you do in the console, and the command runs again. The token is saved and renewed quietly, so the browser comes back only when your sign-in is revoked or has lapsed.

You can also sign in on purpose, or sign out:

lumen login
lumen logout
SituationWhat happens
A terminal with a browserThe browser opens. lumen listens on 127.0.0.1 (the first free port of 8765, 8766 and 8767) to receive the answer.
Over SSH, or no displaylumen prints a link and a code instead. Open the link on any device and confirm the code.
You belong to several organizationsThe sign-in page asks which one. Pass --org NAME to skip the question.
CI, a pipe, or no terminalA browser is never opened. The command stops and tells you to run lumen login or set LUMEN_TOKEN.

Sign in without a person​

A script or a CI job signs in with a workspace API key. Create one in the console (see API keys), then give it to lumen as the token:

export LUMEN_TOKEN=lmn_eu_... # from your CI's secret store
lumen apply -f flows/

--token does the same for one command. A key belongs to one workspace, so lumen asks the server which one and you do not pass -w. To keep a key in a named context instead, use lumen login --context ci --static-token "$TOKEN".

Choose a workspace​

After you sign in, lumen asks the server which workspace your login belongs to and remembers it. Most people never set one. To act in a workspace by name, for one command:

lumen get flows -w acme

-w accepts only a workspace your login can use.

A context is a saved server, workspace and sign-in. You have one per Lumen installation you use:

lumen context list
lumen context current
lumen context use NAME
lumen context set NAME --server https://api.go-lumen.ai -w acme
lumen context delete NAME

--context NAME picks a context for one command, and --server (or LUMEN_SERVER) overrides its server.

Where it keeps things​

WhatWhere
Contexts~/.config/lumen/config.yaml, or the path in LUMEN_CONFIG, or --config. XDG_CONFIG_HOME moves the folder.
Tokens~/.config/lumen/tokens/NAME.json, readable by you only.
Discovery cache~/Library/Caches/lumen on macOS, ~/.cache/lumen on Linux, or LUMEN_CACHE_DIR. Kept for six hours.

The cache holds the list of resource types and their fields. lumen builds its commands from what the server offers, so a new kind of resource or a new field shows up without a new CLI version. Use --refresh to read it again now.

Your first commands​

lumen api-resources # the resource types your workspace offers
lumen get flows # a table of your flows
lumen get runs --phase Failed # filter flags come from the fields of a run
lumen describe flow NAME # everything about one flow
lumen explain flow.spec.nodes # what a field means
lumen run NAME -f march.pdf --wait
CommandWhat it does
get RESOURCE [NAME...]Lists or shows resources. -o yaml, -o json, -o name and -o wide change the output.
describe RESOURCE NAMEShows one resource, its status and problems included.
apply -f FILECreates or updates resources from files. See Flows as YAML.
delete RESOURCE NAMEDeletes a resource.
run FLOW [-f FILE...] [--wait]Starts the flow's manual trigger, as the console's Run button does. -f sends files (up to 23 MiB in all). --wait prints each step as it finishes and exits 1 if the run fails.
cancel run RUNStops a run that has not ended. --reason says why on the run.
eval flow FLOWRuns a flow's test cases and scores them.
connect CLASS [NAME]Adds a connection, asking for what it needs. Secrets are read with no echo, never from a flag.
explain RESOURCE.FIELDDescribes a field from the published schema.

lumen COMMAND --help lists the flags of any command.

Errors in plain words

lumen says "No flow named invoices in workspace acme." instead of printing a raw API error. Add --verbose to see the server's own text under it.

Next steps​