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

intents-cli

v0.1.10

Published

Cross-chain token swaps from the command line. Built for AI agents, scripts, and automation.

Readme

intents-cli

███╗   ██╗███████╗ █████╗ ██████╗
████╗  ██║██╔════╝██╔══██╗██╔══██╗
██╔██╗ ██║█████╗  ███████║██████╔╝
██║╚██╗██║██╔══╝  ██╔══██║██╔══██╗
██║ ╚████║███████╗██║  ██║██║  ██║
╚═╝  ╚═══╝╚══════╝╚═╝  ╚═╝╚═╝  ╚═╝
         I N T E N T S

Cross-chain token swaps from the command line. Built for AI agents, scripts, and automation.

npx intents-cli@latest

Features

  • Cross-chain swaps - Swap tokens across NEAR, Ethereum, Solana, Base, and more
  • Intents balance - Manage your tokens in the NEAR Intents system
  • Deposits & withdrawals - Move tokens between chains and your Intents balance
  • Interactive UI - Beautiful CLI interface with search, menus, and status updates
  • Agent-friendly - Designed for automation and scripting

Quick Start

npx intents-cli@latest

On first run, the CLI will guide you through:

  1. Setting up your API key (optional, reduces fees)
  2. Creating or importing a NEAR account

Usage

$ npx intents-cli@latest

> Get Quote & Swap     Execute token swaps
  View Balances        See your Intents balance
  Deposit to Intents   Add tokens from any chain
  Withdraw from Intents  Send tokens to any chain
  Settings             Configure preferences

Swap Example

$ npx intents-cli@latest

Select token to swap FROM:
> wNEAR (Balance: 50.00)

Select token to swap TO:
> USDC

Enter amount: 10

Quote:
  FROM   10.00 wNEAR
  TO     14.55 USDC
  Rate   1 wNEAR = 1.455 USDC

> Execute this swap

✓ Swap complete! Received 14.55 USDC

Requirements

Install near-cli-rs

# macOS
brew install near-cli-rs

# Or with cargo
cargo install near-cli-rs

Configuration

Config is stored at ~/.intents-cli/config.json

API Key

Get an API key at partners.near-intents.org to reduce swap fees.

Without an API key, swaps incur a 0.1% fee.

How It Works

┌─────────────────────────────────────────────────────────────┐
│  Your tokens on any chain (NEAR, Ethereum, Solana, etc)    │
└─────────────────────────────────────────────────────────────┘
                              │
                              │ DEPOSIT
                              ▼
┌─────────────────────────────────────────────────────────────┐
│                    INTENTS BALANCE                          │
│                  (intents.near contract)                    │
│                                                             │
│  Your balance:                                              │
│  ├── 1000 USDC                                              │
│  ├── 0.5 ETH                                                │
│  └── 50 wNEAR                                               │
│                                                             │
│  SWAPS happen here (instant, cross-chain)                   │
└─────────────────────────────────────────────────────────────┘
                              │
                              │ WITHDRAW
                              ▼
┌─────────────────────────────────────────────────────────────┐
│  Destination: Any supported chain/address                   │
└─────────────────────────────────────────────────────────────┘

Commands

| Command | Description | |---------|-------------| | npx intents-cli@latest | Start interactive CLI | | npx intents-cli@latest --help | Show help | | npx intents-cli@latest --version | Show version |

Agent CLI

For automation and AI agents, use the agent subcommand which returns JSON responses:

npx intents-cli@latest agent <command> [options]

Available Commands

| Command | Description | |---------|-------------| | balance | Get account balances (native NEAR and intents) | | tokens | List available tokens with optional filters | | quote | Get a swap quote without executing | | swap | Execute a token swap | | deposit | Deposit tokens to intents balance | | withdraw | Withdraw tokens from intents | | status | Check swap/deposit status by address | | account | View, create, import, or switch accounts | | config | View current configuration |

Quick Examples

# Check balance
npx intents-cli@latest agent balance

# Get a swap quote
npx intents-cli@latest agent quote --from=USDC --to=wNEAR --amount=0.01

# Execute a swap
npx intents-cli@latest agent swap --from=USDC --to=wNEAR --amount=0.01

# Deposit NEAR to intents
npx intents-cli@latest agent deposit --token=NEAR --amount=0.1

# Withdraw to wallet
npx intents-cli@latest agent withdraw --token=USDC --amount=0.01 --to=myaccount.near

# Cross-chain withdraw to Base
npx intents-cli@latest agent withdraw --token=USDC --amount=1 --to=0x... --chain=base

# Check swap status
npx intents-cli@latest agent status --address=<depositAddress>

JSON Response Format

All agent commands return JSON with this structure:

{
  "ok": true,
  "command": "balance",
  "data": { ... },
  "meta": { "durationMs": 1234 }
}

On error:

{
  "ok": false,
  "command": "balance",
  "error": {
    "code": "NOT_CONFIGURED",
    "message": "No NEAR account configured. Run setup first."
  }
}

Command Help

Get help for any command:

npx intents-cli@latest agent --help
npx intents-cli@latest agent swap --help

For detailed API schemas and response types, see docs/AGENT_API.md.

Links

License

MIT