Skip to content

yuricommits/vault-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vault-cli

A command-line interface for Vault - manage your code snippets from the terminal.

Installation

go install github.com/yuricommits/vault-cli@latest

Or build from source:

git clone https://github.com/yuricommits/vault-cli
cd vault-cli
go build -o vault .
sudo mv vault /usr/local/bin/

Authentication

  1. Go to vault-two-lovat.vercel.app/dashboard/settings
  2. Create a CLI access token
  3. Run:
vault auth login --token <your-token>

To use a self-hosted instance:

vault auth login --token <your-token> --url https://your-instance.com

Check auth status:

vault auth status

Log out:

vault auth logout

Commands

List snippets

vault list

Search snippets

vault search "debounce"

Copy snippet to clipboard

vault copy <id>

Create a new snippet

vault new

Push a local file as a snippet

vault push ./utils/debounce.ts
vault push ./utils/debounce.ts --title "useDebounce hook" --description "Debounce hook for React"

Delete a snippet

vault delete <id>
vault delete <id> --force

Configuration

Config is stored at ~/.config/vault/config.json.

Key Description Default
token CLI access token
base_url Base URL of your Vault instance https://vault-two-lovat.vercel.app

License

MIT

About

A command-line interface for Vault to manage the code snippets from the terminal.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages