CLI Overview
All StarkFi CLI commands at a glance — installation, authentication, and usage
Installation
No global install required — run everything via npx:
npx starkfi@latest <command> [arguments] [flags]Or install globally:
npm install -g starkfi@latest
starkfi <command> [arguments] [flags]Requirements
- Node.js v18 or later
- StarkFi Auth Server running (required for authentication and transaction signing)
Authentication (Required First)
Before using any command, authenticate with your email:
# Step 1: Request OTP
starkfi auth login user@example.com
# Step 2: Verify OTP (check your email)
starkfi auth verify user@example.com 123456
# Check session status
starkfi status
# Logout
starkfi auth logoutImportant: Authentication is required before executing any wallet, trading, staking, or lending commands. The session persists across restarts.
Command Groups
| Group | Commands | Description |
|---|---|---|
| Authentication | auth login, auth verify, auth logout | Email OTP authentication |
| Wallet | address, balance, send, deploy | Wallet management |
| Trading | trade, multi-swap | Token swaps via Fibrous |
| Staking | stake, unstake, rewards, pools, validators, stake-status | Staking operations |
| Lending | lend-pools, lend-supply, lend-withdraw, lend-borrow, lend-repay, lend-close, lend-status | Vesu V2 lending |
| Portfolio | portfolio | Full DeFi dashboard |
| Operations | batch | Atomic multicall |
| Configuration | config | RPC, network, gas settings |
| System | status, tx-status, mcp-start | Status checks, MCP server |
Global Flags
Available on all commands:
| Flag | Description |
|---|---|
--json | Output as JSON instead of formatted table |
--simulate | Dry-run — estimate fees without executing (transaction commands only) |
--help | Show help for any command |
Quick Start
# 1. Authenticate
starkfi auth login user@example.com
starkfi auth verify user@example.com 123456
# 2. Check your wallet
starkfi balance
starkfi address
# 3. Swap tokens
starkfi trade 0.1 ETH USDC
# 4. Check transaction
starkfi tx-status 0x123abc...
# 5. View full portfolio
starkfi portfolioSimulation
Every transaction command supports --simulate for dry-run execution:
starkfi trade 100 USDC ETH --simulate
starkfi send 10 STRK 0x04a3... --simulate
starkfi batch --swap "0.1 ETH USDC" --stake "100 STRK karnot" --simulateSimulation returns estimated fees, call count, and validates the transaction without spending gas.
Last updated on