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

@economico/cli

v0.4.0

Published

Agent-facing CLI for Economico — general ledger over a REST API. Pair with the hosted SKILL.md at https://economi.co/skill.md.

Downloads

432

Readme

@economico/cli

Agent-facing command line interface for Economico — the agent-native general ledger. Every command emits JSON on stdout (or a compact summary with --human), errors go to stderr with a non-zero exit, and request shapes mirror the OpenAPI spec at https://economi.co/openapi.json.

Pair this CLI with the canonical agent guide at https://economi.co/skill.md for the complete reference, the money model, idempotency rules, and the OAuth 2.1 flow for MCP agents.

Install

Persistent install (recommended for long-lived agents):

npm install -g @economico/cli
economico --version

Ephemeral via npx (good for sandboxed agents and CI):

npx -y @economico/cli@latest <command>

Requires Node 20+. Works on Linux, macOS, and Windows.

Sign up

Every business is owned by an email. Sign up once; on subsequent hosts, log in to mint a fresh API key.

# 1. Start signup. Mails a 6-digit OTP to the email.
economico signup --email [email protected] --name "Acme Inc"
# → {"verification_id":"…","email":"…","expires_in_seconds":900}

# 2. Read the code from the email and complete signup.
economico signup verify --id <verification_id> --code 123456
# → {"business":{…},"api_key":"eco_…"}

The API key is written to ~/.config/economico/config.json (mode 0600) and used for every subsequent call. It is shown ONCE in the response — agents should never echo it back to the user unprompted.

To re-key an existing business on a new host:

economico login --email [email protected]
economico login verify --id <verification_id> --code 123456

Configure

| Variable | Default | What it does | | ---------------------- | ---------------------- | ------------------------------------------- | | ECONOMICO_API_URL | https://economi.co | Point at a different deployment. | | ECONOMICO_API_KEY | (from config file) | Bypass the config file entirely. | | XDG_CONFIG_HOME | ~/.config | Base path for the config file. |

Commands

| Command | What it does | | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | economico signup / signup verify / login / login verify | Onboard a new business, or mint a fresh API key for an existing one. | | economico parties create / list / get / update | Manage customers and vendors (CRM). | | economico invoices create / list / get / send / void / pay | Full invoice lifecycle: draft, send, void with reversing journal, record payment. | | economico revenue summary --from <date> --to <date> | Per-currency invoiced / paid / outstanding / recognized for the period. | | economico accounts list / get / create / update / archive | Chart-of-accounts management. A starter chart is seeded automatically at signup. | | economico balances | Current balances for all postable accounts. | | economico reports balance-sheet / income-statement | Period-end financial reports. | | economico oauth clients create / list / revoke | Register OAuth 2.1 clients for MCP agents that prefer RFC 7523 private_key_jwt. |

Every command accepts --human for a compact summary instead of raw JSON.

Output

Default JSON, pretty-printed:

economico parties list
# [
#   {
#     "id": "…",
#     "type": "customer",
#     "iri": "did:web:acme.com",
#     "name": "Acme",
#     "url": "https://acme.com",
#     ...
#   }
# ]

Human mode (flatter, no JSON parens):

economico balances --human
#   USD:Cash: 12500
#   USD:AR: 3200
#   ...

Errors go to stderr as a structured envelope and exit non-zero:

{
  "error": "party not found",
  "status": 404,
  "body": { "detail": "party not found" }
}

Money model

  • Amount: always an integer in minor units (cents for USD). Never floats.
  • Currency: ISO 4217 (USD, EUR), stablecoin shorthand (USDC, USDT, PYUSD), or full CAIP-19 (eip155:8453/erc20:0x833…).
  • Idempotency: payment recording is safe to retry. On-chain payments dedupe on (chain_id, tx_hash, log_index, currency, settlement_address, amount); off-chain on (invoice_id, idempotency_key).

Examples

Draft a $2000 invoice for 10 hours of consulting and send it by email:

PARTY_ID=$(economico parties create --type customer --name "Acme" --url https://acme.com | jq -r .id)

economico invoices create \
  --party-id "$PARTY_ID" \
  --amount 200000 \
  --currency USD \
  --due 2026-06-01 \
  --memo "March consulting" \
  --lines '[{"description":"Consulting","quantity_micros":10000000,"unit_price_minor":20000}]'

economico invoices send <invoice_id> --channel email

Record an on-chain stablecoin payment:

economico invoices pay <invoice_id> \
  --amount 200000 \
  --currency USDC \
  --tx-hash 0xdeadbeef… \
  --chain-id eip155:8453 \
  --log-index 0

Read more

  • Agent guide (canonical): https://economi.co/skill.md
  • OpenAPI 3.1 spec: https://economi.co/openapi.json
  • MCP endpoint (alternative to the CLI for native MCP clients): https://economi.co/mcp

License

MIT