{"id":48683370,"url":"https://github.com/promptconduit/cli","last_synced_at":"2026-07-03T22:00:37.691Z","repository":{"id":336903154,"uuid":"1121206819","full_name":"promptconduit/cli","owner":"promptconduit","description":"Skill distribution","archived":false,"fork":false,"pushed_at":"2026-06-28T15:10:31.000Z","size":7439,"stargazers_count":1,"open_issues_count":7,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-28T17:08:46.647Z","etag":null,"topics":["ai-tools","claude-code","developer-tools","golang","hooks"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/promptconduit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-22T15:55:24.000Z","updated_at":"2026-06-25T05:17:09.000Z","dependencies_parsed_at":"2026-05-10T23:04:59.332Z","dependency_job_id":null,"html_url":"https://github.com/promptconduit/cli","commit_stats":null,"previous_names":["promptconduit/cli"],"tags_count":25,"template":false,"template_full_name":null,"purl":"pkg:github/promptconduit/cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/promptconduit%2Fcli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/promptconduit%2Fcli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/promptconduit%2Fcli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/promptconduit%2Fcli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/promptconduit","download_url":"https://codeload.github.com/promptconduit/cli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/promptconduit%2Fcli/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35102742,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-03T02:00:05.635Z","response_time":110,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-tools","claude-code","developer-tools","golang","hooks"],"created_at":"2026-04-11T03:36:05.702Z","updated_at":"2026-07-03T22:00:37.684Z","avatar_url":"https://github.com/promptconduit.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PromptConduit CLI\n\nEvery 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.\n\n[![CI](https://github.com/promptconduit/cli/actions/workflows/test.yml/badge.svg)](https://github.com/promptconduit/cli/actions/workflows/test.yml)\n[![GitHub Stars](https://img.shields.io/github/stars/promptconduit/cli?style=social)](https://github.com/promptconduit/cli/stargazers)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Go](https://img.shields.io/badge/go-1.21+-blue.svg)](https://go.dev/dl/)\n\n## No Account? Start Here\n\nTurn your existing AI coding transcripts into reusable Claude Code skills — **no sign-up required**.\n\n```bash\n# Install\nbrew tap promptconduit/tap \u0026\u0026 brew install promptconduit\n\n# Generate skills from your transcripts (uses your Claude Code subscription)\npromptconduit skills generate --local\n```\n\nSkills 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.\n\n[Jump to full local skills docs →](#local-skill-generation)\n\n---\n\n## Overview\n\nPromptConduit CLI captures prompts, tool executions, and session events from AI coding assistants and forwards them to the PromptConduit platform for analysis and insights.\n\n### Supported Tools\n\n**Real-time hooks** (requires [platform account](https://promptconduit.dev)):\n\n| Tool | Events Captured |\n|------|-----------------|\n| [Claude Code](https://claude.ai/code) | Prompts, Tools, Sessions, Attachments |\n| [Cursor](https://cursor.com) | Prompts, Shell, MCP, Files, Attachments |\n| [Gemini CLI](https://geminicli.com) | Prompts, Tools, Sessions |\n| [OpenAI Codex CLI](https://github.com/openai/codex) | Prompts, Tools, Permissions, Sessions |\n| [GitHub Copilot CLI](https://github.com/github/copilot-cli) | Prompts, Tools, Subagents, Errors, Sessions |\n\n**Local skill generation** (no account required):\n\n| Tool | Transcript Location |\n|------|---------------------|\n| Claude Code | `~/.claude/projects/**/*.jsonl` |\n| OpenAI Codex CLI | `~/.codex/**/*.jsonl` |\n| GitHub Copilot CLI | `~/.copilot/session-state/**/*.jsonl` |\n\n### Attachment Support\n\nThe CLI automatically extracts and uploads attachments from prompts:\n\n- **Images**: JPEG, PNG, GIF, WebP, SVG, BMP, TIFF, HEIC\n- **Documents**: PDF, Word (.doc/.docx), Excel (.xls/.xlsx), PowerPoint (.ppt/.pptx)\n- **Text**: Plain text, CSV, HTML, Markdown, JSON, XML\n\n## Installation\n\n### Homebrew (Recommended)\n\n```bash\nbrew tap promptconduit/tap\nbrew install promptconduit\n```\n\n### Quick Install Script\n\n```bash\ncurl -fsSL https://promptconduit.dev/install | bash\n```\n\nOr with your API key pre-configured:\n\n```bash\ncurl -fsSL https://promptconduit.dev/install | bash -s -- YOUR_API_KEY\n```\n\n### From Source\n\n```bash\ngit clone https://github.com/promptconduit/cli.git\ncd cli\nmake build\nmake install\n```\n\n### Download Binary\n\nDownload the latest release for your platform from the [releases page](https://github.com/promptconduit/cli/releases).\n\n### Staying up to date\n\nOnce installed, `promptconduit` checks GitHub releases at most once every 24 hours\nin the background. When a newer version is published it prints a one-line notice\nto stderr and applies the upgrade in the background (atomic self-replace; the\nrunning process is unaffected). The next invocation runs the new version.\n\n```bash\npromptconduit upgrade         # upgrade now (interactive)\npromptconduit upgrade --check # only check; don't download\n\n# Opt out of background upgrades:\npromptconduit config set --disable-auto-update=true\n# Or via environment:\nPROMPTCONDUIT_AUTO_UPDATE=0 promptconduit ...\n```\n\nThe check uses the unauthenticated GitHub API (60 requests/hour/IP) and is\ncached at `~/.config/promptconduit/update.json`. Homebrew users get a notice\npointing them to `brew upgrade promptconduit` instead — the CLI never tries\nto overwrite a binary it cannot write to.\n\n## Platform Quick Start\n\n\u003e **No account?** See [No Account? Start Here](#no-account-start-here) above.\n\n![PromptConduit dashboard — sessions, skills, and recent activity](docs/screenshot-dashboard.png)\n\n### 1. Get your API key\n\nSign up at [promptconduit.dev](https://promptconduit.dev) and create an API key.\n\n### 2. Configure your API key\n\n```bash\npromptconduit config set --api-key=\"your-api-key\"\n```\n\nThis saves your key to `~/.config/promptconduit/config.json`.\n\n### 3. Install hooks for your tool\n\n```bash\n# For Claude Code\npromptconduit install claude-code\n\n# For Cursor\npromptconduit install cursor\n\n# For Gemini CLI\npromptconduit install gemini-cli\n\n# For OpenAI Codex CLI\npromptconduit install codex\n\n# For GitHub Copilot CLI\npromptconduit install copilot\n```\n\n### 4. Verify installation\n\n```bash\npromptconduit status\n```\n\n### 5. Test API connectivity\n\n```bash\npromptconduit test\n```\n\n## Commands\n\n```bash\n# Install hooks for a tool\npromptconduit install \u003ctool\u003e\n\n# Uninstall hooks from a tool\npromptconduit uninstall \u003ctool\u003e\n\n# Show installation status\npromptconduit status\n\n# Test API connectivity\npromptconduit test\n\n# Generate skills locally (no account needed)\npromptconduit skills generate --local [flags]\n\n# Generate skills via platform (requires account)\npromptconduit skills generate [flags]\n\n# Sync transcripts (manual)\npromptconduit sync [tool] [flags]\n\n# Show version\npromptconduit version\n\n# Upgrade to the latest release\npromptconduit upgrade\n\n# Tail outbound HTTP traffic in real time (great for debugging hooks)\npromptconduit watch\npromptconduit watch --verbose    # also pretty-print request/response bodies\npromptconduit watch --lines 20   # backfill the last 20 entries before going live\n```\n\n### Tail outbound traffic\n\n`promptconduit watch` streams every HTTP request the CLI makes to the\nplatform — hook envelope sends, transcript syncs, insights queries,\nskills traffic — to your terminal as it happens. Useful for answering\n\"is my hook actually sending anything when Claude Code fires?\" without\nspelunking the debug log.\n\nEach request appears as a one-line summary by default:\n\n```\n15:30:42  POST  /v1/events/raw  3.2KB  → 200 (87ms)\n```\n\nAdd `--verbose` to also see the pretty-printed JSON body underneath\neach summary.\n\nImplementation note: every request the CLI makes is mirrored to\n`~/.config/promptconduit/outbound.ndjson` (mode `0600`). Authorization,\nCookie, and similar credential headers are redacted before write;\nbodies are capped at 64KB per row and the file rotates to\n`outbound.ndjson.1` when it crosses 50MB. Update-check traffic from\n`internal/updater` uses a separate HTTP client and is **not** mirrored\n— that traffic is predictable and noisy and isn't what `watch` is for.\n\n### Sync Command\n\nThe `sync` command uploads historical conversation transcripts to the platform. **This is a manual process** - there is no automatic syncing of transcripts.\n\n```bash\n# Sync all supported tools\npromptconduit sync\n\n# Sync only Claude Code transcripts\npromptconduit sync claude-code\n\n# Preview what would be synced (no uploads)\npromptconduit sync --dry-run\n\n# Force re-sync already synced files\npromptconduit sync --force\n\n# Only sync transcripts newer than a date\npromptconduit sync --since 2025-01-01\n\n# Limit to N most recent transcripts\npromptconduit sync --limit 10\n```\n\n**How it works:**\n- Discovers JSONL transcript files from `~/.claude/projects/`\n- Extracts conversation metadata, messages, and git context\n- Tracks synced files in `~/.config/promptconduit/sync_state.json` to avoid duplicates\n- Use `--dry-run` first to preview, then run without flags to sync\n\n**Hooks vs Sync:**\n- **Hooks** capture events in real-time during AI tool usage (automatic after installation)\n- **Sync** uploads historical transcripts (must be run manually when needed)\n\n### Local Skill Generation\n\nExtract 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/`.\n\n```bash\n# Analyze all tools, write skills globally\npromptconduit skills generate --local\n\n# Analyze only Claude Code transcripts\npromptconduit skills generate --local --tool claude-code\n\n# Scope skills to current git repo\npromptconduit skills generate --local --repo owner/repo\n\n# Re-analyze previously seen transcripts\npromptconduit skills generate --local --force\n\n# Preview what would be generated\npromptconduit skills generate --local --dry-run\n```\n\n**AI provider auto-detection** (in priority order):\n1. `claude` CLI binary in PATH — uses your existing [Claude Code](https://claude.ai/code) / claude.ai Pro subscription\n2. `ANTHROPIC_API_KEY` env var — direct Anthropic API access\n3. `OPENAI_API_KEY` env var — OpenAI fallback (gpt-4o-mini)\n\n**How it works:**\n- Reads transcripts from Claude Code, OpenAI Codex CLI, and GitHub Copilot (whichever are installed)\n- Requires ≥ 5 new conversations to detect patterns (use `--force` to override)\n- Writes `SKILL.md` files with YAML frontmatter to `~/.claude/skills/\u003cname\u003e/`\n- Tracks analyzed transcripts by SHA256 hash in `~/.config/promptconduit/local_skills_state.json`\n- Skills appear immediately in Claude Code's `/` autocomplete\n\n**Output example:**\n```\nAnalyzing 47 local transcripts (global)...\nUsing Claude Code (claude CLI).\n\nDetected 3 skills:\n\n  /ci-monitor  (workflow, 90%)\n    CI Monitor\n    Check CI status and fix failures until green.\n    → Written to: /Users/you/.claude/skills/ci-monitor/SKILL.md\n\n3 skills written. Use them with /ci-monitor, etc.\n```\n\n## Free Tier — Local-Only Mode\n\nPromptConduit has a **Free tier that is 100% local**: every event is captured to\na file on your machine and **nothing is ever sent to the cloud**. You register\nfor free, but no telemetry leaves your computer.\n\nLocal-only mode is the default whenever no API key is configured — installing\nhooks and capturing events works with no account at all. You can also opt in\nexplicitly (useful if you have a key but want to stay local):\n\n```bash\n# Capture locally, never send — even if an API key is set\npromptconduit config set --local-only=true\n\n# Or enable it at install time\npromptconduit install claude-code --local-only\n\n# Or per-invocation via environment variable\nPROMPTCONDUIT_LOCAL_ONLY=1 ...\n```\n\n`promptconduit status` shows whether you're in **Free (local-only)** or\n**Cloud sync** mode. To enable cloud sync later, set an API key and turn\nlocal-only off (`promptconduit config set --local-only=false`).\n\n### The local event capture log (`events.jsonl`)\n\nEvery captured event is written — **before any network send** — to:\n\n```\n~/.promptconduit/events.jsonl\n```\n\nThis file is the durable, send-independent record of your events. It is written\nin **both** Free and Cloud modes (in Cloud mode the same envelope is then also\nsent to the platform). Each line is exactly one event envelope — the same JSON\nthe CLI would POST to `/v1/events/raw`:\n\n```json\n{\"envelope_version\":\"1.2\",\"tool\":\"claude-code\",\"hook_event\":\"UserPromptSubmit\",\"captured_at\":\"2026-06-23T21:11:57Z\",\"native_payload\":{ ... },\"enrichment\":{ ... }}\n```\n\nThis format is a stable contract for local tooling (e.g. an editor extension\nthat reads `events.jsonl` to show a live cost estimator). Secrets matching\nwell-known patterns (API keys, bearer tokens) are redacted before write; the\nfile rotates to `events.jsonl.1` at 50MB. Disable all local logging — including\nthis file — with `PROMPTCONDUIT_EVENT_LOG=0` or\n`promptconduit config set --disable-event-log=true`.\n\n\u003e Note: `events.jsonl` (raw events, captured before send) is distinct from\n\u003e `events.ndjson` (the send-outcome diagnostics log, written only when an event\n\u003e is actually sent).\n\n## Cost status-bar extension (Cursor)\n\nThe CLI **bundles** the PromptConduit cost editor extension and sideloads it into\nCursor automatically when you install hooks:\n\n```bash\npromptconduit install cursor   # wires hooks AND installs the cost status-bar extension\n```\n\nThe extension is embedded in the CLI binary (no marketplace, no separate\ndownload) and installed via Cursor's `cursor --install-extension` CLI, so its\nversion is always locked to the CLI's cost-feed schema. It reads the same local\ncost feed `promptconduit cost` produces and shows live request/session cost — and\nthe cost-reduction signals — right in the status bar.\n\n- **Skip it:** `promptconduit install cursor --no-extension`\n- **Cursor CLI not found?** The install step is skipped with a hint — open Cursor\n  and run *“Shell Command: Install 'cursor' command in PATH”*, then re-run\n  `promptconduit install cursor`. The hooks are installed either way.\n- The extension source lives in\n  [promptconduit/editor-extension](https://github.com/promptconduit/editor-extension);\n  the bundled `.vsix` is refreshed with `make refresh-extension`.\n\n## Configuration\n\nThe CLI supports multiple configuration methods with the following priority:\n\n1. **Environment variables** (highest priority)\n2. **Config file** (`~/.config/promptconduit/config.json`)\n3. **Defaults** (lowest priority)\n\n### Config File (Recommended)\n\nThe config file supports multiple environments, making it easy to switch between local development, staging, and production:\n\n```bash\n# Show current configuration\npromptconduit config show\n\n# Set API key for current environment\npromptconduit config set --api-key=sk_your_key_here\n\n# Set API URL (for local development)\npromptconduit config set --api-url=http://localhost:8787\n\n# Enable debug mode\npromptconduit config set --debug=true\n\n# Show config file path\npromptconduit config path\n```\n\n### Multi-Environment Setup\n\nCreate environments for local, dev, and prod:\n\n```bash\n# Create local environment\npromptconduit config env add local \\\n  --api-key=sk_local_key \\\n  --api-url=http://localhost:8787 \\\n  --debug\n\n# Create dev environment\npromptconduit config env add dev \\\n  --api-key=sk_dev_key \\\n  --api-url=https://dev-api.promptconduit.dev\n\n# Create prod environment\npromptconduit config env add prod \\\n  --api-key=sk_prod_key \\\n  --api-url=https://api.promptconduit.dev\n```\n\n### Switching Environments\n\n```bash\n# Switch environments\npromptconduit config env use local\npromptconduit config env use prod\n\n# Shorthand alias\npromptconduit config set-env local\n\n# List all environments\npromptconduit config env list\n\n# Show current environment\npromptconduit config show\n```\n\n**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.\n\n### Environment Variables\n\nEnvironment variables override config file settings:\n\n| Variable | Required | Default | Description |\n|----------|----------|---------|-------------|\n| `PROMPTCONDUIT_API_KEY` | Yes | - | Your API key |\n| `PROMPTCONDUIT_API_URL` | No | `https://api.promptconduit.dev` | API endpoint |\n| `PROMPTCONDUIT_DEBUG` | No | `false` | Enable debug logging |\n| `PROMPTCONDUIT_TIMEOUT` | No | `30` | HTTP timeout in seconds |\n| `PROMPTCONDUIT_TOOL` | No | Auto-detect | Force specific adapter |\n\n\u003e **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.\n\n### Debug Mode\n\nEnable debug mode to log hook activity:\n\n```bash\n# Via config\npromptconduit config set --debug=true\n\n# Via environment variable\nexport PROMPTCONDUIT_DEBUG=1\n```\n\nDebug logs are written to `$TMPDIR/promptconduit-hook.log` (on macOS this is typically `/var/folders/.../promptconduit-hook.log`).\n\n## Architecture\n\n```\n┌─────────────────────────────────────────────────────────────┐\n│                     AI Coding Tools                          │\n├─────────────┬─────────────────────┬─────────────────────────┤\n│ Claude Code │       Cursor        │      Gemini CLI         │\n└──────┬──────┴──────────┬──────────┴───────────┬─────────────┘\n       │                 │                      │\n       └─────────────────┼──────────────────────┘\n                         ▼\n              ┌─────────────────────┐\n              │   promptconduit     │  ← Hook receives raw JSON\n              │      hook           │    from stdin\n              └──────────┬──────────┘\n                         │\n              ┌──────────▼──────────┐\n              │   Raw Envelope      │  ← Wraps event with\n              │   + Git Context     │    metadata \u0026 repo state\n              └──────────┬──────────┘\n                         │\n              ┌──────────▼──────────┐\n              │    Async Send       │  ← Non-blocking POST to\n              │  (subprocess)       │    /v1/events/raw\n              └──────────┬──────────┘\n                         │\n              ┌──────────▼──────────┐\n              │  PromptConduit API  │  ← Server-side adapters\n              │  (normalization)    │    transform to canonical\n              └─────────────────────┘\n```\n\n### Key Design Principles\n\n- **Thin client**: The CLI wraps raw events in an envelope — all normalization happens server-side\n- **Never blocks tools**: Hook always returns immediately with success\n- **Async sending**: Events are sent in a detached subprocess\n- **Rich context**: Captures git state (branch, commit, dirty files, etc.)\n- **Attachment extraction**: Parses transcripts to extract images and documents\n- **Multipart uploads**: Attachments sent efficiently via multipart form data\n- **Graceful degradation**: Unknown events are silently skipped\n\n## Wire format\n\nThe CLI is intentionally thin: it forwards each AI tool's raw hook event\nuntouched in `native_payload`, plus an `enrichment` block of locally\ncomputed context (git, host, correlation IDs). The platform's server-side\nadapters do the categorization and normalization. That keeps the CLI\nsmall and lets the platform evolve event taxonomy without forcing CLI\nupgrades.\n\nThe envelope is currently at version `1.2`:\n\n```json\n{\n  \"envelope_version\": \"1.2\",\n  \"cli_version\": \"v0.5.0\",\n  \"tool\": \"claude-code\",\n  \"hook_event\": \"UserPromptSubmit\",\n  \"captured_at\": \"2026-05-16T13:04:11Z\",\n  \"native_payload\": {\n    \"session_id\": \"abc123\",\n    \"hook_event_name\": \"UserPromptSubmit\",\n    \"prompt\": \"Refactor the auth module\",\n    \"cwd\": \"/Users/me/my-project\"\n  },\n  \"enrichment\": {\n    \"git\": {\n      \"repo_name\": \"my-project\",\n      \"branch\": \"main\",\n      \"commit_hash\": \"abc123\",\n      \"is_dirty\": true,\n      \"remote_url\": \"git@github.com:me/my-project.git\"\n    },\n    \"source\": \"github\",\n    \"correlation\": {\n      \"trace_id\": \"151a9441671718243f44d5b0fa183894\",\n      \"span_id\": \"143855046e61e7f8\"\n    },\n    \"host\": \"my-laptop\",\n    \"os\": \"darwin\",\n    \"arch\": \"arm64\"\n  }\n}\n```\n\nField reference:\n\n| Field | Description |\n| --- | --- |\n| `envelope_version` | Schema version. Currently `1.2`. |\n| `cli_version` | Version of `promptconduit` that produced the event. |\n| `tool` | `claude-code`, `cursor`, `gemini-cli`, `codex`, `copilot`, or `unknown`. |\n| `hook_event` | The tool's native hook event name (e.g. `UserPromptSubmit`, `preToolUse`). Not canonicalized — that happens server-side. |\n| `captured_at` | ISO 8601 timestamp at the moment the hook fired. |\n| `native_payload` | Raw JSON the tool wrote to the hook's stdin. Pass-through. |\n| `enrichment.git` | Repo metadata derived from `cwd` (branch, dirty state, commit hash, remote). Omitted when not in a git repo. |\n| `enrichment.source` | Git provider derived from the remote URL (`github`, `gitlab`, `bitbucket`, `azure`). |\n| `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. |\n| `enrichment.host`, `os`, `arch` | Machine identity, runtime GOOS, runtime GOARCH. |\n| `attachments` | When present: array of `{attachment_id, filename, content_type, size_bytes, type}`. Binary data is sent as a separate multipart field. |\n\nImage and document bytes ride alongside the envelope as multipart parts\non the same `/v1/events/raw` request — never embedded as base64 in the\nJSON.\n\n### Headless Mode (claude -p)\n\nPromptConduit 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.\n\n**`--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:\n\n```bash\nclaude --bare -p \"your prompt\" --settings ~/.claude/settings.json\n```\n\nNote: `--bare` is expected to become the default for `-p` in a future Claude Code release. The `--settings` workaround ensures capture until that changes.\n\n## Development\n\n### Prerequisites\n\n- Go 1.21+\n- Git\n\n### Building\n\n```bash\n# Build binary\nmake build\n\n# Run tests\nmake test\n\n# Build for all platforms\nmake build-all\n\n# Create snapshot release\nmake snapshot\n```\n\n### Project Structure\n\n```\n.\n├── cmd/                    # CLI commands\n│   ├── root.go             # Root command + background update-check wiring\n│   ├── install.go          # Install hooks for AI tools (5 tools)\n│   ├── uninstall.go        # Remove hooks\n│   ├── status.go           # Show installation status\n│   ├── test.go             # Test API connectivity\n│   ├── hook.go             # Hook entry point (receives raw events)\n│   ├── config.go           # Config management\n│   ├── sync.go             # Manual transcript sync\n│   ├── upgrade.go          # `promptconduit upgrade` (self-replace)\n│   ├── watch.go            # `promptconduit watch` (tail outbound traffic)\n│   ├── insights.go         # Personal usage insights\n│   ├── skills.go           # Skill detection (platform)\n│   ├── skills_local.go     # Skill detection (local, no account)\n│   ├── correlation.go      # W3C trace_id/span_id helpers\n│   └── debug.go            # Internal debugging commands\n├── internal/\n│   ├── envelope/           # Raw event envelope types (v1.2)\n│   ├── client/             # HTTP client with multipart upload\n│   ├── correlation/        # W3C trace_id/span_id generation + persistence\n│   ├── git/                # Git context extraction\n│   ├── outbound/           # http.RoundTripper that mirrors outbound traffic\n│   │                       # to outbound.ndjson (drives `watch`)\n│   ├── sync/               # Transcript sync and parsing\n│   │   ├── claudecode.go   # Claude Code transcript parser\n│   │   ├── state.go        # Sync state management\n│   │   └── types.go        # Parser interface and types\n│   ├── transcript/         # Transcript parsing \u0026 attachment extraction\n│   └── updater/            # GitHub-release version check + atomic self-replace\n├── scripts/\n│   └── install.sh          # Curl installer\n├── .goreleaser.yaml        # Release configuration\n├── Makefile                # Build commands\n└── go.mod                  # Go module\n```\n\n## Privacy \u0026 Security\n\n- **Open Source**: Full transparency on what data is captured\n- **Minimal**: Only captures events needed for analysis\n- **Secure**: HTTPS with API key authentication\n- **Non-blocking**: Never interferes with your workflow\n- **Free / local-only tier**: With no API key (or `--local-only`), events are\n  captured to `~/.promptconduit/events.jsonl` and **nothing is sent to the\n  cloud**. See [Free Tier — Local-Only Mode](#free-tier--local-only-mode).\n- **Local event capture log**: Every event is written to\n  `~/.promptconduit/events.jsonl` (mode `0644`) before any send, with secrets\n  redacted; rotates at 50MB. Disable with `PROMPTCONDUIT_EVENT_LOG=0`.\n- **Local outbound mirror**: Every HTTP request the CLI makes is also\n  written to `~/.config/promptconduit/outbound.ndjson` (mode `0600`,\n  owner-only) so you can tail it with `promptconduit watch`.\n  Authorization, Cookie, and any header matching `token` / `secret` /\n  `key` is redacted to `***` before write. Bodies are capped at 64KB\n  per row; the file rotates to `outbound.ndjson.1` at 50MB.\n- **Background self-upgrade**: A once-per-24h GitHub releases check\n  fetches `/repos/promptconduit/cli/releases/latest` (no auth, no\n  payload uploaded). Disable with\n  `promptconduit config set --disable-auto-update=true` or\n  `PROMPTCONDUIT_AUTO_UPDATE=0`.\n\n## License\n\n[MIT](LICENSE) - Copyright (c) 2026 PromptConduit\n\n## Links\n\n- [PromptConduit Website](https://promptconduit.dev)\n- [Documentation](https://promptconduit.dev/docs)\n- [Issue Tracker](https://github.com/promptconduit/cli/issues)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpromptconduit%2Fcli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpromptconduit%2Fcli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpromptconduit%2Fcli/lists"}