Last Updated: 4/8/2026
CLI Reference
The Pie CLI provides commands for managing the server, running inferlets, and development.
Installation
The CLI is included with the Pie server:
pip install pie-serverCommands
pie run
Run an inferlet:
pie run <inferlet> [-- <args>]Examples:
# Run standard inferlet
pie run std/text-completion -- --prompt "Hello world"
# Run custom inferlet
pie run ./my_inferlet.wasm -- --input "test"
# Run with multiple args
pie run my-inferlet -- --prompt "test" --max-tokens 100pie serve
Start the Pie server:
pie serve [options]Options:
--host- Server host (default: localhost)--port- Server port (default: 8080)--model- Model to load--gpu- GPU device ID
Examples:
# Start server
pie serve
# Custom port
pie serve --port 9000
# Specific model
pie serve --model llama-3.2-1bpie upload
Upload an inferlet to the server:
pie upload <name> <wasm-file>Example:
pie upload my-inferlet ./target/wasm32-wasi/release/my_inferlet.wasmpie list
List available inferlets:
pie listpie build
Build an inferlet project:
pie build [path]Example:
# Build current directory
pie build
# Build specific project
pie build ./my-inferletpie init
Initialize a new inferlet project:
pie init <name> [--lang <language>]Example:
# Rust project (default)
pie init my-inferlet
# JavaScript project
pie init my-inferlet --lang jspie logs
View server logs:
pie logs [--follow]pie status
Check server status:
pie statusGlobal Options
--help, -h- Show help--version, -v- Show version--verbose- Verbose output--quiet- Suppress output
Configuration
Configure Pie via ~/.pie/config.toml:
[server]
host = "localhost"
port = 8080
[models]
default = "llama-3.2-1b"
cache_dir = "~/.pie/models"
[runtime]
max_concurrent = 10
timeout = 300Environment Variables
PIE_HOST- Server hostPIE_PORT- Server portPIE_MODEL- Default modelPIE_API_KEY- API key for authentication
Examples
Development Workflow
# Initialize project
pie init my-app
cd my-app
# Build inferlet
pie build
# Run locally
pie run ./target/wasm32-wasi/release/my_app.wasm -- --prompt "test"
# Upload to server
pie upload my-app ./target/wasm32-wasi/release/my_app.wasmProduction Deployment
# Start server with specific model
pie serve --host 0.0.0.0 --port 8080 --model llama-3.2-1b
# Monitor logs
pie logs --followNext Steps
- Learn about Writing Inferlets
- Explore Client SDKs
- Check out Examples