Skip to content

Repository files navigation

Observe CLI

Command line interface for Observe Inc.

Features

  • Tag Search - Resolve entities and entity types via tag keys and tag values to ground investigations in real data.
  • Dataset Management - List, view, and explore datasets with filtering and field selection.
  • Metric Exploration - Search, list, and inspect metrics including type, unit, and available dimensions.
  • OPAL Query Execution - Run OPAL queries directly from your terminal with schema-aware table output.
  • AI Agent Skills - List and view reusable AI-agent instruction documents stored in Observe.
  • Alert Monitoring - List and view alerts with severity filtering and active-only views.
  • Monitor Mutes - Full CRUD for monitor mute rules (snoozes), targeting all monitors or a specific set.
  • Datastream Management - Create, list, view, and update datastreams.
  • Documentation Search - Semantic search across Observe's built-in documentation from your terminal.
  • Multiple Output Formats - All commands support --format json and --format csv for scripting and pipelines.
  • Responsive Tables - Terminal-aware column widths with automatic text wrapping.

Installation

Install the CLI:

curl -fsSL https://raw.githubusercontent.com/observeinc/cli/main/install.sh | bash

Install the Observe agent skills into your coding agents:

observe skill install --all

Commands

CommandDescription
observe helpShow help information
observe auth loginAuthenticate with Observe (browser or device code flow)
observe auth logoutClear stored credentials
observe auth statusShow current authentication status
observe auth configureManually configure CLI credentials
observe auth profile listList all saved profiles
observe auth profile useSwitch the default profile
observe tag-value listSearch tag values
observe tag listSearch tags
observe dataset listList datasets with optional filtering
observe dataset viewView dataset details and schema
observe metric listSearch and list metrics
observe metric viewView metric details and dimensions
observe queryExecute OPAL queries on datasets
observe skill listList AI agent skills
observe skill viewView skill details and content
observe skill installInstall skills into your coding agents
observe skill updateUpdate installed skills to the latest version
observe alert listList alerts with severity and status filtering
observe alert viewView full alert details
observe monitor mute listList and search monitor mute rules
observe monitor mute viewView full monitor mute rule details
observe monitor mute createCreate a monitor mute rule
observe monitor mute updateUpdate a monitor mute rule
observe monitor mute deleteDelete a monitor mute rule
observe datastream createCreate a new datastream
observe datastream listList datastreams
observe datastream viewView a datastream by ID
observe datastream updateUpdate a datastream
observe datastream-token check-statusPoll a datastream token until ingest data arrives
observe docs searchSearch Observe's documentation
observe cli installConfigure shell integration (PATH, completions)
observe cli uninstallRemove shell integration
observe cli upgradeUpgrade to the latest version

Experimental commands

Experimental commands are hidden by default and gated behind an environment variable. They are not covered by SemVer — their names, flags, and output may change or be removed without notice.

# Enable experimental commands for the sessionexport OBSERVE_CLI_EXPERIMENTAL=1
observe help# experimental commands now appear, tagged [experimental]

Configuration

Credentials are stored in ~/.observe/config.json with mode 600 (owner-only access). Permissions are automatically enforced on every write.

# Browser-based login (recommended)
observe auth login
# Login to a specific customer
observe auth login --url 123456.observeinc.com
# Device code flow (for headless environments)
observe auth login --useDeviceCode --url 123456.observeinc.com
# Check current auth status
observe auth status
# Manual configuration
observe auth configure --domain observeinc --customerId 123456 --token YOUR_API_KEY

Profiles

Profiles let you store credentials for multiple Observe environments (e.g. production and staging) and switch between them easily.

# Login and save credentials under a named profile
observe auth login --profile staging --url 123456.observeinc.com
# List all saved profiles
observe auth profile list
# Permanently switch the default profile
observe auth profile use staging
# Use a profile for a single command without switching the default
OBSERVE_PROFILE=staging observe auth status

Profile selection priority: OBSERVE_PROFILE env var → currentProfile in the config file → "default".

Agent Skills

Agent skills are instruction documents that teach a coding agent how to drive the CLI, write OPAL, and investigate with Observe data. Observe curates a set of them in observeinc/skills; the CLI fetches the current version on demand, so you do not need to clone anything.

# Install every curated skill into each coding agent the CLI detects
observe skill install --all
# Install specific skills by name
observe skill install observe-cli generate-opal
# Install into the current repo rather than your home directory
observe skill install --all --project
# Refresh installed skills to the latest published version
observe skill update

observe skill list shows which skills exist and which are already installed. Skills your organization stores in Observe are reachable with the same commands under --user-defined.

Contributing

Contributions are welcome! For non-trivial changes, please open an issue first so we can align on the approach — the change may already be planned, in progress, or out of scope.

Please use Conventional Commits for commit messages (e.g. fix(query): handle empty result set).


Development

Prerequisites

Setup

git clone <repository-url>cd cli
bun install

Running Locally

# Run CLI in development mode
bun dev --help
# Run commands
bun dev dataset list
bun dev metric list --match "cpu"
bun dev tag-value list --match checkout

Scripts

bun dev # Run CLI in development mode
bun test# Run codegen, typecheck, lint, format, and unit tests
bun test:integration # Integration tests against a real tenant (requires env vars below)
bun typecheck # Type checking
bun lint # Check for issues
bun format # Check formatting
bun codegen # Generate GraphQL and REST API types

Integration tests

Add credentials to .env (see .env.example), then run:

bun run test:integration

License

Apache-2.0

About

No description, website, or topics provided.

Resources

Contributing

Stars

4 stars

Watchers

3 watching

Forks

Releases

Packages

Used by

Contributors

Languages