Skip to content

Commit

Permalink
chore: Update docs (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
shahradelahi committed Jul 23, 2024
1 parent c801502 commit 624ebf5
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 41 deletions.
70 changes: 49 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,62 @@
# Vault CLI
# Vault CLI (kvault)

[![CI](https://github.com/shahradelahi/vault-cli/workflows/CI/badge.svg)](https://github.com/shahradelahi/vault-cli/actions)
[![npm](https://img.shields.io/npm/v/kvault)](https://www.npmjs.com/package/kvault)
[![install size](https://packagephobia.com/badge?p=kvault)](https://packagephobia.com/result?p=kvault)
[![license](https://img.shields.io/npm/l/kvault)](https://www.npmjs.com/package/kvault)

> A CLI to access your HashiCorp's Vault Key/Value V2 secrets from the command line.
_kvault_ is a CLI for managing HashiCorp Vault Key/Value V2 secret engines from the command line.

### Usage
---

- [Installation](#-installation)
- [Usage](#-usage)
- [Make Profile](#make-profile)
- [Push](#push)
- [Pull](#pull)
- [Remove](#rm)
- [Pipe](#pipe)
- [Contributing](#-contributing)
- [License](#license)

## 📦 Installation

```bash
npx kvault --help
# Or
bunx kvault --help
npx kvault --help # Or bunx kvault --help
```

#### Make it global
###### Make it global

```bash
npm install --global kvault
```

### Table of Contents
## 📖 Usage

- [Install](#make-it-global)
- [Usage](#usage)
- Commands
- [Make Profile](#make-profile)
- [Push](#push)
- [Pull](#pull)
- [Remove](#rm)
- [Pipe](#pipe)
- [Reporting Issues](#reporting-issues)
```text
Usage: kvault [options] [command]
Manage your HashiCorp Vault Key/Value v2 secret engines from the command line.
Author: Shahrad Elahi <[email protected]> (https://github.com/shahradelahi)
License: GPL-3.0
Options:
-v, --version display the version number
-h, --help display help for command
Commands:
make-profile [options] <name> Create a new vault profile
mount [options] <mount-path> Mount a new KV2 secret engine
pipe [options] <secrets-path> [command...] Pull an environment from Vault and pipe it to a command
push [options] <env-file> <secrets-path> Push an environment to Vault
pull [options] <secrets-path> Pull an environment from Vault
rm [options] <secrets-path> [versions...] Remove a secret from Vault
seal [options] Seal Vault
unmount [options] <mount-path> Unmount a secret engine
unseal [options] [keys...] Unseal Vault
help [command] display help for command
```

### make-profile

Expand Down Expand Up @@ -167,7 +194,7 @@ Remove a secret from Vault
Arguments:
secrets-path
versions Versions to remove. By default, path will be removed (default: [])
versions Versions to remove. By default, path will be removed. (default: [])
Options:
-P, --profile <name> Name of the profile to use
Expand All @@ -187,10 +214,11 @@ kvault rm --profile my-profile secret/my-app
kvault rm --profile my-profile secret/my-app 3 4
```

### Reporting Issues
## 🤝 Contributing

Want to contribute? Awesome! To show your support is to star the project, or to raise issues on [GitHub](https://github.com/shahradelahi/vault-cli).

For reporting bugs and feature requests please open an issue
on [GitHub](https://github.com/shahradelahi/vault-cli/issues).
Thanks again for your support, it is much appreciated!

### License

Expand Down
34 changes: 17 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,27 @@
{
"name": "kvault",
"description": "CLI for HashiCorp's Vault Key/Value V2 engine",
"version": "0.1.0",
"description": "CLI for HashiCorp Vault Key/Value V2 secret engines",
"author": "Shahrad Elahi <[email protected]> (https://github.com/shahradelahi)",
"license": "GPL-3.0",
"repository": "github:shahradelahi/vault-cli",
"homepage": "https://github.com/shahradelahi/vault-cli",
"keywords": [
"vault",
"cli",
"kv-v2",
"key-value",
"hashicorp",
"secrets"
],
"type": "module",
"bin": {
"kvault": "dist/cli.js"
},
"files": [
"dist/**"
],
"packageManager": "[email protected]",
"scripts": {
"dev": "tsup --watch",
"build": "tsup",
Expand All @@ -19,7 +32,6 @@
"format": "prettier --write .",
"prepublishOnly": "pnpm format:check && pnpm lint && pnpm build"
},
"packageManager": "[email protected]",
"dependencies": {
"@iarna/toml": "^2.2.5",
"@litehex/node-vault": "1.0.0-canary.0",
Expand All @@ -42,20 +54,8 @@
"type-fest": "^4.23.0",
"typescript": "^5.5.4"
},
"license": "GPL-3.0",
"author": "Shahrad Elahi <[email protected]> (https://github.com/shahradelahi)",
"repository": {
"type": "git",
"url": "https://github.com/shahradelahi/vault-cli.git"
},
"publishConfig": {
"access": "public"
},
"keywords": [
"vault",
"cli",
"kv-v2",
"hashicorp",
"secrets"
]
"access": "public",
"provenance": true
}
}
12 changes: 9 additions & 3 deletions src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,15 @@ async function main() {
const packageInfo = await getPackageInfo();

const program = new Command()
.name('vault')
.description('Manage your secrets on HashiCorp Vault')
.version(packageInfo.version || '1.0.0', '-v, --version', 'display the version number');
.name('kvault')
.description(
`\
Manage your HashiCorp Vault Key/Value v2 secret engines from the command line.
Author: ${packageInfo.author}
License: ${packageInfo.license}`
)
.version(packageInfo.version || '0.0.0');

program
.addCommand(makeProfile)
Expand Down

0 comments on commit 624ebf5

Please sign in to comment.