Skip to content

Getting Started (CLI)

Terminal window
# Homebrew (macOS)
brew tap swm-gpu/swm && brew install swm
# or Python (3.11+)
pipx install swm-gpu

Add at least one GPU cloud API key:

Terminal window
swm config set runpod.api_key YOUR_RUNPOD_KEY

Other providers: vastai.api_key, lambda.api_key, aws.access_key + aws.secret_key, etc.

For workspace sync, configure an S3-compatible storage backend:

Terminal window
swm config set b2.key_id YOUR_KEY_ID
swm config set b2.app_key YOUR_APP_KEY
swm config set b2.bucket my-swm-bucket

swm has built-in tab completion for commands, options, and pod IDs.

If you installed via Homebrew and use fish, or use zsh with Oh My Zsh / prezto (or have compinit already initialized), completion is wired up automatically by the formula — skip this section. Otherwise, generate the completion script once and source it from your shell profile.

Terminal window
_SWM_COMPLETE=bash_source swm > ~/.swm-complete.bash
echo '. ~/.swm-complete.bash' >> ~/.bashrc

macOS users: the system bash (3.2) does not work with modern completions; install bash-completion@2 from Homebrew first.

Terminal window
_SWM_COMPLETE=zsh_source swm > ~/.swm-complete.zsh
echo '. ~/.swm-complete.zsh' >> ~/.zshrc

If you’re on a vanilla zsh (no Oh My Zsh / prezto), zsh’s completion system must be initialized before sourcing the file. Add this to ~/.zshrc before the line above:

Terminal window
autoload -Uz compinit && compinit

Drop the script into fish’s autoload directory — fish picks it up on the next shell:

Terminal window
_SWM_COMPLETE=fish_source swm > ~/.config/fish/completions/swm.fish

After reloading your shell, swm <TAB> completes commands and swm pod stop <TAB> completes pod IDs.

Terminal window
swm gpus -g h100 --max-price 3.00 --sort price
Terminal window
swm pod create -p runpod -g "H100 SXM" -n my-first-pod \
--lifecycle auto-down --idle-timeout 30 -y
Terminal window
swm setup install vllm runpod:YOUR_POD_ID
swm setup start vllm runpod:YOUR_POD_ID
Terminal window
swm pod down my-first-pod

Resume later on any cloud:

Terminal window
swm pod create -p lambda -g a100 -n my-first-pod -w my-first-pod -y