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

@paul-unifra/yaar-cli

v0.2.1

Published

TypeScript CLI for deploying YAAR agents on 0G. The deploy command mirrors the current web deploy flow:

Readme

YAAR CLI

TypeScript CLI for deploying YAAR agents on 0G. The deploy command mirrors the current web deploy flow:

  1. Upload or reuse the agent image.
  2. Upload metadata through the YAAR web deploy API.
  3. Pay the current iNFT mint fee.
  4. Ask the YAAR web deploy API to mint the iNFT.
  5. Create the agent token from the user's signer, with optional pre-purchase value.

The executable is yaar.

Runtime Dependencies

To run the CLI itself:

  • Bun >=1.1.38 for workspace install/build scripts.
  • Node.js >=20.
  • Workspace dependencies installed with bun install.
  • A reachable 0G EVM RPC, defaulting to https://evmrpc-testnet.0g.ai for testnet.
  • A reachable YAAR deploy API. The default is https://yaar.fun; for local development use YAAR_API_URL=http://localhost:3000 or set api.base_url in the deploy config.
  • A funded signer wallet with enough 0G for the mint fee, gas, and optional pre-purchase.

Signer options:

  • Private key mode: set YAAR_PRIVATE_KEY=0x... or pass --private-key 0x....
  • Open Wallet Standard mode: install the ows CLI from https://openwallet.sh/ and pass --ows-wallet <name-or-id>.

OWS install:

npm install -g @open-wallet-standard/core

If ows is not on PATH, set YAAR_OWS_BIN=/path/to/ows.

For local actual deployments through the web app:

  • Start the existing web app with bun run dev:web or cd apps/web && bun run dev.
  • Keep apps/web/.env populated. The CLI does not require additional server-side settings beyond the environment already used by web-based deployments.
  • Set the CLI API URL to the local web app, for example YAAR_API_URL=http://localhost:3000.
  • The indexer does not need to run locally for deployment. It only affects when the deployed agent appears in indexed discovery/trade surfaces.

For tests only:

  • bun run test:e2e requires Foundry's anvil binary. Normal CLI deploys do not need anvil.
  • Set YAAR_FORK_RPC_URL to override the anvil fork source RPC.

Build

cd apps/cli
bun install
bun run build
./dist/index.mjs --help

From the repository root:

bun run --filter @yaar/cli build

Tests

cd apps/cli
bun run typecheck
bun run test
bun run test:e2e

test:e2e starts an anvil fork of 0G testnet, runs a local deploy API stub, and verifies the full CLI path:

pay mint fee -> mint iNFT -> create token

Create A Config

yaar config init -o agent.yaml

Minimal config:

network:
  name: testnet
  rpc_url: "https://evmrpc-testnet.0g.ai"
  chain_id: 16602

api:
  base_url: "http://localhost:3000"

agent:
  name: "My AI Agent"
  ticker: "MYAI"
  description: "An AI agent that helps users complete useful tasks."
  profile_picture: "https://example.com/avatar.png"
  twitter: "myagent"
  website: "https://myagent.example"
  github: ""
  discord: ""
  docs: ""
  category: "AI Agent"

owner:
  type: self
  identifier: ""

tokenomics:
  pre_purchase:
    enabled: false
    amount: "0"

Owner modes:

  • self: iNFT is minted directly to the deployer wallet.
  • evm: if the address differs from the deployer, iNFT is minted to the claim contract and the designated wallet can claim later.
  • github or x: CLI asks the web API to resolve the immutable identity, then mints to the claim contract.

Deploy With A Private Key

export YAAR_API_URL=http://localhost:3000
export YAAR_PRIVATE_KEY=0x...
yaar deploy -c agent.yaml

Useful overrides:

yaar deploy \
  --name "Research Agent" \
  --ticker RSCH \
  --description "An autonomous research assistant for market and protocol analysis." \
  --twitter research_agent \
  --category "Research" \
  --image ./avatar.png \
  --private-key 0x...

Deploy With OWS

List local OWS wallets:

yaar wallet list

Create an OWS-compatible wallet if none exists:

yaar wallet create --name yaar-deployer
yaar wallet address --wallet yaar-deployer

Send enough 0G to the printed EVM address for the mint fee, optional pre-purchase, and gas. Then:

YAAR_API_URL=http://localhost:3000 yaar deploy -c agent.yaml --ows-wallet yaar-deployer

The CLI builds unsigned legacy 0G transactions with viem, calls:

ows sign tx --wallet <wallet> --chain 16602 --tx <unsigned-tx> --json

and submits the signed raw transaction through the configured RPC.

Resume

Deployments create .yaar-deploy-<id>.json while running. If the process is interrupted:

yaar deploy --resume <id> --ows-wallet yaar-deployer

For private-key signing, provide YAAR_PRIVATE_KEY again. Private keys are never persisted in state files.

Dry Run

YAAR_API_URL=http://localhost:3000 yaar deploy -c agent.yaml --ows-wallet yaar-deployer --dry-run --json

This validates config, resolves the owner, reads balance and mint fee, and sends no transactions.

Agent Skill

The agent-facing skill lives at:

apps/cli/skills/yaar-deploy/SKILL.md

Install or expose that skill to an agent. The skill instructs the agent to:

  1. Check for an existing OWS wallet.
  2. Create an OWS-compatible wallet if needed.
  3. Ask the user/team to fund the printed 0G address.
  4. Generate or update agent.yaml.
  5. Run yaar deploy with --ows-wallet.