Skip to content

alvariance/intents-cli

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

For AI Agents

This CLI is designed to be used by AI agents and automation scripts. The interactive prompts work well with expect scripts and similar automation tools.

Links

License

MIT

About

Surge Intents CLI

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • TypeScript 89.3%
  • JavaScript 10.7%