GUIDEGuide

Address project and environment

Beyond Env credentials (-c), the CLI addresses Vault projects by project × environment: -p my-app -e production — or no flags at all, with a movitera.yaml at the repository root.

Two addressing models

bash
# legacy model (unchanged)
$ movitera run -c my-credential -- npm start

# new model: project × environment
$ movitera run -p my-app -e production -- npm start
  • -p/--project and -e/--env take the project and environment slugs; -t/--team remains optional.
  • Using -c together with -p/-e is an error — the two models do not mix on the same command.
  • -c NAME (ENV_BUNDLE) keeps working forever; the dual model is deliberate.

Bind a repository with `movitera setup`

bash
$ movitera setup
# pick team → project → environment and write movitera.yaml at the repo root

movitera.yaml is commit-safe — it stores addresses, never secrets:

text
# movitera.yaml
team: 6f2a…
project: my-app
env: development

With the file in place, movitera run -- npm start works without flags.

Resolution precedence

Address resolution follows strict precedence:

  • 1. Flags (-p/-e/-t).
  • 2. Environment variables (MOVITERA_PROJECT, MOVITERA_ENV, MOVITERA_TEAM).
  • 3. movitera.yaml — discovered by walking up directories from the current one.
  • 4. Interactive picker, with auto-selection when only one option exists.

movitera project list shows the projects your token can reach; movitera config also prints the resolved address and where it came from.

Run a process with `run`

bash
$ movitera run -p my-app -e production -- ./deploy.sh

The CLI downloads the whole environment in one call, injects the keys over the process environment, and replaces the current process with the command — no shell in between, no temporary file, no secret on disk.

Pull secrets with `secrets pull`, `secrets list`, and `secrets get`

bash
$ movitera secrets pull -p my-app -e staging --format env -o .env.staging
$ movitera secrets pull -p my-app -e staging --format json | jq .
  • Formats: env (default), json, yaml, and docker. -o writes the file with 0600 permissions.
  • docker with a multiline value is refused by the server, naming the keys; the CLI suggests env/json.
bash
$ movitera secrets list -p my-app -e production        # keys + version, never values
$ movitera secrets get DATABASE_URL -p my-app -e production   # raw value on stdout (audited)

get prints the raw value — safe for $(…) in scripts; -o file keeps 0600. Every value read is audited in the project history.

Next