Skip to Content
Cli (2)

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-server

Commands

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 100

pie 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-1b

pie upload

Upload an inferlet to the server:

pie upload <name> <wasm-file>

Example:

pie upload my-inferlet ./target/wasm32-wasi/release/my_inferlet.wasm

pie list

List available inferlets:

pie list

pie build

Build an inferlet project:

pie build [path]

Example:

# Build current directory pie build # Build specific project pie build ./my-inferlet

pie 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 js

pie logs

View server logs:

pie logs [--follow]

pie status

Check server status:

pie status

Global 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 = 300

Environment Variables

  • PIE_HOST - Server host
  • PIE_PORT - Server port
  • PIE_MODEL - Default model
  • PIE_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.wasm

Production Deployment

# Start server with specific model pie serve --host 0.0.0.0 --port 8080 --model llama-3.2-1b # Monitor logs pie logs --follow

Next Steps