Skip to content

creatornader/atrib-log-pp-cli

Repository files navigation

atrib-log-pp-cli

Developer CLI for the atrib transparency log at log.atrib.dev. Wraps the public log API (signed checkpoint, log public keys, stats, recent entries, lookup by hash, inclusion-proof recovery, by context, by creator, JSON Feed, SSE stream, Merkle tile retrieval) with local SQLite mirroring, full-text search, and agent-friendly defaults.

Generated by Printing Press from a hand-authored OpenAPI spec for log.atrib.dev.

What this is and isn't

This is the developer-facing CLI for direct interaction with log.atrib.dev. Use it for batch queries, verification, debugging, dogfooding the public log API, and one-off "show me the last N entries by signer X" type questions.

This is NOT a replacement for the @atrib/* MCP cognitive primitives (emit, annotate, revise, recall, trace, summarize, verify). Those are the agent-facing surface, designed around the seven primitives an agent reasons in. This CLI is the operator-facing surface, designed around the HTTP API endpoints. They are complementary:

  • Agent doing cognitive work → use the MCP primitives
  • Human or script interacting with the log → use this CLI

Install

The CLI is a Go binary. Install with go install:

go install github.com/creatornader/atrib-log-pp-cli/cmd/atrib-log-pp-cli@latest

Or build from source:

git clone https://github.com/creatornader/atrib-log-pp-cli
cd atrib-log-pp-cli
go build ./cmd/atrib-log-pp-cli
./atrib-log-pp-cli --help

The binary lands in $GOPATH/bin (typically ~/go/bin/). Ensure that's on your PATH.

Use

# Live API queries
atrib-log-pp-cli checkpoint              # signed tree head
atrib-log-pp-cli log-pubkey              # C2SP signed-note vkey
atrib-log-pp-cli stats                   # tree size + entries by event type
atrib-log-pp-cli recent --limit 10       # most recent entries
atrib-log-pp-cli lookup <record-hash>    # entry by hash
atrib-log-pp-cli proof <record-hash>     # recover inclusion proof
atrib-log-pp-cli by-context <context-id> # all entries in a session
atrib-log-pp-cli by-creator <key>        # all entries by signer
atrib-log-pp-cli feed-json --limit 10    # JSON Feed 1.1
atrib-log-pp-cli stream                  # raw Server-Sent Events

# Local mirror + search
atrib-log-pp-cli sync                    # mirror to local SQLite
atrib-log-pp-cli search "query string"   # FTS over the mirror

# Compound workflows
atrib-log-pp-cli workflow                # multi-step operations
atrib-log-pp-cli analytics               # group-by + summary queries

# Agent-friendly defaults
atrib-log-pp-cli --agent recent          # sets --json --compact --no-input --no-color --yes

atrib-log-pp-cli doctor checks auth + connectivity. atrib-log-pp-cli api browses the full endpoint catalog. atrib-log-pp-cli which <capability> finds the command that implements a given capability.

MCP server

The CLI ships a paired MCP server (atrib-log-pp-mcp) for agents that prefer MCP over CLI invocation. Build it the same way:

go build ./cmd/atrib-log-pp-mcp

Configure in Claude Desktop's claude_desktop_config.json:

{
  "mcpServers": {
    "atrib-log": {
      "command": "atrib-log-pp-mcp"
    }
  }
}

The MCP server exposes the same finite command surface as the CLI. The raw SSE stream command stays CLI-only because MCP tool calls expect a bounded response. Note: for agent cognitive work (emitting signed records, recalling past actions, etc.), the @atrib/* MCP servers are the right surface, not this one.

Configuration

Config file: ~/.config/log-atrib-dev-pp-cli/config.toml. Static request headers configurable under [headers]; per-command header overrides take precedence.

Exit codes

0 success, 2 usage error, 3 not found, 5 API error, 7 rate limited, 10 config error.

Regeneration

This CLI is generated from spec.yaml (a hand-authored OpenAPI spec for log.atrib.dev) via Printing Press. To regenerate after the API surface changes:

go install github.com/mvanhorn/cli-printing-press/v4/cmd/printing-press@latest
printing-press generate --spec ./spec.yaml --name atrib-log --force

The --force flag uses AST-based merge to preserve hand edits to generated files. See the Printing Press docs for the full regeneration workflow.

Related tools

This CLI is part of the public surface around atrib:

Repo Concern
atrib The protocol + the @atrib/* MCP primitives + the log service that backs log.atrib.dev
atrib-log-pp-cli (this repo) Developer CLI for the log API
textleaks Narrative-leak detection in text content (pre-commit hook)
oss-twin Public/private mirror structural plumbing
oss-security-scan Reusable GitHub Actions workflow for typos + gitleaks + trufflehog + osv-scanner

License

Apache 2.0. See LICENSE.

About

Developer CLI for the atrib transparency log at log.atrib.dev. Generated by Printing Press. Complementary to the @atrib/* MCP cognitive primitives.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors