Skip to main content

Movitera CLI: inject vault secrets as environment variables, generate TOTP codes

Project description

movitera CLI

Inject Movitera vault secrets as environment variables, browse credentials, render dotenv files, and generate TOTP codes from the terminal. Authenticates with a Movitera vault personal access token (PAT).

Install

pip install movitera-cli
# or install as an isolated CLI tool (recommended):
pipx install movitera-cli
# or with uv:
uv tool install movitera-cli
# or run without installing:
uvx --from movitera-cli movitera --help

Quick start

# 1. Sign in (opens your browser, click "Authorize" — no copy/paste).
#    Your team is auto-saved as the default.
movitera login

# 2. See what you can reach:
movitera whoami
movitera team list
movitera creds list

# 3. Run any command with secrets injected as env vars:
movitera run -c myapp-prod -- npm start

# 4. Or dump as dotenv (stdout, or a 0600 file with -o):
movitera secrets pull -c myapp-prod -o .env

# 5. Or generate a TOTP code:
movitera totp <credential-id>

Omit -c/--credential (or --team) on a terminal and the CLI shows an interactive picker.

How it works

movitera run -- cmd fetches the dotenv body from GET /vault/credentials/by-name/{name}/env, then execs the child process with those vars merged into its environment. The CLI never writes secrets to disk — they exist only in the child process's environ (and secrets pull -o writes a 0600 file when you explicitly ask for one).

A single PAT works across every team you belong to: the token is minted against one team but credential reads authorize by your team membership, so you can movitera team use <name> to switch the default at any time.

Tokens are stored in the OS keyring (Keychain on macOS, libsecret on Linux, Credential Manager on Windows) with a file fallback under ~/.config/movitera/token (mode 0o600) if no keyring backend is available. Non-secret preferences (default team, API URL) live in ~/.config/movitera/config.json.

Config

Environment variables override the saved config file.

Env var Purpose Default
MOVITERA_API_URL API base URL https://api.movitera.com
MOVITERA_TOKEN PAT override (skips keyring lookup)
MOVITERA_TEAM Default team id (overrides saved default)
MOVITERA_CONFIG_DIR Base config dir (like XDG_CONFIG_HOME); the token + config live in <dir>/movitera/ ~/.config

Run movitera config to see the resolved paths and values.

Commands

movitera login

Opens your default browser to the Movitera approval screen. Click "Authorize" and the CLI captures a freshly minted PAT via a one-time grant code (PKCE-protected), stores it in the OS keyring, and pins the approved team as your default. The PAT never appears in the URL or browser history.

Headless escape hatches — for CI, SSH, and Docker where no browser is available:

# Paste a PAT directly:
movitera login --token mvt_pat_…

# Pipe a PAT from another tool (`pass`, `vault`, etc.):
pass show movitera/pat | movitera login --stdin

# Or skip `login` entirely by setting MOVITERA_TOKEN at runtime:
export MOVITERA_TOKEN=mvt_pat_…
movitera secrets pull --team <teamId> -c myapp-prod

movitera logout

Removes the stored PAT.

movitera whoami

Shows the API URL, auth source, default team, and a live connectivity check.

movitera team list / team use <name> / team show / team clear

List the teams you belong to, pin a default (by name, slug, or id) so other commands don't need --team, show the current default, or forget it.

movitera creds list [--team T] [--env] [--search Q]

Browse credential metadata (names, kinds, tags) in a team. --env limits the list to ENV_BUNDLE credentials; values are never shown.

movitera run [-c NAME] [--team T] -- <cmd> [args...]

Fetches the ENV_BUNDLE credential and execs <cmd> with those vars in the environment.

movitera secrets pull [-c NAME] [--team T] [-o FILE]

Writes the dotenv body to stdout, or to FILE (mode 0600) with -o. Exits non-zero on resolution failures so you can safely chain ... > .env.

movitera totp [CREDENTIAL_ID] [--team T]

Prints the current TOTP code for the credential's OTPAUTH_URI field. Omit the id on a terminal to pick interactively.

Shell completion

movitera --install-completion installs completion for your shell; movitera --show-completion prints it.

PAT management (creating/revoking tokens) lives in the Movitera web app — those endpoints require an interactive session, not a PAT.

Security model

  • PATs have full 256-bit entropy and are stored as SHA-256 on the server, so a server compromise cannot recover the plaintext.
  • Every movitera run invocation is audited server-side, but PAT reads are coalesced per hour per token (see the backend's FETCHED_VIA_TOKEN aggregation) so a hot dev loop doesn't drown the log.
  • Group/team access is re-checked on every request: if your vault scope is revoked, your PAT immediately loses access — no token-cache divergence.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

movitera_cli-0.3.0.tar.gz (57.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

movitera_cli-0.3.0-py3-none-any.whl (26.6 kB view details)

Uploaded Python 3

File details

Details for the file movitera_cli-0.3.0.tar.gz.

File metadata

  • Download URL: movitera_cli-0.3.0.tar.gz
  • Upload date:
  • Size: 57.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for movitera_cli-0.3.0.tar.gz
Algorithm Hash digest
SHA256 9448d0178643ad454fcb94784ed36a0c818ed9843846195aa910996ffeef111d
MD5 577ccfb6847d7c24d771cc8bbf5b55da
BLAKE2b-256 50d816a74cf8e2a11429a5f98623292ad1c5c8dba1d1d47c66ba2d9f10cabcaf

See more details on using hashes here.

Provenance

The following attestation bundles were made for movitera_cli-0.3.0.tar.gz:

Publisher: publish.yml on joaoheusi/movitera-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file movitera_cli-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: movitera_cli-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 26.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for movitera_cli-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 94949dcfe4066051253063b16f9b485c203782487a0c35f391721061b4516f39
MD5 90f7260bb8f95ac32818ece7ed8cf855
BLAKE2b-256 ec9c79b9b69594c28fb3526b08283fecfb01a9d6560468f9cd1f7644750b718c

See more details on using hashes here.

Provenance

The following attestation bundles were made for movitera_cli-0.3.0-py3-none-any.whl:

Publisher: publish.yml on joaoheusi/movitera-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page