### Install TinyVault Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/docs/guide/getting-started.md Install the binary using Homebrew or Go, and verify the installation. ```bash brew install --cask abdul-hamid-achik/tap/tvault ``` ```bash go install github.com/abdul-hamid-achik/tinyvault/cmd/tvault@latest ``` ```bash tvault --version ``` -------------------------------- ### Install tinyvault Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/npm/cli/README.md Install the package globally or run it directly using npx. ```bash npm install -g @thelacanians/tinyvault ``` ```bash npx -y @thelacanians/tinyvault --help ``` -------------------------------- ### Install or upgrade TinyVault Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/docs/changelog.md Commands to install or upgrade the TinyVault CLI using Homebrew or Go. ```bash brew upgrade --cask tvault # Homebrew go install github.com/abdul-hamid-achik/tinyvault/cmd/tvault@latest ``` -------------------------------- ### Run Studio with CLI Flags Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/docs/guide/studio.md Examples of launching the studio interface with specific layout and audit settings. ```bash # Small terminal, single pane, no animations tvault studio --single-pane --no-anim # Open the staging project with a deeper audit window tvault studio staging --audit-limit 200 ``` -------------------------------- ### Install TinyVault via npm Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/docs/changelog.md Command to install the TinyVault binary package globally using npm. ```bash npm install -g @thelacanians/tinyvault ``` -------------------------------- ### Quickstart usage Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/npm/cli/README.md Initialize the vault, store a secret, and run a command with injected environment variables. ```bash tvault init # create ~/.tvault tvault set DATABASE_URL "postgres://..." # store a secret tvault run -- npm start # inject as env vars ``` -------------------------------- ### Install TinyVault on Linux Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/docs/guide/digitalocean.md Commands to install the TinyVault binary on Debian/Ubuntu, via Homebrew, or using the Go toolchain. ```bash # Debian/Ubuntu — the .deb from the latest release ARCH=$(dpkg --print-architecture) # amd64 or arm64 curl -fsSLO "https://github.com/abdul-hamid-achik/tinyvault/releases/latest/download/tvault_$(curl -fsSL https://api.github.com/repos/abdul-hamid-achik/tinyvault/releases/latest | grep -oE '"tag_name": *"v[^"]+"' | grep -oE '[0-9.]+')_linux_${ARCH}.deb" sudo dpkg -i tvault_*_linux_${ARCH}.deb # Fedora/RHEL: the .rpm · Alpine: the .apk (same release page) # Homebrew (also works on Linux via Linuxbrew) brew install --cask abdul-hamid-achik/tap/tvault # Have a Go toolchain on the box? go install github.com/abdul-hamid-achik/tinyvault/cmd/tvault@latest ``` -------------------------------- ### Start the Tinyvault Agent Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/docs/guide/agent.md Commands to start the agent in the foreground or background. ```bash # Foreground (Ctrl-C to stop) tvault agent start # Or background it yourself tvault agent start & nohup tvault agent start >/dev/null 2>&1 & ``` -------------------------------- ### Configure droplet with cloud-init Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/docs/guide/digitalocean.md Use cloud-init to install the Tinyvault package and provision the identity key on the droplet. ```yaml #cloud-config packages: [curl] runcmd: # install the .deb for this droplet's arch from the latest release - ARCH=$(dpkg --print-architecture) - VER=$(curl -fsSL https://api.github.com/repos/abdul-hamid-achik/tinyvault/releases/latest | grep -oE '"tag_name": *"v[^"]+"' | grep -oE '[0-9.]+') - curl -fsSLO "https://github.com/abdul-hamid-achik/tinyvault/releases/latest/download/tvault_${VER}_linux_${ARCH}.deb" - dpkg -i "tvault_${VER}_linux_${ARCH}.deb" write_files: - path: /etc/tvault/identity permissions: '0600' content: "TVAULT_IDENTITY_KEY=tvault-key1" ``` -------------------------------- ### Quick Start Usage Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/README.md Common commands for initializing vaults, managing secrets, injecting environment variables, and syncing with .env files. ```bash # Initialize a new vault (creates ~/.tvault/vault.db) tvault init # Store some secrets tvault set DATABASE_URL "postgres://user:pass@localhost/mydb" tvault set API_KEY "sk-abc123" # Retrieve a secret tvault get DATABASE_URL # List all secrets tvault list # Run a command with secrets injected as environment variables tvault run -- npm start # Run with a .env file that has tvault:// placeholders (commit-safe templates) tvault run --env-file .env -- npm start # Export secrets tvault env # shell format (eval-able) tvault env --format dotenv # .env file format tvault env --only DATABASE_URL,MIGRATIONS_DATABASE_URL --format dotenv tvault env --prefix CHALUPA_ --format dotenv tvault env --format json # JSON format tvault env --format yaml # YAML tvault env --format k8s-secret --name=my-secret # K8s Secret manifest # Import dotenv files safely (no shell expansion, name allowlist) tvault import .env tvault import --env production tvault import --interactive --env production # See how a .env has drifted from the vault (metadata-only; --values compares values) tvault diff .env tvault diff .env --values # Two-way sync between .env files and the vault tvault sync --direction pull --path .env # vault -> .env tvault sync --direction push --path .env # .env -> vault tvault sync --direction mirror --path .env # both, with conflict reporting # Search secret metadata across all projects (metadata only, never decrypts) tvault search --prefix STRIPE_ tvault search --project prod --name-like 'DB_*' tvault search --since 2026-01-01T00:00:00Z tvault list --prefix STRIPE_ # project-scoped shortcut # Encrypted .env files (Rails credentials pattern; safe to commit) tvault encrypt-env --in .env --out .env.encrypted # tied to the passphrase tvault decrypt-env --in .env.encrypted --out .env tvault encrypt-env --in .env --recipient tvault1… --out .env.encrypted # commit-safe, no passphrase tvault decrypt-env --in .env.encrypted --identity ci --out .env # Read a value from a .env file without unlocking the vault tvault get API_KEY --from .env # Machine-readable feature manifest for AI agents tvault docs features ``` -------------------------------- ### Resolution-aware get, run, and env commands Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/SPEC-ENV-PROFILES.md Demonstrates how to resolve, inject, and export environment variables with inheritance support. ```bash # get resolves through inheritance tvault get STRIPE_SECRET_KEY -p liftclub-preview # → resolves from liftclub-preview if present, else from liftclub (production) # run injects resolved values tvault run -p liftclub-preview -- npm start # → STRIPE_SECRET_KEY resolved from production (inherited) # → DATABASE_URL resolved from preview (local value) # env exports resolved values tvault env -p liftclub-preview --format shell # → all keys, with inherited values resolved # Show which project a value came from tvault get STRIPE_SECRET_KEY -p liftclub-preview --show-source # STRIPE_SECRET_KEY=inherited:production ``` -------------------------------- ### View sealed-profile bundle structure Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/SPEC-ENV-PROFILES.md Example content of a sealed-profile blob showing environment-specific sections. ```text [production] DATABASE_URL=postgresql://...prod-host... [preview] DATABASE_URL=postgresql://...preview-host... ``` -------------------------------- ### Launch Studio TUI Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/docs/guide/concepts.md Start the interactive terminal UI to browse the vault. ```bash tvault studio # aliases: tvault browse, tvault ui ``` -------------------------------- ### Run MCP server Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/npm/cli/README.md Start the MCP server with a passphrase provided via environment variable. ```bash TVAULT_PASSPHRASE=your-passphrase tvault mcp ``` -------------------------------- ### Start Agent with Token Authentication Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/docs/guide/agent.md Configures the agent to require a bearer token from a specified file, with support for project-scoped tokens. ```bash # token-file: one token[:project] line per token, 0600 # tokenAAAA -> any project the agent serves # tokenBBBB:backend -> scoped to the "backend" project tvault agent start --require-token --token-file ~/.tvault/agent-tokens & ``` -------------------------------- ### Manage TinyVault Agent Service Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/docs/changelog.md Commands to preview, install, and restart the TinyVault background service. ```bash tvault agent install --dry-run tvault agent install --passphrase-file ~/.config/secrets/env tvault agent restart # after upgrading tvault ``` -------------------------------- ### Launch Interactive Studio Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/docs/cli/index.md Starts the terminal-based UI for browsing secrets. Requires a TTY and defaults to read-only mode. ```bash tvault studio tvault studio api tvault studio --rw tvault studio --single-pane --no-anim --audit-limit 50 ``` -------------------------------- ### Demonstrate vault lock behavior Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/docs/changelog.md Examples showing how nested read and write operations behave regarding agent authentication and vault locking. ```bash tvault run --only API_KEY -- tvault get API_KEY # works, served by the agent tvault run --only API_KEY -- tvault set PROBE x # "vault is locked" (exit 3) ``` -------------------------------- ### Execute CLI commands with global flags Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/docs/cli/index.md Examples of invoking the tvault binary with version checks, JSON output, and project-specific overrides. ```bash tvault --version tvault get DATABASE_URL -p api --json tvault env -p web --no-agent ``` -------------------------------- ### Start the local vault agent Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/docs/guide/digitalocean.md Commands to start the agent for cached secret access and optional shell integration. ```bash tvault agent start & # unix socket, 0600, peer-uid checked tvault hook >> ~/.bashrc # optional: auto-route get/env/run through it ``` -------------------------------- ### Configure MCP host using npx Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/docs/mcp/index.md Alternative configuration for hosts that do not require a global installation of the TinyVault package. ```json { "mcpServers": { "tinyvault": { "command": "npx", "args": ["-y", "@thelacanians/tinyvault", "mcp"] } } } ``` -------------------------------- ### Update tinyvault Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/npm/cli/README.md Update the global installation to the latest version. ```bash npm install -g @thelacanians/tinyvault@latest ``` -------------------------------- ### Configure systemd for vault-backed applications Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/docs/guide/digitalocean.md Example systemd service configuration to inject secrets into an application process. ```ini # /etc/systemd/system/myapp.service [Service] EnvironmentFile=/etc/tvault/env # TVAULT_PASSPHRASE (0600, root-only) ExecStart=/usr/local/bin/tvault run --only DATABASE_URL,API_KEY -- /usr/local/bin/myapp ``` -------------------------------- ### Example .tvault-recipients File Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/docs/guide/committable-secrets.md A sample configuration file containing public recipient keys, which is safe to commit to version control. ```text # .tvault-recipients — public keys only, safe to commit tvault1exampleRecipientAlice tvault1exampleRecipientBob tvault1exampleRecipientCluster ``` -------------------------------- ### Route Commands Through the Agent Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/docs/guide/agent.md Examples of CLI commands that automatically route through a running agent. ```bash tvault get DATABASE_URL # no prompt, no Argon2id tvault env --format shell # same tvault run -- npm start # same ``` -------------------------------- ### Manage Tinyvault Local Agent Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/README.md Commands to start, configure, and stop the local agent for persistent secret access. ```bash tvault agent start & # unlock once; runs in the foreground (background it) eval "$(tvault hook zsh)" # add to ~/.zshrc; defines tvault_load tvault get DATABASE_URL # no prompt — served by the agent tvault_load # load the current project's secrets into the shell tvault agent status tvault agent stop # zeroes the KEK ``` -------------------------------- ### Export secrets in various formats Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/docs/guide/run-and-env.md Examples of exporting secrets to files or piping them to other tools using different format flags. ```bash tvault env --format dotenv > .env tvault env --only DATABASE_URL,MIGRATIONS_DATABASE_URL --format dotenv tvault env --prefix CHALUPA_ --format dotenv tvault env --format json | jq . tvault env --format yaml > secrets.yaml tvault env --format k8s-secret --name app-secrets --namespace prod > secret.yaml tvault env --format pulumi-config --stack prod | sh # push into Pulumi config ``` -------------------------------- ### Set up development environment Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/CONTRIBUTING.md Download project dependencies using Go modules. ```bash go mod download ``` -------------------------------- ### Install git filters and recipients Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/docs/guide/git-filter.md Configures the repository git settings and registers recipients for encryption. The recipient flag can be repeated to include multiple users or CI systems. ```bash tvault git-filter install --recipient tvault1exampleRecipient ``` ```bash # Add yourself and CI in one shot tvault git-filter install \ --recipient tvault1exampleRecipient \ --recipient tvault1exampleCiRecipient ``` -------------------------------- ### Search for secrets using various filters Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/docs/guide/secrets.md Examples of filtering metadata by project, prefix, wildcard patterns, timestamps, and version history. ```bash # Every key matching a prefix, across all projects tvault search --prefix STRIPE_ # Keys in one project matching a wildcard pattern tvault search --project production --name-like 'DB_*' # Secrets updated on or after a timestamp tvault search --since 2026-01-01T00:00:00Z # Secrets that have been rotated at least twice tvault search --project default --min-version 2 # Machine-readable output for tooling tvault search --prefix API_ --json ``` -------------------------------- ### Create a project Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/docs/guide/projects.md Use the create command to initialize a new project, optionally including a description for better organization. ```bash tvault projects create staging tvault projects create prod -d "Production API and database credentials" ``` -------------------------------- ### Commit-safe .env template example Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/docs/guide/run-and-env.md A template file containing literal non-secret values and vault references, safe for version control. ```dotenv # .env — committed template. No secret values live here. # Non-secret config can use literal values: PORT=3000 LOG_LEVEL=info # Secrets are resolved from the active project at run time: DATABASE_URL=${tvault://DATABASE_URL} STRIPE_KEY=${tvault://current/STRIPE_KEY} # Composed value — references can sit inside a larger string: REDIS_URL=redis://:${tvault://REDIS_PASSWORD}@localhost:6379/0 # Pull one value from a specific project: ANALYTICS_KEY=${tvault://production/ANALYTICS_KEY} ``` -------------------------------- ### Install and track files with Git filters Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/docs/guide/committable-secrets.md Configures Git filters to automatically encrypt and decrypt specified files based on the provided recipient identity. ```bash tvault git-filter install --recipient tvault1exampleRecipient tvault git-filter track .env 'secrets/*.env' git add .gitattributes .tvault-recipients git commit -m "enable transparent encryption" ``` -------------------------------- ### Create projects and link them to a group Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/docs/guide/env-groups.md Demonstrates the workflow of creating individual projects before grouping them together. ```bash tvault projects create liftclub tvault projects create liftclub-preview tvault env group create liftclub --env production=liftclub --env preview=liftclub-preview ``` -------------------------------- ### Initializing CI Workflow Helpers Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/README.md Generate configuration files for specific CI/CD providers. ```bash tvault ci init --provider=github-actions tvault ci init --provider=gitlab ``` -------------------------------- ### tvault get Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/docs/cli/index.md Retrieves and decrypts a secret value from the vault. ```APIDOC ## tvault get ### Description Print a single secret value. Reading from the vault decrypts on demand. ### Flags - `--from ` - Read the value from a dotenv file instead of the vault. - `--version ` - Print a specific historical version. ``` -------------------------------- ### Initialize CI/CD Workflows Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/docs/guide/ci-cd.md Generates starter workflow files for CI providers. Use the --provider flag to specify the target platform and --mode to toggle between passphrase and identity-based authentication. ```bash # Passphrase mode (default), GitHub Actions tvault ci init --provider=github-actions # Identity mode, GitHub Actions, baking in the "ci" identity tvault ci init --provider=github-actions --mode=identity --identity=ci # GitLab snippet, identity mode, printed to stdout tvault ci init --provider=gitlab --mode=identity --output=- ``` -------------------------------- ### Get Machine-Readable Status Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/docs/guide/git-filter.md Retrieves the status information in JSON format for use in scripts. ```bash tvault git-filter status --json ``` -------------------------------- ### Discover TinyVault features and documentation Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/docs/guide/codemap.md Use these CLI commands to retrieve machine-readable manifests and documentation topics for AI agents. ```bash tvault docs features # JSON manifest of every feature, incl. codemap-integration tvault docs codemap # the codemap topic (this page, machine-readable) tvault docs mcp # the MCP server topic ``` -------------------------------- ### Discover TinyVault features and help via CLI Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/docs/guide/for-ai-agents.md Use these commands to inspect machine-readable documentation and tool schemas for CLI-driven agents. ```bash tvault docs features tvault docs topics tvault help agent --json ``` -------------------------------- ### Accessing CLI Help Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/docs/cli/index.md Retrieve manual pages for specific topics or output them in JSON format. ```bash tvault help tvault help workflow tvault help safety --json ``` -------------------------------- ### Onboard a teammate Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/docs/guide/git-filter.md Register filters and decrypt the repository tree after cloning. ```bash git clone https://github.com/your-org/your-repo tvault git-filter install # registers filters + smudges tracked files ``` -------------------------------- ### Launch Studio Modes Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/docs/guide/studio.md Commands to launch the studio in read-only mode, read-write mode, or directly into a specific project. ```bash tvault studio # read-only browser tvault studio --rw # enable audited in-app new / edit / delete tvault studio webapp # open straight into a project ``` -------------------------------- ### Initialize Project Security Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/docs/reference/configuration.md Configures a project for TinyVault by defining recipients, setting up git filters, and ensuring plaintext files are ignored. ```bash # Typical project setup tvault projects share myapp --to tvault1exampleRecipient # writes .tvault-recipients tvault git-filter track # writes .gitattributes git add .tvault-recipients .gitattributes .env.encrypted echo ".env" >> .gitignore ``` -------------------------------- ### Get Secrets Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/docs/cli/index.md Retrieves and decrypts a secret value. Can also read from a dotenv file without unlocking the vault. ```bash tvault get DATABASE_URL tvault get API_KEY --version 3 tvault get API_KEY --from .env ``` -------------------------------- ### Initialize CI provider Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/docs/guide/digitalocean.md Scaffold a passphrase-free flow for CI/CD pipelines. ```bash tvault ci init --provider github-actions --mode identity --identity web-prod ``` -------------------------------- ### Initialize CI/CD Workflow Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/docs/cli/index.md Scaffold a CI workflow for GitHub Actions or GitLab using passphrase or identity-based authentication. ```bash tvault ci init --provider github-actions tvault ci init --provider gitlab --mode identity --identity ci tvault ci init --provider github-actions --output - ``` -------------------------------- ### Run full check suite Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/CONTRIBUTING.md Execute build, test, lint, and security scan commands to ensure code quality before submission. ```bash go build ./... # builds successfully go test -race ./... # all tests pass (race detector) golangci-lint run ./... # 0 lint issues govulncheck ./... # no new vulnerabilities in our code path ``` -------------------------------- ### Configure non-interactive vault access Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/docs/guide/digitalocean.md Setup for scripts and systemd services to access secrets without manual passphrase entry. ```bash sudo install -d -m 700 /etc/tvault printf 'TVAULT_PASSPHRASE=%s\n' 'your-passphrase' | sudo tee /etc/tvault/env >/dev/null sudo chmod 600 /etc/tvault/env set -a; . /etc/tvault/env; set +a tvault run -- myapp # injects all project secrets as env vars ``` -------------------------------- ### Create an environment group Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/docs/guide/env-groups.md Initializes a new environment group linking specific projects to environment names. ```bash tvault env group create liftclub --description "LIFT Club" \ --env production=liftclub --env preview=liftclub-preview ``` -------------------------------- ### Manage project namespaces Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/docs/guide/concepts.md Create, switch, and list project namespaces for secret organization. ```bash tvault projects create api tvault projects use api # set the current (active) project tvault projects list ``` -------------------------------- ### Initialize CI workflow Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/docs/guide/git-filter.md Scaffold a CI workflow for identity-based decryption without a passphrase. ```bash tvault ci init --provider github-actions --mode identity ``` -------------------------------- ### Configure Studio Defaults Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/docs/guide/studio.md Setting persistent studio preferences in the configuration file. ```yaml # ~/.tvault/config.yaml browse: no_anim: true # default --no-anim single_pane: false # default --single-pane audit_limit: 200 # default --audit-limit ``` -------------------------------- ### Run development and CI commands Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/CLAUDE.md Standard commands for building, testing, linting, and scanning the project. These commands must pass locally to ensure CI compatibility. ```bash go build ./... # Build go test -race -count=1 ./... # Test (race detector) golangci-lint run ./... # Lint — MUST be 0 issues govulncheck ./... # Security Scan ``` -------------------------------- ### Read secrets with tvault get Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/docs/guide/secrets.md Retrieve decrypted secret values from the vault or local dotenv files using various flags for formatting and version control. ```bash tvault get DATABASE_URL # Capture into a shell variable DB_URL=$(tvault get DATABASE_URL) # JSON output (key + value) tvault get API_KEY --json # Read a specific historical version tvault get API_KEY --version 2 # Read a value straight from a dotenv file (no vault, no unlock) tvault get DATABASE_URL --from .env ``` -------------------------------- ### Initialize the vault Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/docs/guide/concepts.md Creates the local vault database file and prompts for a passphrase. ```bash tvault init # create the vault and set your passphrase ``` -------------------------------- ### Configure studio settings in config.yaml Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/docs/reference/configuration.md Define interactive studio preferences such as animations, layout, and audit log limits. ```yaml # ~/.tvault/config.yaml # Defaults for the interactive studio (tvault studio / browse / ui). # The key is "browse:" for backwards compatibility with the old command name. browse: no_anim: false # disable studio animations single_pane: false # use a single-pane layout instead of split panes audit_limit: 100 # how many audit-log entries the studio loads ``` -------------------------------- ### List projects Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/docs/guide/projects.md Display all available projects and identify the currently active one. ```bash tvault projects list ``` -------------------------------- ### Import .env files into TinyVault Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/docs/guide/dotenv.md Use the import command to read .env files and write their keys into the active project. Various flags allow for discovery, interactive selection, and dry-run previews. ```bash # Import an explicit file tvault import .env # Auto-discover the default chain in the current directory tvault import # Discover files for a named environment tvault import --env production # Combine several files (later files win on duplicate keys) tvault import --file .env --file .env.local --overwrite # Preview without writing tvault import --dry-run # Decide each key interactively tvault import --interactive ``` -------------------------------- ### Configure Shell Hooks Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/docs/guide/agent.md Commands to initialize shell integration for Zsh, Bash, and Fish. ```bash # ~/.zshrc eval "$(tvault hook zsh)" # ~/.bashrc eval "$(tvault hook bash)" ``` ```fish # config.fish tvault hook fish | source ``` -------------------------------- ### Configure linking and inheritance Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/SPEC-ENV-PROFILES.md Commands to link projects to groups and manage key inheritance between environments. ```bash # Link a project into a group as a named environment tvault env link --project liftclub-preview --group liftclub --name preview # Set up inheritance: preview inherits from production tvault env inherit --group liftclub --env preview --from production # Pin a specific key (write the resolved value into the child project, # breaking inheritance for that key only) tvault env pin DATABASE_URL --group liftclub --env preview # Unpin (restore inheritance — deletes the pinned value from the child, # falling back to the base) tvault env unpin DATABASE_URL --group liftclub --env preview # Show inheritance status for all keys tvault env inherited --group liftclub --env preview # KEY INHERITED-FROM PINNED # STRIPE_SECRET_KEY production no # DATABASE_URL — yes (local value) # BETTER_AUTH_URL — no (local value) # RESEND_KEY production no ``` -------------------------------- ### Studio Alias Commands Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/docs/guide/studio.md Alternative commands that function as aliases for the studio UI. ```bash tvault browse tvault ui ``` -------------------------------- ### Enable read-write mode in studio Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/docs/guide/studio.md Pass the --rw flag to the studio command to enable secret creation, editing, and deletion capabilities. ```bash tvault studio --rw ``` -------------------------------- ### Configure server identity and decrypt Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/docs/guide/digitalocean.md Store the private key securely on the server and decrypt the encrypted environment file. ```bash sudo install -d -m 700 /etc/tvault printf 'TVAULT_IDENTITY_KEY=%s\n' 'tvault-key1' | sudo tee /etc/tvault/identity >/dev/null sudo chmod 600 /etc/tvault/identity # materialize the .env (env var picked up automatically by tvault open): set -a; . /etc/tvault/identity; set +a tvault open --in /etc/app/.env.encrypted --out /run/app.env ``` -------------------------------- ### Create an environment group Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/docs/guide/env-groups.md Defines a new group with associated environments and an optional description. ```bash tvault env group create --env [--env ...] [-d ] [--force] ``` ```bash tvault env group create liftclub --description "LIFT Club" \ --env production=liftclub --env preview=liftclub-preview --env staging=liftclub-staging ``` -------------------------------- ### Accessing Machine-Readable Docs Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/docs/cli/index.md Retrieve documentation for agents, optionally filtered by specific topics. ```bash tvault docs tvault docs run tvault docs -t mcp ``` -------------------------------- ### List projects in JSON format Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/docs/guide/projects.md Output the project list in JSON format, which is useful for scripting and automation. ```bash tvault projects list --json ``` -------------------------------- ### tvault init Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/docs/cli/index.md Initializes the vault and creates a default project. Prompts for a passphrase unless TVAULT_PASSPHRASE is set. ```APIDOC ## tvault init ### Description Creates the vault and a default project. Run this once before any other commands. ### Usage `tvault init` ``` -------------------------------- ### Launch Interactive Studio Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/README.md Commands to launch the terminal UI with various configuration flags for navigation and accessibility. ```bash tvault studio # browse the current project tvault studio --rw # enable in-app new/edit/delete (audited) tvault studio webapp # open a specific project tvault studio --single-pane # one pane at a time (small terminals) tvault studio --no-anim # disable animations (SSH / screen readers) ``` -------------------------------- ### Local Build Output Path Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/AGENTS.md Build command convention to ensure binaries are placed in the gitignored bin/ directory. ```bash go build -o bin/tvault ./cmd/tvault # correct go build -o tvault ./cmd/tvault # wrong (root is gitignored with /tvault) ``` -------------------------------- ### Launch MCP server via CLI Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/docs/mcp/index.md Execute the MCP server directly from the command line. ```bash tvault mcp ``` -------------------------------- ### Create a feature branch Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/CONTRIBUTING.md Initialize a new branch for feature development. ```bash git checkout -b feature/your-feature-name ``` -------------------------------- ### Run glyphrun specs Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/specs/glyphrun/README.md Commands to build the tvault binary and execute the glyphrun test suite. ```bash go build -o ./bin/tvault ./cmd/tvault # specs also build this themselves glyph run specs/glyphrun/studio_reveal.yml --format md # …or the whole suite: for f in specs/glyphrun/*.yml; do glyph run "$f" --format md; done ``` -------------------------------- ### tvault backup Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/docs/cli/index.md Create a byte-for-byte database backup. ```APIDOC ## tvault backup ### Description Write a byte-for-byte database backup to the specified path. Secret payloads and key material remain encrypted. ``` -------------------------------- ### Manage Projects Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/README.md Commands for creating, switching, and listing isolated secret projects. ```bash # Create and switch to a project tvault projects create staging tvault use staging # Secrets are now scoped to "staging" tvault set DATABASE_URL "postgres://staging-server/mydb" # Switch back tvault use default # List all projects tvault projects list ``` -------------------------------- ### Provision infrastructure with Pulumi Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/docs/guide/digitalocean.md Execute Pulumi deployment while injecting the DigitalOcean token from the vault. ```bash tvault run --only DIGITALOCEAN_TOKEN -- pulumi up ``` -------------------------------- ### Use version history aliases Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/docs/guide/versioning.md Alternative commands to access version history, including an option for JSON output. ```bash tvault versions DATABASE_URL tvault hist DATABASE_URL --json ``` -------------------------------- ### Initialize and manage a vault over SSH Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/docs/guide/digitalocean.md Commands to initialize a vault and set secrets interactively on a remote server. ```bash ssh you@droplet tvault init # creates ~/.tvault (0700), prompts for a passphrase tvault set DATABASE_URL "postgres://…" tvault set API_KEY "$(openssl rand -hex 24)" tvault list ``` -------------------------------- ### Project Source Code Organization Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/README.md The internal directory structure of the TinyVault Go project. ```text tvault (single binary) cmd/tvault/ # CLI commands (cobra) internal/ crypto/ # AES-256-GCM, Argon2id, key generation store/ # bbolt storage layer vault/ # High-level vault operations mcp/ # MCP server (49 tools, access policy, redaction) validation/ # Input validation ``` -------------------------------- ### Run studio UI smoke test Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/CONTRIBUTING.md Execute the real-PTY smoke test for the studio UI using glyphrun. ```bash glyph run specs/glyphrun/studio_reveal.yml --format md ``` -------------------------------- ### tvault ci init Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/docs/cli/index.md Scaffold a CI workflow that consumes the vault. ```APIDOC ## tvault ci init ### Description Scaffold a CI workflow that consumes the vault. The command supports different providers and authentication modes. ### Parameters - **--provider** (string) - Required - The CI provider to use (github-actions or gitlab). - **--mode** (string) - Optional - The authentication mode (passphrase or identity). Defaults to passphrase. - **--identity** (string) - Optional - The identity to reference. Defaults to default. - **--output** (string) - Optional - The output path for the scaffolded file. Use '-' for stdout. ``` -------------------------------- ### Configure MCP host for TinyVault Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/docs/mcp/index.md Standard configuration format for MCP hosts to integrate the TinyVault server. ```json { "mcpServers": { "tinyvault": { "command": "tvault", "args": ["mcp"] } } } ``` -------------------------------- ### Manage environment groups Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/SPEC-ENV-PROFILES.md Commands for creating, modifying, and listing environment groups to organize project environments. ```bash # Create an environment group tvault env group create liftclub \ --description "LIFT Club environments" \ --production liftclub \ --preview liftclub-preview # Add an environment to an existing group tvault env group add staging --project liftclub-staging --group liftclub # List groups tvault env group list # NAME ENVIRONMENTS DESCRIPTION # liftclub production, preview LIFT Club environments # Show group details (which projects, key drift, inheritance status) tvault env group show liftclub # Remove an environment from a group (does not delete the project) tvault env group remove preview --group liftclub # Delete a group entirely (projects are untouched) tvault env group delete liftclub ``` -------------------------------- ### Syncing .env files Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/docs/guide/dotenv.md Reconcile .env files with the vault using pull, push, or mirror directions. ```bash # Vault -> file (vault is source of truth) tvault sync --direction pull --path .env # File -> vault (file is source of truth), allowing overwrites tvault sync --direction push --path .env --overwrite # Reconcile both ways tvault sync --direction mirror --path .env ``` -------------------------------- ### Configure Project Access Patterns Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/docs/mcp/access-policy.md Use glob patterns to define project visibility, where deny rules take precedence over allow rules. ```yaml projects_allow: - app-* # any project starting with app- projects_deny: - app-prod # ...except this one ``` -------------------------------- ### Enable Full Access and Command Execution Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/docs/mcp/index.md Configures a policy for full access, enabling both write operations and command execution. ```yaml access_mode: full allow_exec: true ``` -------------------------------- ### hook Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/docs/cli/index.md Generates shell snippets for integrating Tinyvault with shell environments. ```APIDOC ## hook ### Description Prints a shell snippet that defines `tvault_load` for loading project secrets via the agent. ### Arguments - **shell** (string) - Required - The shell type (bash, zsh, fish, or direnv). ``` -------------------------------- ### Project directory structure Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/AGENTS.md Layout of the source code, detailing the CLI command implementations in cmd/tvault and core cryptographic logic in internal/crypto. ```text cmd/tvault/ main.go # Entry point cmd/ root.go # Root command, global flags (--vault, --project, --json) vault_helper.go # Shared: getVaultDir(), openAndUnlockVault(), resolveProject() init.go # tvault init unlock.go / lock.go # tvault unlock / tvault lock status.go # tvault status get.go / set.go # tvault get KEY (--version N) / tvault set KEY VALUE (with --from-env / --from-file) history.go / rollback.go # tvault history KEY / tvault rollback KEY --to N (secret version history) list.go / delete.go # tvault list / tvault delete KEY (list supports --prefix; delete purges history) run.go # tvault run -- CMD; --env-file + ${tvault://...} interpolation env.go # tvault env (export in shell/dotenv/json/yaml/k8s format) export.go # tvault export (write secrets to file) import.go # tvault import (read secrets from file) import_interactive.go # interactive (text-prompt) file picker for --interactive imports sync.go # tvault sync --direction pull|push|mirror encrypted_env.go # tvault encrypt-env / decrypt-env (.env.encrypted v1 KEK + v2 recipient) search.go # tvault search (relational query, metadata only) diff.go # tvault diff (key/value drift vs a .env; metadata-only by default) identity.go # tvault identity new/list/export + resolveIdentity (X25519, TVAULT_IDENTITY_KEY — Spine A) project_share.go # tvault projects share/unshare/recipients (Spine A) gitfilter.go # tvault git-filter install/track/status/checkout + clean/smudge (Spine A) k8s.go # tvault seal --format k8s + tvault k8s render (commit-safe SealedSecret — Spine A) env_group.go # tvault env group/diff/promote/inherit/pin/unpin/inherited/seal (environment profiles) json_helper.go # writeJSON(): shared --json encoder docs.go # tvault docs (machine-readable feature manifest) npm/ # npm distribution (@thelacanians/tinyvault) cli/ # main package: cli.js shim + package.json (spawns the platform binary) platforms/ # @thelacanians/tinyvault-{os}-{arch} packages (binary payloads) scripts/pack.mjs # downloads release assets, verifies checksums, versions packages projects.go / use.go # tvault projects list/create / tvault use PROJECT backup.go # tvault backup / tvault restore (restore is a separate command) rotate.go # tvault key rotate mcp_server.go # tvault mcp (alias: mcp-server) (stdio MCP transport) ci.go # tvault ci init --mode=passphrase|identity (generate CI workflow files) studio.go # tvault studio (aliases: browse, ui) (cobra wiring + TTY checks; calls studio pkg) doctor.go # tvault doctor (read-only setup diagnostics; --json) selfupdate.go # tvault self-update (alias: upgrade) — checksum-verified in-place binary update audit_helper.go # recordAudit(): CLI/TUI audit logging (MCP-vocab actions) config_helper.go # typed ~/.tvault/config.yaml (browse: defaults) completion.go # Shell completion output.go # Color output helpers (Success, Error, Warning, Info) studio/ # The interactive studio UI (the ONLY package importing charm.land/*) run.go # Run(): builds the model, runs the Bubble Tea v2 program model.go # tea.Model: state, Init/Update, key handling view.go # View(): responsive 4-pane layout, panes, overlays styles.go # themeStyles: catppuccin light/dark, picked at runtime keymap.go # key.Binding set; implements help.KeyMap data.go # read-only loaders wrapping internal/vault + tea.Cmd msgs anim.go # pure-Go easing + animation gating (no harmonica) help.go # in-app help markdown, glamour-rendered *_test.go # model/data/styles/keymap/layout tests + glyphrun dump helper internal/ crypto/ crypto.go # AES-256-GCM encrypt/decrypt, Argon2id key derivation recipient.go # X25519 recipient layer: WrapDEK/UnwrapDEK, Identity (Spine A) crypto_test.go # Comprehensive crypto tests ``` -------------------------------- ### tvault projects use Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/docs/cli/index.md Sets the active project for the CLI session. ```APIDOC ## tvault projects use ### Description Set the active project. ### Usage `tvault projects use ` ``` -------------------------------- ### Manage identities and project sharing Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/docs/guide/concepts.md Commands to create a new identity and share a project with a recipient. ```bash tvault identity new ci # create an identity named "ci" tvault projects share api tvault1exampleRecipient # rewrap the DEK to that recipient ``` -------------------------------- ### Running commands with environment files Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/docs/guide/run-and-env.md Execute a command while resolving placeholders from the vault. ```bash tvault run --env-file .env -- npm start ``` -------------------------------- ### Switching the active project Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/docs/guide/projects.md Use the 'projects use' command or the 'use' shorthand to set the persistent active project for the vault. ```bash tvault projects use prod # identical: tvault use prod ``` -------------------------------- ### Visualize the TinyVault key hierarchy Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/docs/guide/concepts.md A diagram showing the flow from passphrase to secret values via KEK and DEK. ```text passphrase ──Argon2id──▶ KEK ──unwraps──▶ per-project DEK ──decrypts──▶ secret values (in RAM) (AES-256-GCM) (AES-256-GCM) ``` -------------------------------- ### Execute development and maintenance commands Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/AGENTS.md Use these commands for building, testing, linting, and security scanning the project. The final command provides a comprehensive check suitable for pre-commit verification. ```bash # Build go build -o bin/tvault ./cmd/tvault # Test (all packages, race detector) go test -race ./... # Lint golangci-lint run ./... # Security scan govulncheck ./... # Full check before committing go build ./... && go test -race ./... && golangci-lint run ./... ``` -------------------------------- ### Set secrets using various input methods Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/docs/guide/secrets.md Demonstrates different ways to write secrets to TinyVault, including inline, stdin, file, and dotenv sources to avoid shell history exposure. ```bash # Inline value (visible in shell history — fine for throwaway values) tvault set DATABASE_URL "postgres://user:pass@localhost/app" # From stdin (keeps the value out of history; great for pipes) echo "sk-xxxx" | tvault set API_KEY --stdin # From a file (multi-line values, JSON credentials, certs) tvault set GCP_CREDENTIALS --from-file credentials.json # From a dotenv file, matching the same key name tvault set DATABASE_URL --from-env .env # From a dotenv file when the source key name differs tvault set DB_URL --from-env .env --key DATABASE_URL ``` -------------------------------- ### Compare environment key sets Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/docs/cli/index.md Check for configuration drift across environments within a group. Use --values to compare actual secret data. ```bash tvault env diff liftclub tvault env diff liftclub --values tvault env diff liftclub --keys-only --json ``` -------------------------------- ### Manage environment groups Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/docs/cli/index.md Link multiple projects as named environments. These operations manage metadata and do not involve secret decryption. ```bash tvault env group create liftclub --env production=liftclub --env preview=liftclub-preview -d "LIFT Club" tvault env group list tvault env group show liftclub tvault env group add staging --group liftclub --project liftclub-staging tvault env group remove staging --group liftclub tvault env group delete liftclub -y ``` -------------------------------- ### Supply passphrase via file Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/docs/reference/environment-variables.md Points to a file containing the passphrase, which is more secure than exporting the passphrase directly. ```bash export TVAULT_PASSPHRASE_FILE="$HOME/.config/secrets/env" tvault env --project api ``` -------------------------------- ### vault_preview_env_import Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/docs/mcp/tools.md Dry-runs an import to preview changes before committing. ```APIDOC ## vault_preview_env_import ### Description Dry-runs an import so the agent can see what would happen before committing. No values are returned. ### Parameters - **project** (string) - Optional - **directory** (string) - Optional - **files** (array) - Optional - **environment** (string) - Optional - **overwrite** (boolean) - Optional ### Returns - **counts** (object) - Counts of keys that would be created, overwritten, or skipped. ``` -------------------------------- ### tvault projects create Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/docs/cli/index.md Creates a new project with an optional description. ```APIDOC ## tvault projects create ### Description Create a new project. ### Usage `tvault projects create [flags]` ### Flags - **-d, --description** (string) - Optional project description. ``` -------------------------------- ### Reconcile .env files Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/docs/mcp/recipes.md Compare local .env files against vault storage and synchronize changes in either direction. ```text vault_diff_env { "file": ".env", "compare_values": true } → { only_in_vault, only_in_file, in_both, value_diffs: { KEY: "same"|"differs" }, in_sync } ``` ```text vault_sync_env { "direction": "pull", "path": ".env" } # vault → file vault_sync_env { "direction": "push", "path": ".env", "overwrite": true } # file → vault ``` -------------------------------- ### Read a shared project Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/docs/guide/sharing.md Uses an identity to unwrap the project DEK and access environment variables. ```bash # print export lines for the shell tvault env --identity alice -p webapp # or feed a process directly eval "$(tvault env --identity alice -p webapp)" ``` -------------------------------- ### Check Exit Code Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/docs/cli/index.md Demonstrates how to verify the exit code of a command, which is useful for scripting and error handling. ```bash tvault get MISSING_KEY; echo "exit=$?" # exit=4 ``` -------------------------------- ### Integrate with systemd Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/docs/guide/digitalocean.md Use systemd to decrypt secrets into a tmpfs path before application startup. ```ini # /etc/systemd/system/myapp.service [Service] EnvironmentFile=/etc/tvault/identity RuntimeDirectory=myapp # /run/myapp, tmpfs, 0700 ExecStartPre=/usr/local/bin/tvault open --in /etc/app/.env.encrypted --out /run/myapp/.env ExecStart=/usr/local/bin/myapp # reads /run/myapp/.env ``` -------------------------------- ### Manage Environment Inheritance Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/docs/cli/index.md Commands to inherit, pin, unpin, or list inherited environment keys. Inheritance is metadata-only and resolved at read time. ```bash tvault env inherit --group liftclub --env preview --from production tvault env pin API_TOKEN --group liftclub --env preview tvault env unpin API_TOKEN --group liftclub --env preview tvault env inherited --group liftclub --env preview ``` -------------------------------- ### Verifying interpolation syntax Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/docs/guide/run-and-env.md Check the interpolation syntax directly from the binary. ```bash tvault docs interpolate ``` -------------------------------- ### Manage self-managed state backend credentials Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/docs/guide/pulumi.md Store state backend credentials as secrets in TinyVault and run Pulumi commands using them. ```bash tvault set AWS_ACCESS_KEY_ID "" tvault set AWS_SECRET_ACCESS_KEY "" tvault set AWS_REGION "us-east-1" tvault set PULUMI_CONFIG_PASSPHRASE "$(openssl rand -hex 24)" tvault run -- pulumi stack select prod tvault run -- pulumi up ``` -------------------------------- ### MCP Prompts Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/docs/mcp/tools.md Ready-made prompts for scaffolding projects and injecting secrets into commands. ```APIDOC ## MCP Prompts ### setup-project Scaffolds a new project. - **name** (string) - Required - The name of the project to scaffold. ### inject-secrets Guides running a command with injected secrets. - **project** (string) - Optional - The project context for the secrets. - **command** (string) - Required - The command to execute with injected secrets. ``` -------------------------------- ### Inherit environment keys Source: https://github.com/abdul-hamid-achik/tinyvault/blob/main/docs/guide/env-groups.md Configures a child environment to resolve missing keys from a specified base environment. ```bash tvault env inherit --group liftclub --env preview --from production ```