CLI Reference
What is Pulse CLI?
Section titled “What is Pulse CLI?”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)
Install
Section titled “Install”Recommended (one-line installer):
curl -fsSL https://raw.githubusercontent.com/EK-LABS-LLC/trace-cli/main/install.sh | shFrom source:
git clone https://github.com/anthropics/pulse-trace-clicd pulse-trace-cli
# Build + install to ~/.local/bin/pulsemake installOr install directly with Cargo:
cargo install --path .Make sure ~/.local/bin is on your PATH if you used make install.
Getting Started
Section titled “Getting Started”1. Install
Section titled “1. Install”curl -fsSL https://raw.githubusercontent.com/EK-LABS-LLC/trace-cli/main/install.sh | sh2. Configure
Section titled “2. Configure”pulse initYou will be prompted for trace service URL, API key, and project ID.
3. Connect
Section titled “3. Connect”pulse connectPulse auto-detects supported agents (Claude Code, Opencode, OpenClaw) and installs integrations.
4. Verify
Section titled “4. Verify”pulse statusAfter this, agent sessions send traces automatically.
Setup in 3 commands
Section titled “Setup in 3 commands”pulse initpulse connectpulse statusAfter setup, use your agent normally. Pulse captures sessions, tool calls, prompts, responses, and lifecycle events automatically.
Command reference
Section titled “Command reference”pulse init
Section titled “pulse init”Configures trace-service connection and writes ~/.pulse/config.toml.
Interactive:
pulse initNon-interactive:
pulse init \ --api-url https://pulse.example.com \ --api-key sk-xxx \ --project-id my-projectSkip health-check validation:
pulse init \ --api-url https://pulse.example.com \ --api-key sk-xxx \ --project-id my-project \ --no-validate| Flag | Description |
|---|---|
--api-url <URL> | Trace service URL |
--api-key <KEY> | API key |
--project-id <ID> | Project identifier |
--no-validate | Skip health check |
pulse connect
Section titled “pulse connect”Installs Pulse integrations into detected agents.
pulse connectTypical output:
Claude Code: installed 10/10 hooksOpencode: installed pluginOpenClaw: installed hookSafe to run multiple times (idempotent).
pulse disconnect
Section titled “pulse disconnect”Removes Pulse-specific integrations from detected agents.
pulse disconnectOnly Pulse entries are removed; other hooks/plugins are preserved.
Uninstall
Section titled “Uninstall”pulse disconnectrm ~/.local/bin/pulserm -rf ~/.pulsepulse status
Section titled “pulse status”Shows config, connectivity, and integration health.
pulse statusTypical 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 detectedpulse emit <event_type>
Section titled “pulse emit <event_type>”Internal command called by integrations. Usually not called directly.
echo '{"session_id":"abc","tool_name":"Bash"}' | pulse emit pre_tool_useDesign constraints:
- always exits with code
0 - no stdout/stderr output
- 2-second HTTP timeout
Configuration
Section titled “Configuration”Config file: ~/.pulse/config.toml
api_url = "https://pulse.example.com"api_key = "sk-your-api-key"project_id = "my-project"| Field | Description |
|---|---|
api_url | Base URL of Pulse trace service |
api_key | Bearer token for authentication |
project_id | Project identifier attached to spans |
Environment variables
Section titled “Environment variables”| Variable | Description |
|---|---|
PULSE_DEBUG | Set 1 to log raw integration payloads |
PULSE_DEBUG_LOG | Override debug log path (~/.pulse/debug.log by default) |
Events and span model
Section titled “Events and span model”Pulse integrations emit these normalized event types:
| Event | Kind | Description |
|---|---|---|
session_start | session | Agent session begins |
session_end | session | Agent session ends |
stop | session | Agent stops execution |
user_prompt_submit | user_prompt | User sends prompt |
assistant_message | llm_response | Assistant response |
pre_tool_use | tool_use | Tool call about to run |
post_tool_use | tool_use | Tool call succeeded |
post_tool_use_failure | tool_use | Tool call failed/interrupted |
subagent_start | agent_run | Child agent started |
subagent_stop | agent_run | Child agent finished |
notification | notification | Agent 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.
Agent integrations at a glance
Section titled “Agent integrations at a glance”| Integration | Detection path | Pulse-managed files |
|---|---|---|
| Claude Code | ~/.claude/settings.json | hooks 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.
Troubleshooting
Section titled “Troubleshooting”Config missing
Section titled “Config missing”Run:
pulse initAgent not detected
Section titled “Agent not detected”Pulse detection paths:
- Claude Code:
~/.claude/settings.json - Opencode:
~/.config/opencode/ - OpenClaw:
~/.openclaw/
Hooks installed but no spans
Section titled “Hooks installed but no spans”- Run
pulse statusand confirm trace service is reachable. - Enable debug logs with
PULSE_DEBUG=1. - Check
~/.pulse/debug.logfor incoming payloads. - Verify API key and project ID.
Stale integration plugin
Section titled “Stale integration plugin”After CLI upgrades, run:
pulse connectArchitecture
Section titled “Architecture”Claude Code hooks / Opencode plugin / OpenClaw hook -> pulse emit <event_type> -> normalize payload into span -> POST /v1/spans/async (2s timeout) -> Pulse trace serviceDesign choices:
- non-blocking hooks
- silent failure mode for integrations (
pulse emitexits0) - idempotent connect/disconnect behavior
- no runtime npm downloads for plugin content
Building from source
Section titled “Building from source”# Debug buildmake build
# Release buildmake release
# Run testsmake test
# Install to ~/.local/binmake installRunning E2E tests
Section titled “Running E2E tests”Requires Docker/Podman and a reachable Pulse trace service.
# Run all suitesmake e2e
# Individual suitesmake e2e-claudemake e2e-claude-toolsmake e2e-opencodemake e2e-opencode-tools