Skip to main content

Wafer CLI

Run GPU workloads, optimize kernels, and query GPU documentation.

Getting Started

# Install
cd apps/wafer-cli && uv sync

# Use staging (workspaces and other features require staging)
wafer config set api.environment staging

# Login
wafer login

# Run a command on a remote GPU
wafer remote-run -- nvidia-smi

Commands

wafer login / wafer logout / wafer whoami

Authenticate with GitHub OAuth.

wafer login          # Opens browser for GitHub OAuth
wafer whoami         # Show current user
wafer logout         # Remove credentials

wafer remote-run

Run any command on a remote GPU.

wafer remote-run -- nvidia-smi
wafer remote-run --upload-dir ./my_code -- python3 train.py

wafer workspaces

Create and manage persistent GPU environments.

Available GPUs:

  • MI300X - AMD Instinct MI300X (192GB HBM3, ROCm)
  • B200 - NVIDIA Blackwell B200 (180GB HBM3e, CUDA) - default
wafer target workspace list
wafer target workspace create my-workspace --gpu B200 --wait   # NVIDIA B200
wafer target workspace create amd-dev --gpu MI300X             # AMD MI300X
wafer target workspace ssh <workspace-id>
wafer target workspace delete <workspace-id>

wafer agent

AI assistant for GPU kernel development. Helps with CUDA/Triton optimization, documentation queries, and performance analysis.

wafer agent "What is TMEM in CuTeDSL?"
wafer agent -s "optimize this kernel" < kernel.py

wafer tool eval

Evaluate kernel correctness and performance against a reference implementation.

Functional format (default):

# Generate template files
wafer tool eval make-template ./my-kernel

# Run evaluation
wafer tool eval gpumode --impl kernel.py --reference ref.py --test-cases tests.json --benchmark

The implementation must define custom_kernel(inputs), the reference must define ref_kernel(inputs) and generate_input(**params).

KernelBench format (ModelNew class):

# Extract a KernelBench problem as template
wafer tool eval kernelbench make-template level1/1

# Run evaluation
wafer tool eval kernelbench --impl my_kernel.py --reference problem.py --benchmark

The implementation must define class ModelNew(nn.Module), the reference must define class Model, get_inputs(), and get_init_inputs().

wafer agent -t ask-docs

Query GPU documentation using the docs template. Uses the ask_docs tool to search wafer's documentation corpus via the API.

wafer agent -t ask-docs -s "What causes bank conflicts in shared memory?"

Customization

wafer tool eval options

wafer tool eval gpumode --impl k.py --reference r.py --test-cases t.json \
    --target vultr-b200 \    # Specific GPU target
    --benchmark \            # Measure performance
    --profile                # Enable torch.profiler + NCU

Profile analysis

wafer tool ncu analyze profile.ncu-rep
wafer tool nsys analyze profile.nsys-rep

Advanced

Local targets

Bypass the API and SSH directly to your own GPUs:

wafer target config list
wafer target config add ./my-gpu.toml
wafer target config default my-gpu

Defensive evaluation

Detect evaluation hacking (stream injection, lazy evaluation, etc.):

wafer tool eval gpumode --impl k.py --reference r.py --test-cases t.json --benchmark --defensive

Other tools

wafer tool perfetto <trace.json> --query "SELECT * FROM slice"   # Perfetto SQL queries
wafer tool capture ./script.py                                    # Capture execution snapshot
wafer compiler-analyze kernel.ptx                                 # Analyze PTX/SASS

ROCm profiling (AMD GPUs)

wafer tool rocprof-sdk ...
wafer tool rocprof-systems ...
wafer tool rocprof-compute ...

Shell Completion

Enable tab completion for commands, options, and target names:

# Install completion (zsh/bash/fish)
wafer --install-completion

# Then restart your terminal, or source your shell config:
source ~/.zshrc  # or ~/.bashrc

Now you can tab-complete:

  • Commands: wafer tool ev<TAB> → wafer tool eval
  • Options: wafer tool eval --<TAB>
  • Target names: wafer tool eval --target v<TAB> → wafer tool eval --target vultr-b200
  • File paths: wafer tool eval gpumode --impl ./<TAB>

AI Assistant Skills

Install the Wafer CLI skill to make wafer commands discoverable by your AI coding assistant:

# Install for all supported tools (Claude Code, Codex CLI, Cursor)
wafer skill install

# Install for a specific tool
wafer skill install -t cursor    # Cursor
wafer skill install -t claude    # Claude Code
wafer skill install -t codex     # Codex CLI

# Check installation status
wafer skill status

# Uninstall
wafer skill uninstall

Installing from GitHub (Cursor)

You can also install the skill directly from GitHub in Cursor:

  1. Open Cursor Settings (Cmd+Shift+J / Ctrl+Shift+J)
  2. Navigate to Rules → Add Rule → Remote Rule (Github)
  3. Enter: https://github.com/wafer-ai/skills
  4. Cursor will automatically discover skills in .cursor/skills/

The skill provides comprehensive guidance for GPU kernel development, including documentation lookup, trace analysis, kernel evaluation, and optimization workflows.


Requirements

  • Python 3.10+
  • GitHub account (for authentication)

Metadata

Release files for wafer-cli 0.2.64

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wafer-cli 0.2.64
File Size Uploaded Provenance Actions
wafer_cli-0.2.64.tar.gz 329.4 kB Without provenance Details for wafer_cli-0.2.64.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for wafer-cli 0.2.64
File Interpreter ABI Platform Actions
wafer_cli-0.2.64-py3-none-any.whl Python 3 none any Details for wafer_cli-0.2.64-py3-none-any.whl

Total release size: 610.8 kB

Release files / wafer_cli-0.2.64.tar.gz

Download URL wafer_cli-0.2.64.tar.gz
Size 329.4 kB
Tags Source
SHA-256 checksum
How to use checksums
dc21544063d48196a3f13180e03681ac13920811c73e9d5d6610a1e3406cbbff
BLAKE2b-256 checksum
How to use checksums
57fe0cae10252fbf7d193d7ec68d7f375383e0344e8c330399907d3da11b92e3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Release files / wafer_cli-0.2.64-py3-none-any.whl

Download URL wafer_cli-0.2.64-py3-none-any.whl
Size 281.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
837167e98adc378940ed86f4c053db46aad5c19855c008eedd4cb6a0a1b0293b
BLAKE2b-256 checksum
How to use checksums
ac231c7519b4691ca03ae8f641f292be3fca68d78ee98aee2441f23e35df56a0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Security for wafer-cli 0.2.64

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.64 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page