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

ergo-agent-cli

v0.3.2

Published

Command-line companion to ergo-agent-pay — query balances, check Notes, build Reserve/Note/Tracker transactions on Ergo testnet/mainnet.

Readme

ergo-agent-cli

Command-line companion to ergo-agent-pay. Lets you query balances, inspect Notes, and build Reserve / Note / Tracker transactions without writing a Node script.

Install

npm install -g ergo-agent-cli

Or run without installing:

npx ergo-agent task-hash "the answer is 42"

Quick start

# 1. Compute a BLAKE2b-256 task hash (no network needed).
ergo-agent task-hash "the answer is 42"
# 549ead194a83140a8b12bc38bb74ba7e5b094a5749ea73a7e04156f91cc5260a

# 2. Set up your address. CLI defaults to testnet.
export ERGO_ADDRESS=9...

# 3. Check balance and chain height.
ergo-agent balance
ergo-agent height

# 4. Inspect a Note already on-chain.
ergo-agent note check abc123...

# 5. Build an unsigned Note transaction (testnet, no script — dev mode).
ergo-agent note issue \
  --recipient 9YourSubAgent... \
  --value "0.005 ERG" \
  --reserve abc123... \
  --deadline "+100 blocks" \
  --task-output "the answer is 42"

The unsigned transaction is printed as JSON on stdout. Sign it with Nautilus or a server-side key, then submit to the Ergo node.

Configuration

| Flag | Env var | Default | Notes | |---|---|---|---| | --address <addr> | ERGO_ADDRESS | — | Required for any command that touches the chain. | | --network mainnet\|testnet | ERGO_NETWORK | testnet | The CLI defaults to testnet on purpose — opposite of the SDK. | | --node-url <url> | ERGO_NODE_URL | public Ergo API | Override for self-hosted nodes. | | --allow-insecure-dev-mode | ERGO_ALLOW_INSECURE_DEV_MODE=1 | false | Required to run mainnet ops without a compiled scriptErgoTree. See SPEC.md §6. | | --json | — | false | Emit a single JSON object on stdout (no labels). |

CLI flags override environment variables.

Commands

task-hash

Compute the BLAKE2b-256 hash of a task output. Network-free utility.

ergo-agent task-hash "the answer is 42"   # positional UTF-8
ergo-agent task-hash --hex deadbeef       # raw hex bytes
ergo-agent task-hash --file payload.json  # file contents
echo "..." | ergo-agent task-hash --stdin

The output is a 64-character hex digest with no trailing punctuation, so it captures cleanly inside $().

balance / height

ergo-agent balance       # ERG balance + nanoERG raw
ergo-agent height        # current chain height (single integer on stdout)

note check <boxId>

Fetch a Note from the chain and decode its registers (face value, expiry, reserve reference, task hash, credential key).

note issue

Build a new Note. Either --task-hash <hex> or --task-output <text> — the second form computes the BLAKE2b-256 hash for you.

--recipient <addr>          (required)
--value "<amount> ERG"      (required, e.g. "0.005 ERG")
--reserve <boxId>           (required, the backing Reserve)
--deadline "+N blocks"      (required, or absolute height)
--task-hash <hex>           (optional, 64-char BLAKE2b-256)
--task-output <text>        (optional, alternative to --task-hash)
--credential-key <hex>      (optional, GroupElement for credential gating)
--script <ergoTree>         (optional, compiled predicate ErgoTree)

note redeem

--box <noteBoxId>           (required)
--task-output <text>        (optional, required for predicate-bound Notes)
--receiver <addr>           (optional, defaults to the agent address)

reserve create

--collateral "<amount> ERG" (required)
--script <ergoTree>         (optional, compiled Reserve script)
--memo <text>               (optional, stored in R4)

tracker deploy

--script <ergoTree>         (required, compiled Tracker script)

settle

Batch-redeem multiple Notes in one transaction.

--boxes id1,id2,id3                          (required)
--task-outputs "id1=output1;id2=output2"     (optional)
--receiver <addr>                            (optional)

Exit codes

| Code | Meaning | |---|---| | 0 | success | | 1 | runtime error (network, signing, etc.) | | 2 | argument or config error | | 3 | INSECURE_MAINNET_MODE — refused to run an unsafe mainnet op without --allow-insecure-dev-mode |

Safety

The CLI inherits the SDK's assertProductionSafety guardrail. On mainnet it will refuse to run reserve create, note issue, or tracker deploy without a compiled --script, unless --allow-insecure-dev-mode is set. On testnet there is no such restriction. See SPEC.md §6 and SECURITY.md.