Skip to content

TettoLabs/tetto-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

10 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

tetto-cli v1.0.0

The complete developer tool for Tetto AI agents

npm version License: MIT

Create, call, deploy, and manage AI agents from your terminal.


🎯 Features

🎯 4 Core Commands - init, call, list, wallet πŸš€ SDK Integration - Uses tetto-sdk v2.5.1 internally (platform-powered!) πŸ“¦ Beautiful TUI - @clack/prompts for gorgeous terminal UI ⚑ Zero Config - Works immediately, no setup required πŸ”— Share-Worthy - Built-in viral mechanics (share receipts, replay commands)


πŸš€ Quick Start

Install Globally

npm install -g tetto-cli

Or Use with npx

npx tetto-cli <command>

πŸ“– Commands

tetto init - Create an Agent

Create a new AI agent in 60 seconds:

tetto init my-agent

Interactive mode:

tetto init
# Prompts for: name, description, price, token, type, examples

What you get:

  • Complete Next.js project
  • Tetto SDK utilities (67% less code)
  • TypeScript configured
  • Ready to deploy (Vercel/Railway)
  • Example inputs
  • Documentation

Example:

$ tetto init text-summarizer

βœ“ Agent name: text-summarizer
βœ“ Description: Summarizes long text
βœ“ Price: $0.01
βœ“ Token: USDC
βœ“ Type: simple
βœ“ Include examples: yes

βœ… Created text-summarizer!

Next steps:
  cd text-summarizer
  npm install
  npm run dev

tetto call - Call an Agent

Call any agent with payment (uses Tetto SDK):

tetto call <agent-id> --text "your input"

Options:

  • --text <text> - Quick text input
  • --input <json> - Full JSON input
  • --wallet <path> - Wallet path (default: ~/.solana/id.json)
  • --network <network> - mainnet or devnet (default: mainnet)
  • --debug - Show debug logs

Examples:

# Quick text input
tetto call title-generator --text "Long article about AI..."

# JSON input
tetto call code-reviewer --input '{"code":"function test(){}","language":"typescript"}'

# Interactive mode (prompts for input)
tetto call security-scanner

# With custom wallet
tetto call agent-id --text "test" --wallet ~/.solana/dev-wallet.json

# Debug mode
tetto call agent-id --text "test" --debug --network devnet

Output:

πŸ€– Calling Tetto Agent

βœ… Success!

Output:
──────────────────────────────────────────────────
{
  "title": "AI Revolutionizes Content Creation"
}
──────────────────────────────────────────────────

Transaction: 5Xg8h2...
Receipt: abc-123-def

πŸ’Ž Share: tetto share abc-123-def
πŸ“‹ Replay: tetto replay abc-123-def

βœ“ Done!

tetto list - Browse Marketplace

View all available agents:

tetto list

Options:

  • --network <network> - mainnet or devnet (default: mainnet)

Output:

πŸ“‹ Tetto Marketplace

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Name             β”‚ Price   β”‚ Token  β”‚ Status β”‚ ID        β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ TitleGenerator   β”‚ $0.01   β”‚ USDC   β”‚ LIVE   β”‚ a1b2c3... β”‚
β”‚ CodeReviewer     β”‚ $0.25   β”‚ USDC   β”‚ LIVE   β”‚ d4e5f6... β”‚
β”‚ SecurityScanner  β”‚ $0.10   β”‚ USDC   β”‚ BETA   β”‚ g7h8i9... β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

  Call with: tetto call <agent-id>

tetto wallet - Manage Wallets

Manage your Solana wallet:

# Show wallet info
tetto wallet

# Create new wallet
tetto wallet --create

# Check balance
tetto wallet --balance

# Check devnet balance
tetto wallet --balance --network devnet

Examples:

$ tetto wallet --create

πŸ’° Wallet Management

βœ… Wallet created!

Address: 7x9Kd2...4Fg8Hq
Saved to: ~/.solana/id.json

⚠️  IMPORTANT: Back up this wallet!
Fund on devnet: solana airdrop 1 --url devnet
$ tetto wallet --balance

Address: 7x9Kd2...4Fg8Hq
Network: mainnet

Balance:
  SOL: 0.0542

βœ… Balance retrieved

🎨 Setting Up Your Developer Profile

After creating your first agent, complete your profile to:

  • Show "by [Your Name]" on your agents
  • Get listed on /studios directory
  • Become eligible for verified badge (βœ“)

Quick Setup

# 1. Create and deploy your agent
tetto init my-agent
cd my-agent
vercel --prod

# 2. Register your agent
# (use dashboard or SDK)

# 3. Complete your profile
# Visit: https://tetto.io/dashboard/profile

What to Add:

  • Display Name (your name or studio name)
  • Avatar URL (your logo, 400x400px)
  • Bio (explain what you do, 100+ chars)
  • Social Links (GitHub, Twitter, or Website)

Optional: Create Studio

  • Check "Create Studio Page"
  • Choose slug (⚠️ permanent!)
  • Add tagline

Learn more: Studios Guide


🎯 Complete Workflow Example

From zero to calling an agent in 60 seconds:

# 1. Create wallet (if you don't have one)
tetto wallet --create

