Scripts and automation
Every setup command also works with flags, so you can script a new machine or share a setup with your team. Without a terminal (in a script, a pipe or CI), cloudhop never waits for an answer: it tells you which flag is missing.
Set up a machine
Section titled “Set up a machine”cloudhop provider enable aws
# A company portal: signs in through the browser, then lists accountscloudhop add aws sso --start-url https://acme.awsapps.com/start --region us-east-1 --name acme
# See the accounts and roles, with their idscloudhop alias acme --list
# Create aliasescloudhop alias acme --target 123456789012/AdministratorAccess --name acme-prodcloudhop alias acme --target 210987654321/ReadOnly --name acme-dev --region us-east-2The --target id is <account id>/<role name>, as shown by --list.
For a personal account:
cloudhop add aws console-login --region us-east-1 --name personalOther non-interactive commands
Section titled “Other non-interactive commands”cloudhop region acme-prod eu-west-1cloudhop rm acme-devcloudhop rm acme --yes # removing a source needs --yes without a terminalcloudhop lscloudhop is built for people: signing in needs a browser and a human. In CI,
use the cloud’s own mechanisms instead, such as GitHub Actions OIDC with
aws-actions/configure-aws-credentials.
Exit codes
Section titled “Exit codes”| Code | Meaning |
|---|---|
0 |
Success |
1 |
cloudhop error (the message says what and how to fix it) |
130 |
Cancelled with Ctrl+C |
| other | hop and cloudhop exec return the exit code of the command they ran |