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:
- https://infisical.com/
- https://github.com/Infisical/infisical
- https://infisical.com/docs/self-hosting/overview
What it does
- Git-style CLI for env workflows:
pull,push,history,rollback - Folder-local context via
.inf(orgId,projectId,environment) - Multi-org token model: one token per org (
orgId:{uuid}in keyring) - Interactive menus (questionary) backed by live API data
- Smart autocomplete for org/project/env/secret names
- Clear one-line success messages with target env/file info
Install
pipx install inf-hub
# or
pip install inf-hub
Main commands:
ihih-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 org/project/environment
- autocomplete support for IDs, environments, and secret names
You can run the steps below without flags and let ih guide the flow.
Headless setup (Debian/Ubuntu)
inf-hub uses Python keyring with keyring-pass. In headless environments, install and initialize pass.
1) Install system deps
sudo apt update
sudo apt install -y pass gnupg2
2) Create GPG key + init pass store (minimal)
gpg --batch --passphrase '' --quick-generate-key "ih-test <ih-test@local>" default default 0
KEY_ID=$(gpg --list-secret-keys --keyid-format LONG | awk '/^sec/{print $2}' | tail -n1 | cut -d'/' -f2)
pass init "$KEY_ID"
3) Optional: force keyring backend
export PYTHON_KEYRING_BACKEND=keyring_pass.PasswordStoreBackend
Minimal first-run
1) Set API URL
export INFISICAL_API_URL="https://your-infisical-host"
2) Save token for one org
ih init token
3) Initialize current folder
ih init folder
This creates .inf in current directory. From now on, commands automatically use .inf 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 init tokenih init folderih create projectih list orgs|projects|identitiesih set TYPE --value VALUE [--global]ih unset TYPE [--global]ih pull [-f path | -p]ih push [-f path | (-k KEY -v VALUE)...]ih history --name NAMEih rollback --name NAME --version N [-f path]
Notes
- In local scope,
ih set/unsetrequires.inf; use--globalfor global config. - If a command targets an org without a saved token, it fails explicitly and tells you which org token is missing.
ih pushfile mode and inline mode are mutually exclusive.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file inf_hub-0.1.0.tar.gz.
File metadata
- Download URL: inf_hub-0.1.0.tar.gz
- Upload date:
- Size: 14.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c3580404d0f978181d043982550b5599aa71fae5b7e1e4c706645ce4440edbc0
|
|
| MD5 |
2ec4e157409ccc7b3623b77142443483
|
|
| BLAKE2b-256 |
cd8ace3917a99058b967b4215de675dbb7d9ce688cf4f297bf0e243dd880893a
|
File details
Details for the file inf_hub-0.1.0-py3-none-any.whl.
File metadata
- Download URL: inf_hub-0.1.0-py3-none-any.whl
- Upload date:
- Size: 13.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0d35562bf276b0dbe8f6aa4ff7439dd3f98bf236067f59b76e6c5ddb74d10181
|
|
| MD5 |
4957c61f08c1e122bcf1698092a230d0
|
|
| BLAKE2b-256 |
3f370d1c877b79415c83f62fb5fd140de6190ac0b6da7922971961f13acab1bd
|