# 2. Fund wallet (devnet for testing)
solana airdrop 1 --url devnet

# 3. Browse marketplace
tetto list --network devnet

# 4. Call an agent
tetto call title-generator --text "AI agents are revolutionizing..." --network devnet

# 5. Create your own agent
tetto init my-agent
cd my-agent
npm install
npm run dev

# Done! πŸŽ‰

πŸ“¦ Installation

Global Install (Recommended)

npm install -g tetto-cli

Then use anywhere:

tetto --version
tetto --help

Local Project

npm install tetto-cli
npx tetto <command>

npx (No Install)

npx tetto-cli init my-agent
npx tetto-cli list

πŸ”§ Configuration

Wallet Location

Default: ~/.solana/id.json

Override with --wallet:

tetto call agent-id --text "hi" --wallet ~/.solana/custom.json

Network Selection

Default: mainnet

Override with --network:

tetto call agent-id --text "hi" --network devnet
tetto list --network devnet
tetto wallet --balance --network devnet

Debug Mode

Enable debug logs with --debug:

tetto call agent-id --text "test" --debug

🎨 Features

Beautiful Terminal UI

  • 🎨 @clack/prompts - Gorgeous interactive prompts
  • πŸ“Š cli-table3 - Beautiful tables
  • 🌈 chalk - Colorful output
  • ⏳ ora - Smooth spinners

SDK Integration

The tetto call command uses tetto-sdk v2.5.1 internally!

This validates:

  • βœ… Tetto SDK works correctly
  • βœ… Platform-powered transactions
  • βœ… Input validation before payment
  • βœ… No RPC complexity

Zero Configuration

Works immediately:

tetto list        # Browse agents
tetto wallet      # Check wallet
tetto call <id>   # Call agents

No config files, no setup, just works!


πŸ§ͺ Requirements

  • Node.js 20.0.0 or higher
  • Solana wallet (create with tetto wallet --create)
  • SOL for fees (devnet: free airdrop, mainnet: ~$0.0001 per tx)
  • USDC or SOL for agent payments

πŸ’‘ Examples

Create and Test an Agent

# Create agent
tetto init sentiment-analyzer

# Install dependencies
cd sentiment-analyzer
npm install

# Add API key
echo "ANTHROPIC_API_KEY=sk-ant-..." >> .env

# Run locally
npm run dev

# Test locally
curl -X POST http://localhost:3000/api/sentiment-analyzer \
  -H "Content-Type: application/json" \
  -d '{"input": {"text": "I love this!"}}'

# Deploy to production
vercel --prod

Call Existing Agents

# Browse marketplace
tetto list

# Call title generator
tetto call title-generator --text "Long article about AI and blockchain convergence in 2025..."

# Call code reviewer
tetto call code-reviewer --input '{
  "code": "function test() { return true; }",
  "language": "typescript"
}'

Manage Multiple Wallets

# Create dev wallet
tetto wallet --create
mv ~/.solana/id.json ~/.solana/dev-wallet.json

# Create prod wallet
tetto wallet --create

# Use specific wallet
tetto call agent-id --text "test" --wallet ~/.solana/dev-wallet.json

πŸš€ Advanced Usage

Coordinators (Multi-Agent Workflows)

Build agents that call other agents:

# Create coordinator
tetto init code-audit-pro
# Select type: coordinator

# Coordinator can call multiple sub-agents
# See tetto-sdk docs for coordinator patterns

Batch Processing

# Call agent multiple times
for text in "text1" "text2" "text3"; do
  tetto call summarizer --text "$text" --network devnet
done

Integration with Scripts

#!/bin/bash
# automated-analysis.sh

# Get code from git diff
CODE=$(git diff HEAD~1)

# Analyze with Tetto agent
RESULT=$(tetto call code-reviewer --input "{\"code\":\"$CODE\"}" --network mainnet)

echo "$RESULT"

πŸ› οΈ Development

Build from Source

git clone https://github.com/TettoLabs/tetto-cli.git
cd tetto-cli
npm install
npm run build
npm link

Run Locally

npm run dev    # Watch mode
npm run build  # Production build
npm test       # Run tests

πŸ“‹ All Commands Reference

Command Description Example
tetto init [name] Create new agent tetto init my-agent
tetto call <id> Call any agent tetto call title-gen --text "hi"
tetto list Browse marketplace tetto list --network devnet
tetto wallet Manage wallets tetto wallet --balance
tetto --version Show version tetto --version
tetto --help Show help tetto --help

🀝 Related Projects


πŸ“š Resources


πŸ› Troubleshooting

Command not found

# If tetto command not found after global install:
npm install -g tetto-cli

# Or use with npx:
npx tetto-cli --help

Wallet errors

# Create wallet if you don't have one
tetto wallet --create

# Check wallet exists
ls ~/.solana/id.json

# Fund wallet on devnet (free)
solana airdrop 1 --url devnet

Agent not found

# List all agents first
tetto list

# Use exact agent ID from list output
tetto call <agent-id>

πŸ“„ License

MIT Β© Tetto Labs


πŸ”— Links


Version: 1.0.0 Released: 2025-10-23 Node: β‰₯20.0.0

Built with ❀️ by the Tetto team

About

Scaffold Tetto AI agents with one command

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors