Skip to main content

RUN COMMANDS ON A REMOTE SERVER

This guide shows you how to run Swamp commands against a remote swamp serve instance. This covers client-side usage of --server — for managing the worker pool and deploying workers, see Remote Execution.

Connect to a remote server

Any Swamp command that supports --server can target a remote instance:

swamp model method run hello execute --input 'run=echo hi' \
  --server wss://swamp.example.com

If you have stored a token with swamp auth server-login, authentication happens automatically.

Set SWAMP_SERVE_URL to avoid repeating --server

export SWAMP_SERVE_URL=wss://swamp.example.com

With this set, all commands use the remote server by default:

swamp model method run hello execute --input 'run=echo hi'
swamp data get hello result --version 1
swamp model search

Common remote operations

Run a model method

swamp model method run hello execute --input 'run=echo hi' \
  --server wss://swamp.example.com

Query data

swamp data get hello result --version 1 --server wss://swamp.example.com
swamp data list hello --server wss://swamp.example.com
swamp data query 'modelType == "command/shell"' --server wss://swamp.example.com
swamp data search --type resource --server wss://swamp.example.com

Search models

swamp model search --server wss://swamp.example.com

Access vault secrets

swamp vault get default --server wss://swamp.example.com
swamp vault list-keys default --server wss://swamp.example.com
swamp vault search --server wss://swamp.example.com

Run workflows

swamp workflow run deploy --server wss://swamp.example.com
swamp workflow approve deploy gate-step --server wss://swamp.example.com
swamp workflow resume deploy --server wss://swamp.example.com

Check repository health

swamp doctor secrets --server wss://swamp.example.com
swamp doctor vaults --server wss://swamp.example.com
swamp doctor workflows --server wss://swamp.example.com

List extensions

swamp extension list --server wss://swamp.example.com
swamp extension info @swamp/gcp/run --server wss://swamp.example.com

View audit log

swamp audit --server wss://swamp.example.com

View summary

swamp summary --server wss://swamp.example.com