8000 GitHub - promptconduit/cli: Open-source CLI that tracks token usage, cost, prompts, and tool calls for Claude Code, Cursor, Gemini CLI, Codex, Copilot, and Grok Build. Local-first: events land in a JSONL file you can read. · GitHub
[go: up one dir, main page]

Skip to content
promptconduitPublic

About

Open-source CLI that tracks token usage, cost, prompts, and tool calls for Claude Code, Cursor, Gemini CLI, Codex, Copilot, and Grok Build. Local-first: events land in a JSONL file you can read.

Topics

Resources

Contributing

Stars

2 stars

Watchers

0 watching

Forks

Repository files navigation

PromptConduit CLI

Every great workflow you build in Claude Code disappears when the session ends. PromptConduit captures your AI coding sessions and turns repeated patterns into reusable slash commands — automatically, and without a platform account.

CI GitHub Stars License: MIT Go

No Account? Start Here

Turn your existing AI coding transcripts into reusable Claude Code skills — no sign-up required.

# Install
curl -fsSL https://promptconduit.dev/install | bash

# Generate skills from your transcripts (uses your Claude Code subscription)
promptconduit skills generate --local

Skills are written directly to ~/.claude/skills/ and show up in Claude Code's / autocomplete immediately. Reads from Claude Code, OpenAI Codex CLI, and GitHub Copilot CLI — whichever you have installed.

Jump to full local skills docs →


Overview

PromptConduit CLI captures prompts, tool executions, and session events from AI coding assistants and forwards them to the PromptConduit platform for analysis and insights.

Supported Tools

Real-time hooks (written to ~/.promptconduit/events.jsonl with no account; a platform account is only required to sync events to the cloud):

Tool Events Captured
Claude Code Prompts, Tools, Sessions, Attachments, Cost
Cursor Prompts, Shell, MCP, Files, Attachments, Cost

Experimental (opt in with --experimental). The hooks install and capture events, but cost tracking and the dashboard aren't verified for these tools yet:

Tool Events Captured
Gemini CLI Prompts, Tools, Sessions
OpenAI Codex CLI Prompts, Tools, Permissions, Sessions
GitHub Copilot CLI Prompts, Tools, Subagents, Errors, Sessions
Grok Build Prompts, Tools, Sessions, Subagents
promptconduit install codex --experimental

Local skill generation (no account required):

Tool Transcript Location
Claude Code ~/.claude/projects/**/*.jsonl
OpenAI Codex CLI ~/.codex/**/*.jsonl
GitHub Copilot CLI ~/.copilot/session-state/**/*.jsonl

Attachment Support

The CLI automatically extracts and uploads attachments from prompts:

  • Images: JPEG, PNG, GIF, WebP, SVG, BMP, TIFF, HEIC
  • Documents: PDF, Word (.doc/.docx), Excel (.xls/.xlsx), PowerPoint (.ppt/.pptx)
  • Text: Plain text, CSV, HTML, Markdown, JSON, XML

Installation

Quick Install

curl -fsSL https://promptconduit.dev/install | bash

Or with your API key pre-configured:

curl -fsSL https://promptconduit.dev/install | bash -s -- YOUR_API_KEY

From Source

git clone https://github.com/promptconduit/cli.git
cd cli
make build
make install

Download Binary

Download the latest release for your platform from the releases page.

Staying up to date

Once installed, promptconduit checks GitHub releases at most once every 24 hours in the background. When a newer version is published it prints a one-line notice to stderr and applies the upgrade in the background (atomic self-replace; the running process is unaffected). The next invocation runs the new version.

promptconduit upgrade         # upgrade now (interactive)
promptconduit upgrade --check # only check; don't download

# Opt out of background upgrades:
promptconduit config set --disable-auto-update=true
# Or via environment:
PROMPTCONDUIT_AUTO_UPDATE=0 promptconduit ...

The check uses the unauthenticated GitHub API (60 requests/hour/IP) and is cached at ~/.config/promptconduit/update.json.

Platform Quick Start

No account? See No Account? Start Here above.

PromptConduit dashboard — sessions, skills, and recent activity

1. Set up

promptconduit init

