- Install the CLI in
setup, into~/.local/bin. - Give it a token as a project environment variable. Every mainstream CLI reads its token from the environment without an interactive login.
- Wrap services that need it in
terminals.
Where things live
~/.local/binis on thePATHof the agent, ofsetupandsetup_on_boot, and of everyterminalsentry, so the agent calls the CLI by name. It is inside your home directory, which is the project volume: a seed build that ransetuponce keeps the install for every later boot that skipssetup. Nothing under it needs root./usr/localand other system paths are the VM’s root filesystem, which is not kept across boots that skipsetup. An installer that defaults to/usr/local/binmust be pointed at your home directory instead — most take an install directory as an environment variable or a flag.- Project environment variables are injected before
setup_on_boot, beforeterminalsstart and before the agent starts, so all three see the token.
Example: Fly and Infisical
.aether/environment.json:
curl … | sh pipeline, so it runs under bash -o pipefail: a failed download fails setup instead of letting the seed cache a workspace without Fly. And infisical run does not exchange a machine identity’s client credentials for a token itself, so the terminal does the exchange first with infisical login --method=universal-auth and only starts the dev server once it has a token — a wrong identity fails the login, and the service does not start.
Tokens, set once per project:
--value prompts for the value, so it never lands in your shell history.
From the next task on, fly deploy, fly logs, fly ssh console and infisical secrets work for the agent as they would for you, and the dev server starts with the dev environment’s secrets in its process environment.
Tokens other CLIs read
GitHub needs none of this: every task already carries a repository-scoped token and a configured
gh (see GitHub integration).
What the agent can do with the token
A token in the project environment is readable by the agent and by anything it runs. The CLI makes that power concrete: a Fly deploy token means the agent can deploy; an Infisical identity with write access means it can change secrets. Scope tokens to exactly what a task should be able to do — a Fly token to one app, an Infisical machine identity to one project and one environment — and give them an expiry. Values are masked insetup output and never shown by aether env list.
Notes
- Installing a CLI needs no secrets, so it belongs in
setup, which the seed caches. Changing.aether/environment.jsoninvalidates the seed, and the next boot runssetupagain. - A CLI that insists on an interactive
loginis not usable in a task. All of the CLIs above accept a token from the environment; prefer that path. - Pin versions where it matters to you (
@infisical/cli@x.y.z); the seed otherwise captures whatever the installer fetched when it last ran.