Skip to content

CLI Reference

Pulse CLI (pulse) captures AI-agent activity as structured spans and ships it to your Pulse trace service.

It is designed to be:

  • lightweight (single Rust binary)
  • safe for agent runtimes (non-blocking hooks)
  • quiet by default (no stdout/stderr noise from hooks)

Recommended (one-line installer):

Terminal window
curl -fsSL https://raw.githubusercontent.com/EK-LABS-LLC/trace-cli/main/install.sh | sh

From source:

Terminal window
git clone https://github.com/anthropics/pulse-trace-cli
cd pulse-trace-cli
# Build + install to ~/.local/bin/pulse
make install

Or install directly with Cargo:

Terminal window
cargo install --path .

Make sure ~/.local/bin is on your PATH if you used make install.

Terminal window
curl -fsSL https://raw.githubusercontent.com/EK-LABS-LLC/trace-cli/main/install.sh | sh
Terminal window
pulse init

You will be prompted for trace service URL, API key, and project ID.

Terminal window
pulse connect

Pulse auto-detects supported agents (Claude Code, Opencode, OpenClaw) and installs integrations.

Terminal window
pulse status

After this, agent sessions send traces automatically.

Terminal window
pulse init
pulse connect
pulse status

After setup, use your agent normally. Pulse captures sessions, tool calls, prompts, responses, and lifecycle events automatically.

Configures trace-service connection and writes ~/.pulse/config.toml.

Interactive:

Terminal window
pulse init

Non-interactive:

Terminal window
pulse init \
--api-url https://pulse.example.com \
--api-key sk-xxx \
--project-id my-project

Skip health-check validation:

Terminal window
pulse init \
--api-url https://pulse.example.com \
--api-key sk-xxx \
--project-id my-project \
--no-validate
FlagDescription
--api-url <URL>Trace service URL
--api-key <KEY>API key
--project-id <ID>Project identifier
--no-validateSkip health check

Installs Pulse integrations into detected agents.

Terminal window
pulse connect

Typical output:

Claude Code: installed 10/10 hooks
Opencode: installed plugin
OpenClaw: installed hook

Safe to run multiple times (idempotent).

Removes Pulse-specific integrations from detected agents.

Terminal window
pulse disconnect

Only Pulse entries are removed; other hooks/plugins are preserved.

Terminal window
pulse disconnect
rm ~/.local/bin/pulse
rm -rf ~/.pulse

Shows config, connectivity, and integration health.

Terminal window
pulse status

Typical output:

Configuration:
API URL: https://pulse.example.com
Project ID: my-project
API Key: sk-x***
Config: ~/.pulse/config.toml
Connectivity:
Trace service: reachable
Hooks:
Claude Code: detected, connected (10/10 hooks)
Opencode: detected, connected (plugin installed)
OpenClaw: not detected

Internal command called by integrations. Usually not called directly.

Terminal window
echo '{"session_id":"abc","tool_name":"Bash"}' | pulse emit pre_tool_use

Design constraints:

  • always exits with code 0
  • no stdout/stderr output
  • 2-second HTTP timeout

Config file: ~/.pulse/config.toml

api_url = "https://pulse.example.com"
api_key = "sk-your-api-key"
project_id = "my-project"
FieldDescription
api_urlBase URL of Pulse trace service
api_keyBearer token for authentication
project_idProject identifier attached to spans
VariableDescription
PULSE_DEBUGSet 1 to log raw integration payloads
PULSE_DEBUG_LOGOverride debug log path (~/.pulse/debug.log by default)

Pulse integrations emit these normalized event types:

EventKindDescription
session_startsessionAgent session begins
session_endsessionAgent session ends
stopsessionAgent stops execution
user_prompt_submituser_promptUser sends prompt
assistant_messagellm_responseAssistant response
pre_tool_usetool_useTool call about to run
post_tool_usetool_useTool call succeeded
post_tool_use_failuretool_useTool call failed/interrupted
subagent_startagent_runChild agent started
subagent_stopagent_runChild agent finished
notificationnotificationAgent notification event

Example span payload:

{
"span_id": "550e8400-e29b-41d4-a716-446655440000",
"session_id": "abc-123",
"timestamp": "2026-02-19T14:30:00.000Z",
"source": "claude_code",
"kind": "tool_use",
"event_type": "pre_tool_use",
"status": "success",
"tool_name": "Bash",
"tool_use_id": "tool_abc",
"tool_input": { "command": "ls" },
"metadata": {
"cli_version": "0.1.0",
"project_id": "my-project"
}
}

Additional fields such as tool_response, error, model, agent_name, and cwd are included when available.

IntegrationDetection pathPulse-managed files
Claude Code~/.claude/settings.jsonhooks entries in settings.json
Opencode~/.config/opencode/~/.config/opencode/plugin/pulse-plugin.ts
OpenClaw~/.openclaw/~/.openclaw/hooks/pulse-hook/

Pulse only modifies Pulse-owned entries/files. Other hooks and plugins are preserved.

Run:

Terminal window
pulse init

Pulse detection paths:

  • Claude Code: ~/.claude/settings.json
  • Opencode: ~/.config/opencode/
  • OpenClaw: ~/.openclaw/
  1. Run pulse status and confirm trace service is reachable.
  2. Enable debug logs with PULSE_DEBUG=1.
  3. Check ~/.pulse/debug.log for incoming payloads.
  4. Verify API key and project ID.

After CLI upgrades, run:

Terminal window
pulse connect
Claude Code hooks / Opencode plugin / OpenClaw hook
-> pulse emit <event_type>
-> normalize payload into span
-> POST /v1/spans/async (2s timeout)
-> Pulse trace service

Design choices:

  • non-blocking hooks
  • silent failure mode for integrations (pulse emit exits 0)
  • idempotent connect/disconnect behavior
  • no runtime npm downloads for plugin content
Terminal window
# Debug build
make build
# Release build
make release
# Run tests
make test
# Install to ~/.local/bin
make install

Requires Docker/Podman and a reachable Pulse trace service.

Terminal window
# Run all suites
make e2e
# Individual suites
make e2e-claude
make e2e-claude-tools
make e2e-opencode
make e2e-opencode-tools