{"id":13902875,"url":"https://github.com/shahradelahi/vault-cli","last_synced_at":"2025-04-12T19:52:21.790Z","repository":{"id":209441268,"uuid":"723740570","full_name":"shahradelahi/vault-cli","owner":"shahradelahi","description":"A CLI for HashiCorp Vault Key/Vault V2 secret engines","archived":false,"fork":false,"pushed_at":"2025-04-08T10:27:18.000Z","size":190,"stargazers_count":197,"open_issues_count":11,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-10T11:59:48.182Z","etag":null,"topics":["cli","hashicorp","kv2","nodejs","vault"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/kvault","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shahradelahi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-26T16:15:52.000Z","updated_at":"2025-04-08T07:24:29.000Z","dependencies_parsed_at":"2023-12-14T02:45:59.998Z","dependency_job_id":"b20768ff-c6be-4ef5-8047-af789f32a120","html_url":"https://github.com/shahradelahi/vault-cli","commit_stats":null,"previous_names":["shahradelahi/vault-cli"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shahradelahi%2Fvault-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shahradelahi%2Fvault-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shahradelahi%2Fvault-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shahradelahi%2Fvault-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shahradelahi","download_url":"https://codeload.github.com/shahradelahi/vault-cli/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248217112,"owners_count":21066633,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","hashicorp","kv2","nodejs","vault"],"created_at":"2024-08-06T22:01:28.707Z","updated_at":"2025-04-12T19:52:21.761Z","avatar_url":"https://github.com/shahradelahi.png","language":"TypeScript","funding_links":[],"categories":["cli"],"sub_categories":[],"readme":"# Vault CLI (kvault)\n\n[![CI](https://github.com/shahradelahi/vault-cli/workflows/CI/badge.svg)](https://github.com/shahradelahi/vault-cli/actions)\n[![npm](https://img.shields.io/npm/v/kvault)](https://www.npmjs.com/package/kvault)\n[![install size](https://packagephobia.com/badge?p=kvault)](https://packagephobia.com/result?p=kvault)\n[![license](https://img.shields.io/npm/l/kvault)](https://www.npmjs.com/package/kvault)\n\n_kvault_ is a CLI for managing HashiCorp Vault Key/Value V2 secret engines from the command line.\n\n---\n\n- [Installation](#-installation)\n- [Usage](#-usage)\n  - [Make Profile](#make-profile)\n  - [Push](#push)\n  - [Pull](#pull)\n  - [Remove](#rm)\n  - [Pipe](#pipe)\n- [Contributing](#-contributing)\n- [License](#license)\n\n## 📦 Installation\n\n```bash\nnpx kvault --help # Or bunx kvault --help\n```\n\n###### Make it global\n\n```bash\nnpm install --global kvault\n```\n\n## 📖 Usage\n\n```text\nUsage: kvault [options] [command]\n\nManage your HashiCorp Vault Key/Value v2 secret engines from the command line.\n\nAuthor: Shahrad Elahi \u003cshahrad@litehex.com\u003e (https://github.com/shahradelahi)\nLicense: GPL-3.0\n\nOptions:\n  -v, --version                               display the version number\n  -h, --help                                  display help for command\n\nCommands:\n  make-profile [options] \u003cname\u003e               Create a new vault profile\n  mount [options] \u003cmount-path\u003e                Mount a new KV2 secret engine\n  pipe [options] \u003csecrets-path\u003e [command...]  Pull an environment from Vault and pipe it to a command\n  push [options] \u003cenv-file\u003e \u003csecrets-path\u003e    Push an environment to Vault\n  pull [options] \u003csecrets-path\u003e               Pull an environment from Vault\n  rm [options] \u003csecrets-path\u003e [versions...]   Remove a secret from Vault\n  seal [options]                              Seal Vault\n  unmount [options] \u003cmount-path\u003e              Unmount a secret engine\n  unseal [options] [keys...]                  Unseal Vault\n  help [command]                              display help for command\n```\n\n### make-profile\n\nThis command will create a profile in your home directory. It will be used to store your Vault's address and token.\n\n#### Options\n\n```txt\nUsage: kvault make-profile [options] \u003cname\u003e\n\nCreate a new vault profile\n\nOptions:\n  --endpoint-url \u003cendpoint-url\u003e  Vault endpoint URL\n  --token \u003cvault-token\u003e          Vault token\n  --force                        Overwrite existing profile (default: false)\n  -h, --help                     display help for command\n```\n\n###### Examples\n\n```bash\n# Create a new profile\nkvault make-profile my-profile --endpoint-url https://vault.example.com --token my-token\n```\n\n### push\n\nThis command will push a secret to your Vault.\n\n#### Options\n\n```txt\nUsage: kvault push [options] \u003cenv-file\u003e \u003csecrets-path\u003e\n\nPush an environment to Vault\n\nOptions:\n  -P, --profile \u003cname\u003e           Name of the profile to use.\n  --endpoint-url \u003cendpoint-url\u003e  Vault endpoint URL\n  --token \u003cvault-token\u003e          Vault token\n  --cwd \u003ccwd\u003e                    Current working directory (default: \".\")\n  --force                        Write to Vault even if the secrets are in conflict (default: false)\n  -h, --help                     display help for command\n```\n\n###### Examples\n\n```bash\n# Push a .env.local file to Vault\nkvault push --profile my-profile .env.local secret/my-app\n\n# Use credentials instead of a profile\nkvault push --endpoint-url https://vault.example.com --token my-token .env.local secret/my-app\n```\n\n### pull\n\nThis command will pull a secret from your Vault.\n\n#### Options\n\n```txt\nUsage: kvault pull [options] \u003csecrets-path\u003e\n\nPull an environment from Vault\n\nOptions:\n  -P, --profile \u003cname\u003e             Name of the profile to use.\n  --endpoint-url \u003cendpoint-url\u003e    Vault endpoint URL\n  --token \u003cvault-token\u003e            Vault token\n  -O, --output-file \u003coutput-path\u003e  Path to write the environment file to\n  -F, --format \u003cformat\u003e            Format of the environment file (default: \"dotenv\")\n  --cwd \u003ccwd\u003e                      Current working directory (default: \".\")\n  --force                          Write environment file even if it exists (default: false)\n  -h, --help                       display help for command\n```\n\n###### Examples\n\n```bash\n# Pull a secret from Vault\nkvault pull --profile my-profile secret/my-app\n\n# Pull a secret from Vault and save it to a .env file\nkvault pull --profile my-profile secret/my-app --env-path .env\n\n# Pull a secret from Vault and add them to shell environment\nkvault pull --profile my-profile secret/my-app --format shell | grep -e '^export' | source /dev/stdin\n```\n\n### pipe\n\nThis command will pull and pipe secrets from your Vault to another command.\n\n#### Options\n\n```txt\nUsage: kvault pipe [options] \u003csecrets-path\u003e [command...]\n\nPull an environment from Vault and pipe it to a command\n\nArguments:\n  secrets-path\n  command                        Command to pipe to (default: [])\n\nOptions:\n  -P, --profile \u003cname\u003e           Name of the profile to use.\n  --endpoint-url \u003cendpoint-url\u003e  Vault endpoint URL\n  --token \u003cvault-token\u003e          Vault token\n  --cwd \u003ccwd\u003e                    Current working directory (default: \".\")\n  -h, --help                     display help for command\n```\n\n###### Examples\n\n```bash\n# Pull a secret from Vault and pipe it to a command\nkvault pipe --profile my-profile secret/my-app env | grep -e '^MY_APP_'\n\n# Pull a secret from Vault and pipe it to a node script\nkvault pipe --profile my-profile secret/my-app \"node -e 'console.log(process.env.MY_APP_SECRET)'\"\n```\n\n### rm\n\nThis command will remove a path or some versions of a secret.\n\n#### Options\n\n```txt\nUsage: kvault rm [options] \u003csecrets-path\u003e [versions...]\n\nRemove a secret from Vault\n\nArguments:\n  secrets-path\n  versions                       Versions to remove. By default, path will be removed. (default: [])\n\nOptions:\n  -P, --profile \u003cname\u003e           Name of the profile to use\n  --endpoint-url \u003cendpoint-url\u003e  Vault endpoint URL\n  --token \u003cvault-token\u003e          Vault token\n  --force                        Remove the secret without confirmation (default: false)\n  -h, --help                     display help for command\n```\n\n###### Examples\n\n```bash\n# Remove a path secret from Vault\nkvault rm --profile my-profile secret/my-app\n\n# Remove a secret version from Vault\nkvault rm --profile my-profile secret/my-app 3 4\n```\n\n## 🤝 Contributing\n\nWant to contribute? Awesome! To show your support is to star the project, or to raise issues on [GitHub](https://github.com/shahradelahi/vault-cli).\n\nThanks again for your support, it is much appreciated!\n\n### License\n\n[GPL-3.0](LICENSE) © [Shahrad Elahi](https://github.com/shahradelahi)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshahradelahi%2Fvault-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshahradelahi%2Fvault-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshahradelahi%2Fvault-cli/lists"}