npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@agledger/cli

v0.8.7

Published

AGLedger CLI — Developer and agent interface for AGLedger

Readme

@agledger/cli

The official CLI for the AGLedger API — accountability infrastructure for AI agents. The Layer 3 accountability layer of the agent stack.

A thin cover over the API. The CLI passes your request straight through to the API and forwards the response — no hand-coded per-endpoint wrappers, no flag-to-body translation, no drift. Every AGLedger API route is reachable via agledger api <METHOD> <path>.

Learn more

  • agledger.ai — what AGLedger is and why Layer 3 accountability matters
  • How it works — the four-endpoint lifecycle: record, completion, verdict, fulfill
  • Glossary — canonical definitions of Record, Completion, SCITT Receipt, Verdict, Settlement Signal
  • API reference — every endpoint the CLI covers
  • Documentation — installation and integration guides

Install

npm install -g @agledger/cli

Quick Start

export AGLEDGER_API_KEY=agl_adm_...
export AGLEDGER_API_URL=https://your-agledger-instance

# Check health, identity, scopes, and get the quickstart workflow
agledger discover

# List Record types
agledger api GET /v1/schemas

# Create a record (raw JSON body)
agledger api POST /v1/records --data '{
  "type": "ACH-PROC-v1",
  "criteria": { "item_spec": "500 units copper wire", "quantity": { "target": 500 } }
}'

# Or build the body with typed fields
agledger api POST /v1/records \
  -F type=ACH-PROC-v1 \
  -F criteria.item_spec='500 units copper wire' \
  -F criteria.quantity.target=500

# Submit a completion
agledger api POST /v1/records/<record-id>/completions \
  --data '{"evidence":{"items_delivered":"copper wire","quantity_delivered":500}}'

# Render a verdict
agledger api POST /v1/records/<record-id>/verdict \
  -F completionId=<completion-id> -F verdict=accept

Why a thin cover?

  • Zero drift. When the API adds, renames, or removes a route, the CLI keeps working — no code change required.
  • One mental model. The API docs are the CLI docs. What you read in the OpenAPI spec is what you type.
  • All 250+ routes on day one. You get full parity, not a hand-picked subset.

Ways to pass a body

| Flag | When to use | |---|---| | --data '{...}' | Agent-friendly: one JSON string | | --input file.json | Complex payloads; reuse files | | --input - | Pipe JSON from stdin | | -F key=value (repeatable) | Shell-friendly; typed (true/false/null/numbers); nested via a.b=v; arrays via arr[]=v; JSON literals via k={...} / k=[...] |

Merging order (low → high): --data--input-F--query. Later sources override earlier keys.

Agent-native DX

  • --json on every command (auto when stdout is piped)
  • --quiet suppresses output (exit code only)
  • --dry-run on agledger api shows the request without sending
  • --paginate on GET follows cursor pagination and streams NDJSON
  • Structured errors on stderr: {error: true, code, message, suggestion, ...} — API errors pass through verbatim
  • Semantic exit codes: 0 (OK), 2 (usage), 3 (auth), 4 (forbidden), 5 (not found), 6 (conflict), 7 (rate limit), 8 (server), 9 (network), 10 (timeout)
  • NO_COLOR supported per no-color.org

Discovery

agledger list-commands --json          # 9 CLI-local commands
agledger help-json api --json          # Schema for `api` (args + flags)
agledger discover                       # Health + identity + quickstart
agledger api GET /openapi.json          # Full API route catalog

CLI-local commands (everything else is agledger api)

| Command | Purpose | |---|---| | api | Call any API endpoint | | discover | Health + identity + scopes + quickstart | | login | Verify API key, store in ~/.agledger/config.json (0600) | | logout | Remove profile(s) | | auth | Check current login state (exit 0 either way) | | config | list / get / use <profile> / path | | verify | Offline audit export verification (COSE_Sign1 + Ed25519, RFC 9052, no network) | | list-commands | Inventory (this list) | | help-json | Per-command schema |

Authentication

# Verifies the key against the API, stores under ~/.agledger/config.json
agledger login --api-key agl_adm_... --profile prod

# Switch profiles
agledger config use prod

# Or just use env vars per-invocation
AGLEDGER_API_KEY=... AGLEDGER_API_URL=... agledger api GET /v1/records

Agent keys (agl_agt_*) and admin keys (agl_adm_*) are both accepted — the API routes them appropriately.

Requirements

License

Proprietary. Copyright (c) 2026 AGLedger LLC. All rights reserved. See LICENSE.