14 stable releases

2.5.0 Oct 4, 2024
2.4.0 Jul 22, 2024
2.0.2 Mar 27, 2024
1.0.4 Dec 27, 2023
1.0.2 Nov 29, 2023

#164 in Command line utilities

Download history 124/week @ 2024-07-22 198/week @ 2024-07-29 6/week @ 2024-08-05 11/week @ 2024-09-16 25/week @ 2024-09-23 150/week @ 2024-09-30 15/week @ 2024-10-07 2/week @ 2024-10-14

168 downloads per month

MIT/Apache

535KB
17K SLoC

Rust 9K SLoC // 0.0% comments GraphQL 9K SLoC

zero-cli

A command line tool for Zero Secrets Manager.

Overview

This CLI tool allows users to manage secrets and projects within the Zero Secrets Manager. It provides functionalities for authentication, project management, secret management, team handling, and more.

Prerequisites

Make sure OpenSSL is installed on your system. Here are the installation instructions for different platforms:

macOS

brew install openssl

Ubuntu/Debian

sudo apt-get update
sudo apt-get install libssl-dev

Fedora

Copy code
sudo dnf install openssl-devel

Installation

Using Cargo

To install the zero-cli from Crates.io, use the following command:

cargo install zero-cli

This command will download the crate, compile all the binary targets it contains (in "release" mode), and copy them into the ~/.cargo/bin/ directory. Ensure that your shell knows to look there for binaries!

Using Homebrew (Only for Apple Silicon)

First, tap the Zero Secrets CLI repository:

brew tap zerosecrets/cli

Then, install the zero-cli:

brew install zero-cli

Usage

The CLI offers various subcommands:

  • auth: Authentication and authorization functionalities.
  • projects: Manage projects, including creation, deletion, editing, listing, sharing, usage overview, and viewing details.
  • secrets: Handle secrets, allowing users to create, delete, edit, list, share, drop, and view details.
  • teams: Operations related to teams, such as creation, deletion, editing, leaving, listing, managing users, and viewing details.
  • tokens: Token management including creation, deletion, list view and regeneration.
  • help: Display help information about the CLI or a specific subcommand.

🛠 Development guide

Run

cargo run

or if you want to test the command run from src folder

cargo run -- auth login

Codegen

cargo install graphql_client_cli
graphql-client generate <query_path> --schema-path <schema_path>

as example

graphql-client generate src/auth/graphql/me.graphql --schema-path schema.graphql

Dependencies

~16–31MB
~493K SLoC