Skip to content

doitintl/dci-cli

Repository files navigation

Ask DeepWiki

DoiT Cloud Intelligence CLI

dci is the command-line interface for the DoiT Cloud Intelligence API. Manage budgets, reports, alerts, and run analytics queries directly from your terminal.

Installation

# macOS (Homebrew) — the `brew trust` step is required once on Homebrew 6+
brew trust doitintl/dci-cli
brew install doitintl/dci-cli/dci

# Windows (WinGet)
winget install DoiT.dci

# Windows (Scoop)
scoop bucket add doitintl https://github.com/doitintl/dci-cli
scoop install dci

# Linux (.deb)
sudo dpkg -i dci_*_linux_amd64.deb

# Linux (.rpm)
sudo rpm -i dci_*_linux_amd64.rpm

Prebuilt binaries for all platforms are available on the Releases page.

Getting Started

On first run, dci automatically configures itself and opens a browser window for authentication via the DoiT Console. You can also sign in explicitly:

# Sign in to the DoiT Console
dci login

# Check your CLI configuration
dci status

# List your budgets
dci list-budgets

# List reports as a table
dci list-reports

# Run an analytics query
dci query body.query:"SELECT * FROM aws_cur_2_0 LIMIT 10"

Usage

# See all available commands
dci --help

# Get help for a specific command
dci list-budgets --help

Output Formats

The default output format is table. Override it with the --output flag:

dci list-budgets --output json
dci list-budgets --output yaml
dci list-budgets --output table
dci list-budgets --output toon

toon emits Token-Oriented Object Notation — a compact, lossless format that uses ~40% fewer tokens than JSON for list-shaped data. It is opt-in and most useful when driving the CLI from an LLM agent.

Table Options

# Wrap long cell values instead of truncating
dci list-budgets --table-mode wrap

# Show only specific columns
dci list-budgets --table-columns id,name,amount

Agent Mode

dci adapts its output depending on whether a human or an AI agent is driving it. In human mode (the default in an interactive terminal) you get tables, color, and contextual hints. In agent mode the CLI emits clean, deterministic output that is cheap to parse and free of decoration:

  • Default --output becomes toon (compact, token-efficient) instead of table
  • No color, spinners, or other terminal decoration
  • Banners, tips, and status chatter go to stderr, leaving stdout for data only
  • The request User-Agent carries a mode= token — agent (explicit flag/env or a known AI-agent environment), noninteractive (piped/redirected output or CI/CD), or interactive (human at a terminal) — so API traffic can be segmented by interface

How agent mode is detected

Detection runs in priority order — the first match wins:

  1. DCI_AGENT_MODE environment variableDCI_AGENT_MODE=1 forces agent mode, DCI_AGENT_MODE=0 forces human mode. Always wins.
  2. --agent / --no-agent flags — explicit, per-invocation override.
  3. Known agent environment variables — if any of these are set, agent mode is assumed: CLAUDECODE, CLAUDE_CODE, CURSOR_AGENT, KIRO_AGENT, AIDER_SESSION, GEMINI_CLI, REPLIT_AGENT, WINDSURF_AGENT, OPENHANDS_AGENT, DEVIN_AGENT. (Open a PR to extend this list.)
  4. Non-TTY stdout — a soft signal: when output is piped or redirected and no setting above applies, agent mode is assumed.
# Force agent mode
DCI_AGENT_MODE=1 dci list-budgets
dci --agent list-budgets

# Force human mode (tables, color) even when piping or running under an agent
dci --no-agent list-budgets | less -S

Run dci status to see whether agent mode is active and why.

Updating

# macOS (Homebrew)
brew update && brew upgrade dci

# Windows (WinGet)
winget upgrade DoiT.dci

# Windows (Scoop)
scoop update dci

Note (Homebrew 6+): if dci stops appearing in brew upgrade, the tap is untrusted and Homebrew skips it silently. Run brew trust doitintl/dci-cli once to fix it.

Authentication

By default, dci authenticates interactively via the DoiT Console (OAuth). For CI pipelines and non-interactive environments, set the DCI_API_KEY environment variable:

export DCI_API_KEY=<your-api-key>
dci list-budgets --output json

When DCI_API_KEY is set, the CLI skips the browser-based login and authenticates using the API key directly. Run dci status to verify the active auth method.

Configuration

Configuration is stored in your OS user config directory:

OS Path
macOS ~/Library/Application Support/dci/apis.json
Linux ~/.config/dci/apis.json
Windows %APPDATA%\dci\apis.json

The config file is created automatically on first run. Delete it to reset to defaults.

AI Agent Skill

This repo ships a reusable agent skill at skills/dci-cli that teaches AI coding agents how to operate the dci CLI safely and effectively.

Install it with the built-in subcommand:

dci skill claude   # installs to ~/.claude/skills/dci-cli/
dci skill codex    # installs to ~/.codex/skills/dci-cli/
dci skill kiro     # installs to ~/.kiro/skills/dci-cli/
dci skill gemini   # installs to ~/.gemini/skills/dci-cli/

Run dci skill --help for the full list of supported agents.

Alternatively, for Codex you can use the skill-installer helper:

python3 ~/.codex/skills/.system/skill-installer/scripts/install-skill-from-github.py \
  --repo doitintl/dci-cli \
  --path skills/dci-cli

License

See LICENSE for details.

About

CLI for the DoiT Cloud Intelligence API

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors