Base L2 · EVM Compatible · Coinbase

Your AI Base L2
Dev Agent

Claude + OpenAI in your terminal with 30+ native Base blockchain tools. Deploy contracts, inspect accounts, bridge ETH, swap tokens, read state — all from one command.

Install (one command)
$ npm install -g mage-cli

Free tier — 25 messages/day · No API key needed · Base Mainnet & Sepolia

Base Mage

01 / Features

Built for Base Developers

Not a generic AI wrapper. Every tool is purpose-built for Base L2 EVM development on Coinbase's network.

🔵
Base L2 Native

ETH balances, ERC-20/721/1155 tokens, contract deployment, ABI interaction, gas estimation — all native Base tools, no manual RPC juggling.

🌉
Official Bridge Support

Bridge ETH and tokens between Ethereum Mainnet and Base L2 via Coinbase's official bridge. Monitor status, get estimates, execute in one command.

YOLO Mode

Auto-execute everything. No confirmations. No prompts. Just results. For when you trust the mage and need maximum throughput.

🧠
11 AI Models

Claude Opus, Sonnet, Haiku. GPT-4.1, Mini, Nano. o3, o3-mini, o4-mini. Switch mid-conversation with /model to match task complexity.

📁
Full Codebase Access

Read, write, edit your Solidity and TypeScript files. Glob search, Regex grep. It reads your contracts, understands them, and modifies them.

🆓
Free Tier

25 messages per day. No API key. No signup. No credit card. Just install and start building on Base. Upgrade anytime for unlimited usage.


02 / Tools

30+ Tools at Your Command

Every tool maps to a real Base L2 or EVM primitive. No abstraction leaks, no hidden wrappers.

📁 Filesystem 6 tools
read_file write_file edit_file glob_files grep list_directory
Shell 1 tool
bash — hardhat, foundry, cast, forge, npm, git, ssh, anything
🔵 Base Core 12 tools
base_eth_balance base_account_info base_send_eth base_transaction base_recent_txs base_block_info base_gas_price base_network_status base_contract_call base_contract_deploy base_contract_verify base_keygen
🪙 Tokens & DeFi 11 tools
base_token_balance base_token_transfer base_token_approve base_erc20_deploy base_erc721_deploy base_nft_mint base_swap_tokens base_bridge_eth base_bridge_token base_bridge_status base_liquidity_pools

03 / NPM Package

mage-evm-sdk

A fully typed EVM SDK purpose-built for Base L2. Zero boilerplate for common patterns.

📦 npm

mage-evm-sdk

TypeScript SDK for Base L2 — contracts, tokens, bridge, gas, multicall

MIT License TypeScript EVM / viem
$npm install mage-evm-sdk
$yarn add mage-evm-sdk
getBalance(address: `0x${string}`): Promise<bigint>

Returns the native ETH balance of an address on Base mainnet or Sepolia. Uses viem public client with automatic RPC failover.

deployERC20(params: ERC20Params): Promise<DeployResult>

Deploy a standard OpenZeppelin ERC-20 token to Base. Returns contract address, tx hash, and verified ABI. Auto-verifies on Basescan.

bridgeToBase(amount: bigint, opts?): Promise<BridgeTx>

Initiate an ETH or ERC-20 bridge from Ethereum Mainnet to Base L2 via the official Coinbase bridge contracts. Includes relay monitoring.

multicall(calls: Call[]): Promise<Result[]>

Batch multiple read or write calls into a single transaction using Base's Multicall3 deployment. Reduces RPC round-trips by up to 90%.

getGasEstimate(tx: TxRequest): Promise<GasEstimate>

Estimate L1 data cost + L2 execution cost for a transaction on Base. Returns baseFee, priorityFee, l1DataFee, and total in ETH and USD.

watchEvents(contract, eventName): EventEmitter

Subscribe to real-time contract events on Base using WebSocket RPC. Auto-reconnects on disconnect. Typed event payloads from ABI.

verifyContract(address, sourceCode): Promise<string>

Submit contract source code to Basescan for verification. Supports Solidity compiler settings, constructor args, and proxy verification.

swapTokens(params: SwapParams): Promise<SwapResult>

Execute token swaps on Base via Uniswap v3 or Aerodrome. Slippage protection, optimal routing, and permit2 support built in.


04 / Documentation

Slash Commands

Powerful built-in commands for managing your Base development session.

/helpShow all available commands
/model [name]Switch AI model (opus, sonnet, gpt4.1, o3...)
/modelsList all models with pricing info
/yoloToggle auto-execute mode (no confirmations)
/network <name>Switch Base network (mainnet, sepolia)
/wallet <path>Load a local keystore or private key
/rpc <url>Set custom Base RPC endpoint
/statusSession status, network, and config overview
/costToken usage and estimated cost breakdown
/gasLive Base L2 gas price + L1 data fee
/toolsList all 30+ available Base tools
/compactCompress conversation to save context window
/blockShow current Base block number and timestamp
/clearClear conversation history and start fresh
/bridge-statusCheck pending bridge transactions status
/exitExit MAGE CLI

05 / Token

$MAGE — Launching on bankr

The community token for MAGE CLI. Every dev who ships on Base with the mage earns their place onchain.

$MAGE Base L2 https://bankr.bot/terminal

What is $MAGE?

MAGE CLI is the AI dev agent for Base L2. Claude-powered. 30+ blockchain tools built in. Deploy contracts, bridge ETH, swap tokens, read state — all from your terminal.

$MAGE is the community token launching on https://bankr.bot/terminal — the Base-native token launchpad. Every dev needs an onchain mage.

🚀 Launch on bankr ⌥ View Source
$MAGE
TICKER
🔵
BASE L2
Launchpad https://bankr.bot/terminal
Chain Base Mainnet (8453)

06 / Examples

Usage Examples

See the mage in action on real Base L2 workflows.

Deploy ERC-20
$ mage "deploy an ERC-20 token called BaseGold with 1M supply"
🧙 Compiling contract with solc 0.8.24...
📡 Broadcasting to Base mainnet...
Contract: 0x4f3a...8b2c
Tx Hash: 0xa1d9...3fe1
Basescan: ✓ Verified
Gas Used: 0.00012 ETH
Bridge ETH
$ mage bridge-status
🌉 Checking Coinbase bridge...
ETH→Base: ~1 min
Base→ETH: ~7 days (standard)
$ mage --yolo "bridge 0.5 ETH from mainnet to Base"
⚡ YOLO mode active — executing bridge...
Deposit Tx: 0x7c2f...91ad
✓ Bridge initiated — ETA 60s
Check Wallet
$ mage balance 0xd8dA6BF...3Cf5
🔵 Fetching Base balances...
ETH: 2.451800 ETH
USDC: 4,200.00 USDC
cbETH: 0.812300 cbETH
AERO: 10,500.00 AERO
NFTs: 3 tokens
Swap Tokens
$ mage "swap 100 USDC for ETH on Aerodrome"
🔄 Finding optimal route...
Route: USDC → ETH (Aerodrome)
Expected: 0.02941 ETH
Slippage: 0.05%
Awaiting confirmation...
Swap Tx: 0x9e4b...c7f2