New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

intents-cli

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

intents-cli

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

latest
Source
npmnpm
Version
0.1.10
Version published
Maintainers
1
Created
Source

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:

  • Setting up your API key (optional, reduces fees)
  • 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

  • Node.js 18+
  • near-cli-rs installed

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

CommandDescription
npx intents-cli@latestStart interactive CLI
npx intents-cli@latest --helpShow help
npx intents-cli@latest --versionShow 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

CommandDescription
balanceGet account balances (native NEAR and intents)
tokensList available tokens with optional filters
quoteGet a swap quote without executing
swapExecute a token swap
depositDeposit tokens to intents balance
withdrawWithdraw tokens from intents
statusCheck swap/deposit status by address
accountView, create, import, or switch accounts
configView 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.

License

MIT

Keywords

near

FAQs

Package last updated on 06 Feb 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts