Setup
This page covers one-time machine setup for the ymirr CLI v2: environment variables and global npm packages.
Environment variables
Deployments and Netrunner need several secrets and config values. The CLI can write them into ~/.ymirr-env and optionally add a line to your shell profile so they are loaded in every terminal.
Configure via CLI
ymirr setup
Choose Environment variables (or Everything). You can:
- Fill only missing values, reconfigure all, or pick specific variables.
- For KUBE_CONFIG, choose “Read from ~/.kube/config” to base64-encode it automatically.
The file is saved as ~/.ymirr-env. If the CLI added a line to ~/.bashrc, new shells will load it. In the current shell, run:
source ~/.ymirr-env
Variables reference
| Variable | Purpose |
|---|---|
PULUMI_ORG | Pulumi organization (e.g. IVFuture) |
PULUMI_ACCESS_TOKEN | Pulumi Cloud access token |
CLOUDFLARE_API_TOKEN | Cloudflare API token |
VAULT_ADDR | HashiCorp Vault URL (e.g. https://vault.semiotic.eu) |
VAULT_TOKEN | Vault auth token |
KUBE_CONFIG | Base64-encoded kubeconfig |
CLI_AUTH_TOKEN | Netrunner / auth token |
API_URL | Netrunner API base (e.g. https://netrunner.semiotic.eu/) |
The CLI loads ~/.ymirr-env at startup when the file exists, so deployments and Netrunner see these values.
Global packages
For deploy and netrunner to work, the following are needed:
- @ymirr/pulumi-infra — Used when running Pulumi (deploy/destroy). The CLI looks for it in the global npm root or the current project’s
node_modules. - @ymirr/netrunner — Used for
ymirr netrunner clone .... Must be installed globally (or the CLI will prompt you).
Install via CLI
ymirr setup
Choose Global packages (or Everything). The CLI checks that the @ymirr registry is configured in ~/.npmrc and runs:
npm install -g @ymirr/pulumi-infra
npm install -g @ymirr/netrunner
Registry config
Ensure your npm registry is set for the @ymirr scope (and auth if the registry is private). Example ~/.npmrc:
@ymirr:registry=https://npm.ivfuture.uk/
//npm.ivfuture.uk/:_authToken=<your-token>
If you use a different registry URL or auth method, configure it before running ymirr setup → Global packages.
Summary
- Run
ymirr setup. - Configure Environment variables (writes
~/.ymirr-env; optionally sources it from~/.bashrc). - Install Global packages (requires
@ymirrregistry in~/.npmrc). - In a new terminal (or after
source ~/.ymirr-env), useymirr deployandymirr netrunneras needed.