Skip to content

CLI Reference

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

It supports two workflows:

  • local managed Pulse: the CLI starts and manages pulse-server for you
  • remote/shared Pulse: the CLI connects to an already running Pulse instance

Recommended (installs both pulse-server and pulse):

Terminal window
curl -fsSL https://raw.githubusercontent.com/EK-LABS-LLC/trace-service/main/scripts/install.sh | bash -s -- pulse-server

CLI-only 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/EK-LABS-LLC/trace-cli
cd pulse-trace-cli
make install

Re-running either installer upgrades in place. It replaces the installed binaries and keeps your existing ~/.pulse config and local data.

Use this when Pulse should run on your machine.

Terminal window
pulse setup --local
pulse up
pulse status

Daily use:

  • pulse up starts pulse-server in the background
  • pulse logs --follow tails the managed server log
  • pulse down stops the managed server

Use this when a Pulse server already exists at a URL you can reach.

Terminal window
pulse connect \
--api-url https://pulse.example.com \
--api-key pulse_sk_... \
--project-id my-project

Then verify:

Terminal window
pulse status

pulse connect saves a remote config and installs hooks locally. It does not start a server.

Re-run the trace-service installer:

Terminal window
curl -fsSL https://raw.githubusercontent.com/EK-LABS-LLC/trace-service/main/scripts/install.sh | bash -s -- pulse-server

This updates pulse-server, dashboard assets, and the pulse CLI while preserving ~/.pulse data.

If you only use the CLI locally, re-run the CLI installer:

Terminal window
curl -fsSL https://raw.githubusercontent.com/EK-LABS-LLC/trace-cli/main/install.sh | sh
CommandDescription
pulse setupBootstrap a local or remote Pulse account/project and save config
pulse upStart the managed local Pulse server in the background
pulse downStop the managed local Pulse server
pulse restartRestart the managed local Pulse server
pulse logsShow or follow managed local server logs
pulse dashboardOpen the current Pulse dashboard URL
pulse initDeprecated alias for pulse connect
pulse connectConfigure a remote Pulse instance and install hooks
pulse install-hooksInstall Pulse hooks without changing config (requires existing config)
pulse disconnectRemove all Pulse hooks from all agents
pulse statusShow mode, connectivity, server state, and hook status
pulse emit <type>Send a span (used by hooks, not by users)

Local bootstrap:

Terminal window
pulse setup --local

Fully non-interactive:

Terminal window
pulse setup \
--api-url http://localhost:3000 \
--name "Your Name" \
--email you@example.com \
--password "change-me" \
--project-name "My Project"

Remote account bootstrap against an existing server:

Terminal window
pulse setup --api-url https://pulse.example.com --no-start-server

Show the full API key in setup output:

Terminal window
pulse setup --local --show-api-key

After local setup, use pulse up for normal day-to-day startup.

Terminal window
pulse up
# Start and open the dashboard
pulse up --open

Starts pulse-server in the background, waits for /health, and prints the dashboard URL, PID, and log path.

Terminal window
pulse down

Stops the managed local pulse-server.

Terminal window
pulse restart
# Restart and open the dashboard
pulse restart --open
Terminal window
# Show the most recent lines
pulse logs
# Follow logs continuously
pulse logs --follow
# Tail more lines before following
pulse logs --lines 300 --follow
Terminal window
# Open the configured dashboard
pulse dashboard
# Print the URL without opening a browser
pulse dashboard --no-open

In local mode, this opens the local dashboard served by pulse-server. In remote mode, it opens the configured remote Pulse URL.

Terminal window
# Deprecated alias for `pulse connect`
pulse init
Terminal window
pulse connect \
--api-url https://pulse.example.com \
--api-key pulse_sk_... \
--project-id my-project

Interactive prompts work too:

Terminal window
pulse connect

This:

  • saves a remote-mode config to ~/.pulse/config.toml
  • validates /health by default
  • installs hooks into detected agents unless --no-hooks is set
Terminal window
pulse install-hooks

Installs Pulse hooks into detected agents without modifying your Pulse configuration. Use this when you are already connected to a Pulse server but don’t have hooks installed.

This command:

  • validates that ~/.pulse/config.toml exists with valid api_url, api_key, and project_id
  • prompts to run pulse connect if config is missing or incomplete
  • installs hooks for all detected tools (Claude Code, OpenCode, OpenClaw)

Use pulse connect when you need to both connect to a server AND install hooks.

Terminal window
pulse disconnect

Removes Pulse-managed hooks and plugins while leaving unrelated agent configuration alone.

Terminal window
pulse status

Shows:

  • current mode (local or remote)
  • configured API URL and project
  • local server PID, health, and log path in local mode
  • remote connectivity in remote mode
  • hook status for each detected agent

Internal command called by integrations. Usually not called directly.

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

Hot-path guarantees:

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

Config file: ~/.pulse/config.toml

Local mode example:

mode = "local"
api_url = "http://localhost:3000"
project_id = "my-project"

Remote mode example:

mode = "remote"
api_url = "https://pulse.example.com"
api_key = "pulse_sk_..."
project_id = "my-project"
FieldDescription
modelocal or remote
api_urlBase URL of the current Pulse server
api_keyProject API key used in remote mode
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 or was 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.json or ~/.claude/settings.local.jsonhooks entries in settings.json or settings.local.json
Opencode~/.config/opencode/~/.config/opencode/plugin/pulse-plugin.ts
OpenClaw~/.openclaw/~/.openclaw/hooks/pulse-hook/

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

For local mode:

Terminal window
pulse setup --local

For remote mode:

Terminal window
pulse connect --api-url https://pulse.example.com --api-key pulse_sk_... --project-id my-project
Terminal window
pulse up

Then inspect logs:

Terminal window
pulse logs --follow

Pulse detection paths:

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

After CLI upgrades, run:

Terminal window
# If already connected to a server:
pulse install-hooks
# If not yet connected:
pulse connect
Claude Code hooks / Opencode plugin / OpenClaw hook
-> pulse emit <event_type>
-> normalize payload into span
-> POST /v1/spans/async (2s timeout)
-> Pulse server

Design choices:

  • non-blocking hooks
  • silent failure mode for integrations (pulse emit exits 0)
  • idempotent connect and disconnect behavior
  • no runtime npm downloads for plugin content
Terminal window
make build
make release
make test
make install

Requires Docker or Podman and a reachable Pulse server.

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