Skip to content

Commands ​

cloudsesame [command] [providers|groups...] [options] [-- <command...>]
CommandWhat it does
authMake sure you're logged in; offers to log in. The default command.
predevConnectivity check, then auth. Skipping is allowed.
checkReport connectivity and login status. Never prompts.
initWrite a starter sesame.config.ts.
envLike auth, then print export lines for tools that can't read the logins.

All commands except init take providers (gcloud, aws, az, wrangler, cloudflare, sentry) or groups to narrow what's checked. Without them, everything configured is checked (or every installed CLI, with no config; cloudflare and sentry aren't detected, so name them or configure them).

auth (default) ​

sh
cloudsesame            # same as: cloudsesame auth
cloudsesame aws        # same as: cloudsesame auth aws
cloudsesame infra      # same as: cloudsesame auth infra (a group)

Checks each provider and, when one isn't ready, asks:

  • Log in runs the provider's fix, e.g. aws sso login --profile dev, then checks again. Shown as Fix when the fix isn't a login (like gcloud config set project), and as Retry after a failed attempt. If a fix succeeds but uncovers another (e.g. gcloud auth login --update-adc resets the ADC quota project), the next fix runs right away without asking again.
  • Skip continues without it.
  • Stop exits with code 5.

Being offline is an error (exit 3): there's nothing to authenticate against.

predev ​

Like auth, but checks connectivity first and lets you continue offline. Meant for package.json:

json
{
  "scripts": {
    "predev": "cloudsesame predev"
  }
}

check ​

Reports connectivity and status. Never prompts or logs in. Exit code 4 if anything isn't ready.

sh
cloudsesame check
cloudsesame check --json   # machine-readable, see CI and AI agents

init ​

Writes sesame.config.ts (or sesame.config.json with --json) in the current directory, based on the installed CLIs and their current project, profile and subscription. --force overwrites an existing config. In a terminal, it then offers to install the Agent Skill with bunx skills add NexiHealth/cloudsesame.

env ​

sh
eval "$(cloudsesame env)"         # or: cloudsesame env infra
tofu plan

Runs like auth, then prints export lines for the credentials other tools can't find themselves: CLOUDFLARE_API_TOKEN from the cf login, SENTRY_AUTH_TOKEN (and SENTRY_BASE_URL for self-hosted) from sentry-cli login. Only the exports go to stdout. Status, prompts and logins go to stderr, so eval never runs anything else. If something isn't ready, it prints nothing and exits with the usual code.

The syntax follows $SHELL (PowerShell on Windows), or set it with --shell sh|fish|pwsh. The Cloudflare token lasts about an hour: run it again when it expires. See Shell integration.

Run a command ​

Put a command after -- to run it once everything is ready:

sh
cloudsesame infra -- tofu plan
cloudsesame predev -- vite
  • cloudsesame's own output goes to stderr, so the command's stdout stays clean (cloudsesame infra -- tofu output -json | jq).
  • Put a command or group before -- (cloudsesame auth -- …, cloudsesame infra -- …): when Bun runs a script, it drops a -- that comes right after the script name.
  • It runs only when the cloudsesame command would exit 0 (so after predev skips, too). Otherwise it doesn't run and cloudsesame exits with its own code.
  • It gets the terminal and your environment, plus credentials that tools can't find on their own: CLOUDFLARE_API_TOKEN from the cf login, SENTRY_AUTH_TOKEN from sentry-cli login. Other providers' tools already read their CLI's login (gcloud ADC, AWS profiles, az).
  • cloudsesame exits with the command's exit code (127 if it can't be started).
  • Works with auth, predev and check; not with init or --json.

In package.json:

json
{
  "scripts": {
    "plan": "cloudsesame infra -- tofu plan",
    "apply": "cloudsesame infra -- tofu apply"
  }
}

Options ​

OptionDescription
--skipNever prompt or fail: skip providers that aren't ready, continue offline
-y, --yesNever prompt: log in when needed, continue offline
--strictTreat skipped providers (and continuing offline) as failures
--freshCheck everything, ignoring the cache for this run (check always does)
--offline <policy>prompt | continue | fail (predev)
--unauthenticated <policy>prompt | login | skip | fail
--no-inputDon't prompt, as if there were no terminal
--animation <policy>after-login | always | never
-c, --config <file>Config file. Default: nearest sesame.config.* up to the git root
--jsonJSON output; implies --no-input. For init, write sesame.config.json
--forceinit: overwrite an existing config
--shell <shell>env: sh | fish | pwsh. Default: from $SHELL, PowerShell on Windows
--plainPlain text output, no colors or interactive UI. Also CLOUDSESAME_PLAIN=1, and automatic on Node < 22
-h, --helpShow help
-v, --versionShow version

Precedence: flags > config > defaults. --offline and --unauthenticated win over --skip and --yes, which win over the config's offline and unauthenticated.

--yes logs in once

With --yes (or unauthenticated: "login"), each provider gets one login attempt (plus any follow-up fixes a successful one uncovers). If it's still not ready after that, the run fails: there's no one to ask whether to retry.

No terminal ​

When there's no terminal (CI, agents, piped input) or with --no-input, a prompt can't be shown. By default it fails with exit code 4 and prints the commands to run, plus a hint to rerun with --skip. Set noTerminal: "skip" in the config to skip instead. See CI and AI agents.

Exit codes ​

CodeMeaning
0Ready (skipped providers count as ready unless --strict)
1Unexpected error
2Invalid arguments or config
3Offline
4A provider isn't ready: not logged in, wrong account/project, missing permissions, or CLI missing
5Stopped by the user
130Interrupted (Ctrl-C)

With -- <command>, once ready, the exit code is the command's (127 if it can't be started).