On this page
Command Line (obi)
Search logs, work incidents, and manage alerts, dashboards, and every other resource from your terminal with obi.
obi is the command line for this product. A small set of verbs (get,
describe, create, apply, edit, patch, delete) work on every
resource type, and actions cover what is specific to one type
(obi ack incident 12). There are also commands for log search and live tail,
the Obi assistant, and obi api for any route without a friendlier command.
obi is a client of the same REST API the console uses. It can
do exactly what your credential can do, and nothing more.
Commands
Each command has its own page. Run any command with no arguments, or with
--help, to see its usage; the resource verbs also list every type they work
on.
Working with resources
| Command | What it does |
|---|---|
obi get | List resources, or show specific ones |
obi describe | Show everything about one resource |
obi create | Create a resource from flags or a file |
obi apply | Create or update resources from manifest files |
obi edit | Change a resource in your editor |
obi patch | Change some fields of a resource |
obi delete | Delete resources |
| Resource actions | ack, resolve, silence, pause, rotate, and every other action specific to one type |
obi api-resources | List every resource type and what you can do with it |
Events and the API
| Command | What it does |
|---|---|
obi search | Run a query language search |
obi tail | Stream matching events as they arrive |
obi ask | Ask the Obi assistant a question |
obi send | Send events in |
obi api | Call any API route |
Signing in and setup
| Command | What it does |
|---|---|
obi login | Sign in and save the credential |
obi logout | Sign out of a context |
obi whoami | Show who and where you are signed in |
obi use-workspace | Set the workspace the current context uses |
obi config | Manage saved contexts |
obi completion | Set up tab completion |
obi upgrade | Install the latest obi, after you confirm |
obi uninstall | Remove obi and what it left behind, after you confirm |
obi version prints the version, and obi help TYPE shows what you can do
with one resource type.
Install
On Linux or macOS, install a standalone obi that does not need Node.js:
curl -fsSL https://downloads.obistack.com/cli/install.sh | sh
The script picks the build for your system, checks it against the published
checksums, and installs it so obi and tab completion
work in your next terminal, without sudo. It prefers a folder already on your
PATH. When there is none, it installs to ~/.local/bin and adds it to your
PATH in your shell's startup file, marked "Added by the obi installer". Set
OBI_VERSION to install a specific version, OBI_INSTALL_DIR to choose where
it goes, OBI_NO_COMPLETION=1 to skip completion, or OBI_NO_SHELL_CONFIG=1
to leave your startup file alone. To upgrade later, run
obi upgrade, and to remove obi, run
obi uninstall.
With Node.js 22 or newer you can install it with npm instead, which also works on Windows and on Alpine and other musl-based Linux:
npm install -g https://api.obistack.com/v1/cli/obistack-cli-0.1.2.tgz
obi completion install
Sign in
obi login
obi opens a page in your browser. Pick the workspace to start in, choose
Authorize, and obi is signed in to all your workspaces. Over SSH, or on a machine with no browser,
the page gives you a token to paste into the terminal instead. For CI, use a
personal access token.
obi login covers both, and how to point obi at a
self-hosted server.
Naming things
Wherever a command takes a name, you can give any of these:
- A name or slug, matched without regard to case (
prod-overview). - A number, for incidents, alerts, and checks (
12or#12). - An id, or its first six or more characters.
Names are matched only against what your credential can already list. If a
name matches more than one object, obi lists the ids and asks you to pick
one rather than guessing.
Each resource type has short names, so obi get dash and obi get dashboards
are the same. obi help TYPE lists them.
Some resources belong to another one. Name the parent with a flag:
obi get silences --alert payments-errors
obi get dashboard-revisions --dashboard prod-overview
Settings that exist once per workspace have no name:
obi get retention
obi edit retention
Output formats
Pass -o to get, describe, and the other commands that print objects:
| Format | Prints |
|---|---|
table | The default, a few key columns. |
wide | A table with more columns. |
json, yaml | The full objects. |
name | type/name, one per line. |
jsonpath='{[*].name}' | Values picked by a JSONPath expression. |
custom-columns=NAME:.name,ID:.id | A table with columns you choose. |
--no-headers drops the header row, which helps when piping a table into
other tools.
Global flags
| Flag | Meaning |
|---|---|
-o, --output FORMAT | Output format, above. |
--context NAME | Use a saved context other than the current one. |
-n, --workspace NAME | Act in another of your workspaces for this one command. |
--server URL | The API address for this one command. |
--token TOKEN | The credential for this one command. |
-y, --yes | Do not ask before a destructive action. |
-v, --verbose | Print each HTTP request to stderr. |
-h, --help | Show a command's help. |
Environment variables
Useful in CI, where there is no obi login:
| Variable | Meaning |
|---|---|
OBI_TOKEN | The personal access token to send. |
OBI_SERVER | The API address, if it is not the default. |
OBI_CONTEXT | Which saved context to use. |
OBI_NO_UPDATE_CHECK | Set to 1 to stop the daily "newer release" notice. |
OBI_WORKSPACE | Which of your workspaces to act in. |
OBI_CONFIG | Path to the config file. |
OBI_INGEST_KEY | The ingest key obi send uses. |
OBI_PASSWORD | Password for a non-interactive email sign-in. |
OBI_EDITOR | The editor obi edit opens, before $VISUAL and $EDITOR. |
Errors and exit codes
obi prints the API's own error message. It exits 2 for a usage mistake,
such as an unknown command or a missing name, and 1 when a request fails. A
mistyped command or resource type gets a suggestion.
A command that needs a credential and has none stops before sending anything
and tells you to run obi login. An authentication failure from the server
usually means one of two things: the token has expired or been revoked, or the
command needs a signed-in session (obi login without --token) rather than
a personal access token.
Tenant Isolation & Data Boundaries
Every request carries only your credential. The API works out your workspace
from that credential on the server, exactly as it does for the console, and
nothing in a flag, the config file, or a manifest can select a different
workspace. Name lookups search only what your credential can already list,
so a name can never reach an object in another workspace. obi send writes
only to the data input its ingest key belongs to.