The interactive wizard signs you in through your browser, detects your installed AI tools, and installs their hooks — the whole setup in one command. Sign up at promptconduit.dev first if you don't have an account.

2. Verify

promptconduit status
Prefer to set it up manually?
promptconduit login                  # browser sign-in; saves your key to config
promptconduit install claude-code    # or: cursor (experimental: gemini-cli | codex | copilot | grok, with --experimental)
promptconduit status

For CI or scripted setups, set the key directly instead of the browser flow:

promptconduit config set --api-key="your-api-key"   # ~/.config/promptconduit/config.json

Commands

# Install hooks for a tool
promptconduit install <tool>

# Uninstall hooks from a tool
promptconduit uninstall <tool>

# Show installation status
promptconduit status

# Test API connectivity
promptconduit test

# Generate skills locally (no account needed)
promptconduit skills generate --local [flags]

# Generate skills via platform (requires account)
promptconduit skills generate [flags]

# Sync transcripts (manual)
promptconduit sync [tool] [flags]

# Show version
promptconduit version

# Upgrade to the latest release
promptconduit upgrade

# Tail outbound HTTP traffic in real time (great for debugging hooks)
promptconduit watch
promptconduit watch --verbose    # also pretty-print request/response bodies
promptconduit watch --lines 20   # backfill the last 20 entries before going live

# Team AI spend, savings, budgets and client tags (add --json for agents)
promptconduit team [subcommand]

Every command has examples under promptconduit <command> --help.

Scripting and global flags

These flags work on every command:

