Skip to content

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.

Terminal window
cloudhop provider enable aws
# A company portal: signs in through the browser, then lists accounts
cloudhop add aws sso --start-url https://acme.awsapps.com/start --region us-east-1 --name acme
# See the accounts and roles, with their ids
cloudhop alias acme --list
# Create aliases
cloudhop alias acme --target 123456789012/AdministratorAccess --name acme-prod
cloudhop alias acme --target 210987654321/ReadOnly --name acme-dev --region us-east-2

The --target id is <account id>/<role name>, as shown by --list.

For a personal account:

Terminal window
cloudhop add aws console-login --region us-east-1 --name personal
Terminal window
cloudhop region acme-prod eu-west-1
cloudhop rm acme-dev
cloudhop rm acme --yes # removing a source needs --yes without a terminal
cloudhop ls

cloudhop 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.

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