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.comIf 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.comWith 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 searchCommon remote operations
Run a model method
swamp model method run hello execute --input 'run=echo hi' \
--server wss://swamp.example.comQuery 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.comSearch models
swamp model search --server wss://swamp.example.comAccess 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
swamp vault read-secret default api-key --yes --server wss://swamp.example.com
swamp vault audit-trail --vault default --server wss://swamp.example.comManage vault configuration
swamp vault create local_encryption staging --server wss://swamp.example.com
swamp vault edit staging --server wss://swamp.example.com
swamp vault type search --server wss://swamp.example.comRun 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.comManage workflows
swamp workflow create deploy --server wss://swamp.example.com
swamp workflow edit deploy --server wss://swamp.example.com
swamp workflow delete deploy --yes --server wss://swamp.example.com
swamp workflow validate deploy --server wss://swamp.example.com
swamp workflow evaluate deploy --server wss://swamp.example.comCheck 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.comReload extensions
swamp serve reload --server wss://swamp.example.comManage extensions
swamp extension list --server wss://swamp.example.com
swamp extension info @swamp/gcp/run --server wss://swamp.example.com
swamp extension pull @swamp/s3-datastore --server wss://swamp.example.com
swamp extension update --server wss://swamp.example.comManage models
swamp model edit hello --server wss://swamp.example.com
swamp model type describe command/shell --server wss://swamp.example.com
swamp model type search shell --server wss://swamp.example.comManage access tokens
swamp access token list --server wss://swamp.example.com
swamp access token revoke ci-token --server wss://swamp.example.com
swamp access token rotate ci-token --server wss://swamp.example.comManage worker tokens
swamp worker token create ci-runner --duration 24h --server wss://swamp.example.com
swamp worker token list --server wss://swamp.example.com
swamp worker token revoke ci-runner --server wss://swamp.example.comHousekeeping
swamp data gc --server wss://swamp.example.com
swamp data prune --dry-run --server wss://swamp.example.com
swamp run gc --server wss://swamp.example.com
swamp datastore namespace list --server wss://swamp.example.comConfigure the datastore
swamp datastore setup extension @swamp/s3-datastore \
--config '{"bucket":"my-bucket","region":"us-east-1"}' \
--server wss://swamp.example.comMigrate vaults
swamp vault migrate my-secrets --to-type @swamp/aws-sm \
--config '{"region":"us-east-1"}' --yes \
--server wss://swamp.example.comView audit log
swamp audit --server wss://swamp.example.comView summary
swamp summary --server wss://swamp.example.comRelated
- Set Up Token Authentication — store credentials for automatic use
- Remote Execution — manage workers and the dispatch pool
- Serve Flags — SWAMP_SERVE_URL and other environment variables