Flag Environment Effect
--no-input PROMPTCONDUIT_NO_INPUT=1 Never prompt; fail with a hint naming the flag to pass instead
--no-color NO_COLOR=1 No ANSI color (also off when output isn't a terminal or TERM=dumb)
-q, --quiet PROMPTCONDUIT_QUIET=1 Hide update and telemetry notices, and tips
--debug — Print debug logging, such as each HTTP request, to stderr
-v, --version — Print the version

Output goes to stdout and errors to stderr. The exit status is 0 on success and 1 on failure. status exits 1 when no AI tool has PromptConduit hooks installed:

promptconduit status >/dev/null || promptconduit install claude-code
promptconduit status --json | jq '.tools[] | select(.installed) | .tool'

Pass API keys on stdin rather than as a flag, which leaks into shell history and the process list:

promptconduit config set --api-key-stdin < key.txt
promptconduit init --api-key-stdin --yes < key.txt

Team spend from your terminal (or your agent)

Everything on the web team page is also a command, so you can ask your coding agent "what did we spend on AI this week, and are we over budget?" and it can answer, and act, without anyone opening a dashboard. Every subcommand takes --json.

promptconduit team                                   # teams you belong to
promptconduit team create "Acme Eng"                 # start a team (free up to 3 people)
promptconduit team invite dev@example.com            # prints an invite link
promptconduit team join <invite-link>                # accept an invite

promptconduit team spend --period 7d                 # totals + top members, repos, models
promptconduit team spend --by client --json          # one breakdown: member|repo|client|model|branch|pr|day
promptconduit team savings                           # cache savings, model mix, runaway sessions
promptconduit team export --by member -o spend.csv   # CSV: client|repo|member|pr|day

promptconduit team budgets                           # month-to-date and projected spend per budget
promptconduit team budgets set --org-wide --monthly 2000
promptconduit team budgets set --repo acme/api --monthly 500
promptconduit team budgets set --member dev@example.com --monthly 150
promptconduit team budgets rm <budget-id>

promptconduit team tag acme/api "Acme Corp"          # roll a repo's spend up to a client
promptconduit team tag acme/api --clear

If you belong to more than one team, pass --org <id|slug|name> or set PROMPTCONDUIT_ORG. Budgets, tags and invites need an owner or admin.

MCP server: ask your agent

The CLI includes a Model Context Protocol server, so Claude Code, Cursor and Gemini CLI can answer cost questions themselves: "what has this session cost?", "what did we spend on AI this week?", "is any budget about to run over?". promptconduit install registers it for those three tools automatically (skip with --no-mcp).

promptconduit mcp install            # register with every tool that has hooks installed
promptconduit mcp install cursor     # or name tools: claude-code, cursor, gemini-cli
promptconduit mcp uninstall          # remove everywhere (and don't re-add after upgrades)
promptconduit mcp tools              # list what agents see
promptconduit mcp status --json      # where it is registered (machine-readable)
Tool Needs an account What it does
session_cost no Cost of the current session (tokens, per-model USD)
cost_history no Daily cost on this machine
recent_sessions no Recent sessions with their resume ids
setup_status no What's installed, signed in, local or syncing
team_spend, team_savings, team_budgets, team_export_csv, team_list yes Team spend by member, repo, client, model, PR and day, savings levers, budgets, CSV
team_set_budget, team_remove_budget, team_tag_repo, team_invite, team_create, team_join yes Change team settings (marked as writes, so your agent asks first)

The local tools read only files on your machine. The server also ships three prompts that show up as slash commands in Claude Code: spend_review, budget_check and session_cost.

To register it with another MCP client, point it at promptconduit mcp (stdio). For Claude Code by hand: claude mcp add --scope user promptconduit -- "$(which promptconduit)" mcp.

Tail outbound traffic

promptconduit watch streams every HTTP request the CLI makes to the platform — hook envelope sends, transcript syncs, insights queries, skills traffic — to your terminal as it happens. Useful for answering "is my hook actually sending anything when Claude Code fires?" without spelunking the debug log.

Each request appears as a one-line summary by default:

15:30:42  POST  /v1/events/raw  3.2KB  → 200 (87ms)

Add --verbose to also see the pretty-printed JSON body underneath each summary.

Implementation note: every request the CLI makes is mirrored to ~/.config/promptconduit/outbound.ndjson (mode 0600). Authorization, Cookie, and similar credential headers are redacted before write; bodies are capped at 64KB per row and the file rotates to outbound.ndjson.1 when it crosses 50MB. Update-check traffic from internal/updater uses a separate HTTP client and is not mirrored — that traffic is predictable and noisy and isn't what watch is for.

Sync Command

The sync command uploads conversation transcripts to the platform. With an API key, SessionEnd and Stop hooks upload that session's transcript automatically. promptconduit sync with no flags is the backfill for history that was never uploaded — local-only mode, or sessions from before you signed in.

# Sync all supported tools
promptconduit sync

# Sync only Claude Code transcripts
promptconduit sync claude-code

# Sync only Cursor transcripts
promptconduit sync cursor

# Preview what would be synced (no uploads)
promptconduit sync --dry-run

# Force re-sync already synced files
promptconduit sync --force

# Only sync transcripts newer than a date
promptconduit sync --since 2025-01-01

# Limit to N most recent transcripts
promptconduit sync --limit 10

How it works:

  • Discovers JSONL transcript files from ~/.claude/projects/ and ~/.cursor/projects/*/agent-transcripts/ (parent sessions and subagents)
  • Uploads each line as raw JSON via the public transcript sync API (tool: "claude-code" or tool: "cursor")
  • Tracks synced files in ~/.config/promptconduit/sync_state.json to avoid duplicates
  • Plan files from ~/.claude/plans/ ride along with Claude Code sync only
  • Use --dry-run first to preview, then run without flags to sync

Hooks vs Sync:

  • Hooks capture events in real-time during AI tool usage (automatic after installation)
  • Sync uploads historical transcripts (must be run manually when needed)

Local Skill Generation

Extract reusable skills from your AI coding transcripts — no platform account required. Uses your existing Claude Code subscription (or an API key) to analyze patterns and write skill files directly to ~/.claude/skills/.

# Analyze all tools, write skills globally
promptconduit skills generate --local

# Analyze only Claude Code transcripts
promptconduit skills generate --local --tool claude-code

# Scope skills to current git repo
promptconduit skills generate --local --repo owner/repo

# Re-analyze previously seen transcripts
promptconduit skills generate --local --force

# Preview what would be generated
promptconduit skills generate --local --dry-run

AI provider auto-detection (in priority order):

  1. claude CLI binary in PATH — uses your existing Claude Code / claude.ai Pro subscription
  2. ANTHROPIC_API_KEY env var — direct Anthropic API access
  3. OPENAI_API_KEY env var — OpenAI fallback (gpt-4o-mini)

How it works:

  • Reads transcripts from Claude Code, OpenAI Codex CLI, and GitHub Copilot (whichever are installed)
  • Requires ≥ 5 new conversations to detect patterns (use --force to override)
  • Writes SKILL.md files with YAML frontmatter to ~/.claude/skills/<name>/
  • Tracks analyzed transcripts by SHA256 hash in ~/.config/promptconduit/local_skills_state.json
  • Skills appear immediately in Claude Code's / autocomplete

Output example:

Analyzing 47 local transcripts (global)...
Using Claude Code (claude CLI).

Detected 3 skills:

  /ci-monitor  (workflow, 90%)
    CI Monitor
    Check CI status and fix failures until green.
    → Written to: /Users/you/.claude/skills/ci-monitor/SKILL.md

3 skills written. Use them with /ci-monitor, etc.

Free Tier — Local-Only Mode

PromptConduit has a Free tier that is 100% local: every event is captured to a file on your machine and none of your event data is ever sent to the cloud. You register for free, and your prompts, sessions, and costs never leave your computer. The only network calls are the update check, the public rate-card refresh, and an anonymous daily usage ping you can turn off (see Anonymous usage ping).

Local-only mode is the default whenever no API key is configured — installing hooks and capturing events works with no account at all. You can also opt in explicitly (useful if you have a key but want to stay local):

# Capture locally, never send — even if an API key is set
promptconduit config set --local-

# Or enable it at install time
promptconduit install claude-code --local-only

# Or per-invocation via environment variable
PROMPTCONDUIT_LOCAL_ONLY=1 ...

promptconduit status shows whether you're in Free (local-only) or Cloud sync mode. To enable cloud sync later, set an API key and turn local-only off (promptconduit config set --local->).

The local event capture log (events.jsonl)

Every captured event is written — before any network send — to:

~/.promptconduit/events.jsonl

This file is the durable, send-independent record of your events. It is written in both Free and Cloud modes (in Cloud mode the same envelope is then also sent to the platform). Each line is exactly one event envelope — the same JSON the CLI would POST to /v1/events/raw:

{"envelope_version":"1.2","tool":"claude-code","hook_event":"UserPromptSubmit","captured_at":"2026-06-23T21:11:57Z","native_payload":{ ... },"enrichment":{ ... }}

This format is a stable contract for local tooling (e.g. an editor extension that reads events.jsonl to show a live cost estimator). Secrets matching well-known patterns (API keys, bearer tokens) are redacted before write; the file rotates to events.jsonl.1 at 50MB. Disable all local logging — including this file — with PROMPTCONDUIT_EVENT_LOG=0 or promptconduit config set --disable-event-log=true.

Note: events.jsonl (raw events, captured before send) is distinct from events.ndjson (the send-outcome diagnostics log, written only when an event is actually sent).

Cost status-bar extension (Cursor)

The CLI bundles the PromptConduit cost editor extension and sideloads it into Cursor automatically when you install hooks:

promptconduit install cursor   # wires hooks AND installs the cost status-bar extension

The extension is embedded in the CLI binary (no marketplace, no separate download) and installed via Cursor's cursor --install-extension CLI, so its version is always locked to the CLI's cost-feed schema. It reads the same local cost feed promptconduit cost produces and shows live request/session cost — and the cost-reduction signals — right in the status bar.

  • Skip it: promptconduit install cursor --no-extension
  • Cursor CLI not found? The install step is skipped with a hint — open Cursor and run “Shell Command: Install 'cursor' command in PATH”, then re-run promptconduit install cursor. The hooks are installed either way.
  • The extension source lives in promptconduit/editor-extension; the bundled .vsix is refreshed with make refresh-extension.

Configuration

The CLI supports multiple configuration methods with the following priority:

  1. Environment variables (highest priority)
  2. Config file (~/.config/promptconduit/config.json)
  3. Defaults (lowest priority)

Config File (Recommended)

The config file supports multiple environments, making it easy to switch between local development, staging, and production:

# Show current configuration
promptconduit config show

# Set API key for current environment (read from stdin, not a flag)
promptconduit config set --api-key-stdin < key.txt

# Set API URL (for local development)
promptconduit config set --api-url=http://localhost:8787

# Enable debug mode
promptconduit config set --debug-mode=true

# Show config file path
promptconduit config path

Multi-Environment Setup

Create environments for local, dev, and prod:

# Create local environment
promptconduit config env add local \
  --api-key=sk_local_key \
  --api-url=http://localhost:8787 \
  --debug-mode

# Create dev environment
promptconduit config env add dev \
  --api-key=sk_dev_key \
  --api-url=https://dev-api.promptconduit.dev

# Create prod environment
promptconduit config env add prod \
  --api-key=sk_prod_key \
  --api-url=https://api.promptconduit.dev

Switching Environments

# Switch environments
promptconduit config env use local
promptconduit config env use prod

# Shorthand alias
promptconduit config set-env local

# List all environments
promptconduit config env list

# Show current environment
promptconduit config show

Important: After switching environments, start a new Claude Code session for the hooks to pick up the new configuration. The --continue flag preserves the old environment.

Environment Variables

Environment variables override config file settings:

Variable Required Default Description
PROMPTCONDUIT_API_KEY Yes - Your API key
PROMPTCONDUIT_API_URL No https://api.promptconduit.dev API endpoint
PROMPTCONDUIT_DEBUG No false Enable debug logging
PROMPTCONDUIT_TIMEOUT No 30 HTTP timeout in seconds
PROMPTCONDUIT_TOOL No Auto-detect Force specific adapter
PROMPTCONDUIT_TELEMETRY No on 0/false/off disables the anonymous usage ping
DO_NOT_TRACK No unset 1 disables the anonymous usage ping
PROMPTCONDUIT_NO_INPUT No unset 1 never prompts (same as --no-input)
PROMPTCONDUIT_QUIET No unset 1 hides update and telemetry notices and tips (same as --quiet)
PROMPTCONDUIT_NO_TIPS No unset 1 hides the occasional tip under cost output (shown at most weekly, never once you've used team)
NO_COLOR No unset Any value disables color (same as --no-color)

Warning: If using multi-environment config, avoid setting PROMPTCONDUIT_API_KEY in your shell profile. The env var will override the config file's environment-specific key, which can cause mismatches (e.g., prod API key with local URL). Use the config file exclusively or env vars exclusively, but not both.

Debug Mode

Enable debug mode to log hook activity:

# Via config
promptconduit config set --debug-mode=true

# Via environment variable
export PROMPTCONDUIT_DEBUG=1

# For one command, printed to stderr as well
promptconduit test --debug

Debug logs are written to the CLI log (promptconduit logs --path prints where; usually ~/.config/promptconduit/logs/promptconduit.log).

Architecture

┌─────────────────────────────────────────────────────────────┐
│                     AI Coding Tools                          │
├─────────────┬─────────────────────┬─────────────────────────┤
│ Claude Code │       Cursor        │      Gemini CLI         │
└──────┬──────┴──────────┬──────────┴───────────┬─────────────┘
       │                 │                      │
       └─────────────────┼──────────────────────┘
                         ▼
              ┌─────────────────────┐
              │   promptconduit     │  ← Hook receives raw JSON
              │      hook           │    from stdin
              └──────────┬──────────┘
                         │
              ┌──────────▼──────────┐
              │   Raw Envelope      │  ← Wraps event with
              │   + Git Context     │    metadata & repo state
              └──────────┬──────────┘
                         │
              ┌──────────▼──────────┐
              │    Async Send       │  ← Non-blocking POST to
              │  (subprocess)       │    /v1/events/raw
              └──────────┬──────────┘
                         │
              ┌──────────▼──────────┐
              │  PromptConduit API  │  ← Server-side adapters
              │  (normalization)    │    transform to canonical
              └─────────────────────┘

Key Design Principles

  • Thin client: The CLI wraps raw events in an envelope — all normalization happens server-side
  • Never blocks tools: Hook always returns immediately with success
  • Async sending: Events are sent in a detached subprocess
  • Rich context: Captures git state (branch, commit, dirty files, etc.)
  • Attachment extraction: Parses transcripts to extract images and documents
  • Multipart uploads: Attachments sent efficiently via multipart form data
  • Graceful degradation: Unknown events are silently skipped

Wire format

The CLI is intentionally thin: it forwards each AI tool's raw hook event untouched in native_payload, plus an enrichment block of locally computed context (git, host, correlation IDs). The platform's server-side adapters do the categorization and normalization. That keeps the CLI small and lets the platform evolve event taxonomy without forcing CLI upgrades.

The envelope is currently at version 1.2:

{
  "envelope_version": "1.2",
  "cli_version": "v0.5.0",
  "tool": "claude-code",
  "hook_event": "UserPromptSubmit",
  "captured_at": "2026-05-16T13:04:11Z",
  "native_payload": {
    "session_id": "abc123",
    "hook_event_name": "UserPromptSubmit",
    "prompt": "Refactor the auth module",
    "cwd": "/Users/me/my-project"
  },
  "enrichment": {
    "git": {
      "repo_name": "my-project",
      "branch": "main",
      "commit_hash": "abc123",
      "is_dirty": true,
      "remote_url": "git@github.com:me/my-project.git"
    },
    "source": "github",
    "correlation": {
      "trace_id": "151a9441671718243f44d5b0fa183894",
      "span_id": "143855046e61e7f8"
    },
    "host": "my-laptop",
    "os": "darwin",
    "arch": "arm64"
  }
}

Field reference:

Field Description
envelope_version Schema version. Currently 1.2.
cli_version Version of promptconduit that produced the event.
tool claude-code, cursor, gemini-cli, codex, copilot, grok, or unknown.
hook_event The tool's native hook event name (e.g. UserPromptSubmit, preToolUse). Not canonicalized — that happens server-side.
captured_at ISO 8601 timestamp at the moment the hook fired.
native_payload Raw JSON the tool wrote to the hook's stdin. Pass-through.
enrichment.git Repo metadata derived from cwd (branch, dirty state, commit hash, remote). Omitted when not in a git repo.
enrichment.source Git provider derived from the remote URL (github, gitlab, bitbucket, azure).
enrichment.correlation W3C Trace Context-compatible IDs so events stitch into a single trace. trace_id is stable per session; span_id is unique per event.
enrichment.host, os, arch Machine identity, runtime GOOS, runtime GOARCH.
attachments When present: array of {attachment_id, filename, content_type, size_bytes, type}. Binary data is sent as a separate multipart field.

Image and document bytes ride alongside the envelope as multipart parts on the same /v1/events/raw request — never embedded as base64 in the JSON.

Headless Mode (claude -p)

PromptConduit hooks work in Claude Code's headless/print mode (claude -p "...") without any changes. Hooks fire and capture events identically in both interactive and non-interactive sessions.

--bare mode limitation: When running claude --bare -p "...", Claude Code skips auto-discovery of hooks and settings, so PromptConduit hooks will not fire. To capture events in bare mode, explicitly pass your settings file:

claude --bare -p "your prompt" --settings ~/.claude/settings.json

Note: --bare is expected to become the default for -p in a future Claude Code release. The --settings workaround ensures capture until that changes.

Development

Prerequisites

  • Go 1.21+
  • Git

Building

# Build binary
make build

# Run tests
make test

# Build for all platforms
make build-all

# Create snapshot release
make snapshot

Project Structure

.
├── cmd/                    # CLI commands
│   ├── root.go             # Root command + background update-check wiring
│   ├── install.go          # Install hooks for AI tools (5 tools)
│   ├── uninstall.go        # Remove hooks
│   ├── status.go           # Show installation status
│   ├── test.go             # Test API connectivity
│   ├── hook.go             # Hook entry point (receives raw events)
│   ├── config.go           # Config management
│   ├── sync.go             # Manual transcript sync
│   ├── upgrade.go          # `promptconduit upgrade` (self-replace)
│   ├── watch.go            # `promptconduit watch` (tail outbound traffic)
│   ├── insights.go         # Personal usage insights
│   ├── team.go             # Team spend, savings, budgets, client tags, invites
│   ├── mcp*.go             # MCP server command, tools/prompts, agent registration
│   ├── skills.go           # Skill detection (platform)
│   ├── skills_local.go     # Skill detection (local, no account)
│   ├── correlation.go      # W3C trace_id/span_id helpers
│   └── debug.go            # Internal debugging commands
├── internal/
│   ├── envelope/           # Raw event envelope types (v1.2)
│   ├── client/             # HTTP client with multipart upload
│   ├── correlation/        # W3C trace_id/span_id generation + persistence
│   ├── git/                # Git context extraction
│   ├── outbound/           # http.RoundTripper that mirrors outbound traffic
│   │                       # to outbound.ndjson (drives `watch`)
│   ├── sync/               # Transcript sync and parsing
│   │   ├── claudecode.go   # Claude Code transcript parser
│   │   ├── state.go        # Sync state management
│   │   └── types.go        # Parser interface and types
│   ├── transcript/         # Transcript parsing & attachment extraction
│   └── updater/            # GitHub-release version check + atomic self-replace
├── scripts/
│   └── install.sh          # Curl installer
├── .goreleaser.yaml        # Release configuration
├── Makefile                # Build commands
└── go.mod                  # Go module

Privacy & Security

  • Open Source: Full transparency on what data is captured
  • Minimal: Only captures events needed for analysis
  • Secure: HTTPS with API key authentication
  • Non-blocking: Never interferes with your workflow
  • Free / local-only tier: With no API key (or --local-only), events are captured to ~/.promptconduit/events.jsonl and nothing is sent to the cloud. See Free Tier — Local-Only Mode.
  • Local event capture log: Every event is written to ~/.promptconduit/events.jsonl (mode 0644) before any send, with secrets redacted; rotates at 50MB. Disable with PROMPTCONDUIT_EVENT_LOG=0.
  • Local outbound mirror: Every HTTP request the CLI makes is also written to ~/.config/promptconduit/outbound.ndjson (mode 0600, owner-only) so you can tail it with promptconduit watch. Authorization, Cookie, and any header matching token / secret / key is redacted to *** before write. Bodies are capped at 64KB per row; the file rotates to outbound.ndjson.1 at 50MB.
  • Background self-upgrade: A once-per-24h GitHub releases check fetches /repos/promptconduit/cli/releases/latest (no auth, no payload uploaded). Disable with promptconduit config set --disable-auto-update=true or PROMPTCONDUIT_AUTO_UPDATE=0.
  • Anonymous usage ping: see below.

Anonymous usage ping

To count active installs, the CLI sends one anonymous ping per day to POST /v1/ping on the configured API URL (https://api.promptconduit.dev by default). This is the complete payload:

Field Example What it is
install_id 3f2b8c1e-… Random UUID generated on your machine (stored in ~/.config/promptconduit/telemetry.json)
cli_version 0.28.0 CLI version
os, arch darwin, arm64 Operating system and CPU architecture
tools ["claude-code","cursor"] Which AI tools have PromptConduit hooks installed
extension_version 0.23.0 Installed cost extension version, if any
logged_in false Whether an API key is configured

It never includes your name, email, file paths, repository or branch names, prompts, or costs, and the server does not store your IP address with it. The request is mirrored to outbound.ndjson like every other request, so promptconduit watch shows it.

  • Notice first. Nothing is sent until an interactive command has printed a one-time notice. Hooks never print, and never send before that.
  • Never blocks. The send runs in a detached background process.
  • Opt out with any of: promptconduit config set --disable-telemetry=true, DO_NOT_TRACK=1, or PROMPTCONDUIT_TELEMETRY=0. It is also off when CI is set, and only tagged release builds send it (local make and snapshot builds never do). If config.json can't be parsed, the ping stays off rather than guessing. promptconduit config show reports the current state.

License

MIT - Copyright (c) 2026 PromptConduit

Links

About

Open-source CLI that tracks token usage, cost, prompts, and tool calls for Claude Code, Cursor, Gemini CLI, Codex, Copilot, and Grok Build. Local-first: events land in a JSONL file you can read.

Topics

Resources

Contributing

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

0