Skip to main content

Git-style CLI for versioned Infisical environment workflows

Project description

inf-hub

inf-hub (ih) is a small, practical “git for envs” built on top of Infisical.

It helps you manage environment variables as a versioned operational workflow (pull, push, history, rollback) while keeping project context in each folder.

Infisical can be self-hosted, including free/self-managed setups:

What it does

  • Git-style CLI for env workflows: pull, push, history, rollback
  • Folder-local context via .inf (tokenId, projectId, environment)
  • Multi-token model: one credential per tokenId in keyring (tokenId:{tokenId})
  • Saved token list for validation and interactive selection
  • Interactive menus (questionary) backed by live API data
  • Clear one-line success messages with target env/file info

Install

pipx install inf-hub
# or
pip install inf-hub

Main commands:

  • ih
  • ih-dc

Interactive-first workflow

All core commands are designed to run comfortably in interactive mode:

  • guided prompts and selection menus (questionary)
  • API-backed choices for project/environment
  • Token selection from saved list (populated via ih register token)

Minimal first-run

1) Set API URL

export INFISICAL_API_URL="https://your-infisical-host"

2) Register token

ih register token

By default, ih register token:

  • Extracts org-id and org-name from JWT
  • Requires a unique tokenId name
  • Stores secret in keyring as tokenId:{tokenId}

3) Initialize current folder

ih init folder

This creates .inf in current directory. Commands then use local context unless overridden by flags.

Quick usage

# Pull remote env to local file (.env by default)
ih pull

# Print env to stdout (no file write)
ih pull -p

# Push local .env (default)
ih push

# Push custom file
ih push -f .env.prod

# Push single keys (inline mode)
ih push -k API_URL -v https://... -k DEBUG -v false

# Secret history
ih history --name API_KEY

# Rollback and sync local file (.env default, or custom with -f)
ih rollback --name API_KEY --version 2 -f .env.rollback

Command map

  • ih register token
  • ih unregister token
  • ih init folder
  • ih create project
  • ih list orgs|projects|identities
  • ih set TYPE --value VALUE
  • ih unset TYPE
  • ih pull [-f path | -p]
  • ih push [-f path | (-k KEY -v VALUE)...]
  • ih history --name NAME
  • ih rollback --name NAME --version N [-f path]

Notes

  • ih set/unset always target local .inf context.
  • If a command targets an unknown tokenId, it fails and asks you to run ih register token.
  • ih push file mode and inline mode are mutually exclusive.

Architecture

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

inf_hub-0.2.1.tar.gz (17.0 kB view details)

Uploaded Source

Built Distribution

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

inf_hub-0.2.1-py3-none-any.whl (17.3 kB view details)

Uploaded Python 3

File details

Details for the file inf_hub-0.2.1.tar.gz.

File metadata

  • Download URL: inf_hub-0.2.1.tar.gz
  • Upload date:
  • Size: 17.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for inf_hub-0.2.1.tar.gz
Algorithm Hash digest
SHA256 1f9994b76ecaf1ff3703c001453b625febb83733f3d25bad7c4bb666f6a5899b
MD5 dd1a054c7c2808f8133276d47ddb2935
BLAKE2b-256 62b1432a113d97c506d34213704086f2d203ef724a34a7cac296e8397b6bc336

See more details on using hashes here.

File details

Details for the file inf_hub-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: inf_hub-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 17.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for inf_hub-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cdab383616f176e271667c95bead37c77c911e7692ae9dae38d09d09fafd6f7c
MD5 20a8fc53f4166a881b9ab5af207f2495
BLAKE2b-256 5cedadc8e55760f53a6423f8a03974491244afd242913ea8f162b19b7aef2fe7

See more details on using hashes here.

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