Skip to content

Secret CLI is a command-line tool designed for securely managing secrets and sensitive information. It provides a simple and efficient interface for creating, storing, and retrieving secrets in a secure manner.

License

Notifications You must be signed in to change notification settings

mahinops/secretcli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

71 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Secret CLI

GitHub stars GitHub release (latest by date) Go Report Card GitHub GitHub Workflow Status Go Version GitHub contributors GitHub issues GitHub forks GitHub pull requests GitHub last commit GitHub repo size

Secret CLI is a command-line tool designed for securely managing secrets and sensitive information. It provides a simple and efficient interface for creating, storing, and retrieving secrets in a secure manner.

Buy Me a Coffee

Features

  • Secure Storage: Safely store your secrets using encryption.
  • User Authentication: Register and authenticate users to access their secrets.
  • Command-Line Interface: Simple and intuitive command-line interface for managing secrets.
  • Cross-Platform Compatibility: Works on any system with a compatible terminal.
  • Easy to Use: Minimal setup required for quick access to your secrets.

Installation

To install Secret CLI, follow these steps:

  1. Download the Binary from here based on your machine architecture.

    If you are not sure. Try these commands_ Ubuntu:

    uname -m
    • x86_64 indicates an AMD/Intel architecture.
    • armv7l or aarch64 indicates an ARM architecture.

    Mac:

    uname -a

    Windows:

    echo %PROCESSOR_ARCHITECTURE%
  2. Move the Binary to a Directory in PATH

    sudo mv <file_name> /usr/local/bin/secretcli
  3. Make the Binary Executable

    chmod +x /usr/local/bin/secretcli
  4. Verify the Installation and Set Master Password

    secretcli

Note: If you face any issue like permission error or not trusted, then follow this alternative way_

  1. Clone This Repo in Your PC.
  2. Install Golang:
    version >= 1.23
  3. cd to the repo =>
    cd secretcli
  4. Build the Project =>
    go build -o secretcli cmd/secretcli.go
  5. Make the Generated Binary Executable =>
    chmod +x secretcli
    
  6. Move the Binary =>
    sudo mv secretcli /usr/local/bin/
    
  7. Verify the Installation and Set Master Password
    secretcli

Usage

  1. List All Secrets

    secretcli secret -list
  2. Add a Secret

    secretcli secret -add //Follow the prompt and insert values
  3. Edit a Secret

    secretcli secret -edit <id_number>
  4. Delete a Secret

    secretcli secret -del <id_number>

User Session Expiry

By default the user session expiry limit is set to 5 minutes. But if any user want to update the expiry they can use the following commands_

  • Update Session Expiry Command

    secretcli auth -set-expiry <expiry_time>

    Here, the available options for expiry are:

    • s -> seconds
    • m -> minutes
    • h -> hours
    • o -> no-expiry (never need to authenticate again)
  • To set a 10 minutes expiry user can use the following command:

    secretcli auth -set-expiry 10m
  • To set no expirty user can use the following command:

    secretcli auth -set-expiry o

Export Secrets List as JSON file

If you want to take a backup of the saved secret list, you can export them in a json file. To do so, use the following command_

secretcli secret -export

This is applicable for exporting the secrets only. User data cannot be exported.

Contribution

Contributions are welcome! Please open an issue or submit a pull request to enhance the functionality of Secret CLI. Here are the reference links_

License

  • License: This project is licensed under the MIT License. See the LICENSE file for more details.

About

Secret CLI is a command-line tool designed for securely managing secrets and sensitive information. It provides a simple and efficient interface for creating, storing, and retrieving secrets in a secure manner.

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published

Languages