#password #manager #pars-cli #pars

app pars-cli

A zx2c4-pass compatible passwords manager

5 releases

new 0.1.5 Apr 28, 2025
0.1.4 Apr 28, 2025
0.1.3 Apr 28, 2025
0.1.2 Apr 24, 2025
0.1.1 Apr 23, 2025

#51 in Authentication

Download history 152/week @ 2025-04-20 223/week @ 2025-04-27

375 downloads per month

GPL-3.0-or-later

220KB
5.5K SLoC

pars-cli

pars is a cross-platform zx2c4-pass compatible CLI tool for managing your password store.

Dependencies

To use pars-cli, ensure your system has the following dependencies installed:

  • gpg2: for encryption and decryption (any program that implements the PGP standard, such as GnuPG or OpenPGP)
  • git: for version control
  • xclip(X11) or wl-clipboard(Wayland): for Linux DE clipboard support

Refer to the Installation section for installation details.

Installation

We are trying to package pars-cli to more package managers. If you want to help, feel free to open an issue or PR.

Cargo

Install pars-cli using Cargo:

cargo install pars-cli

Usage

Already familiar with pass? You can skip this section and go straight to the Differences.

pars is largely compatible with pass, supporting the same core commands:

# Initialize the password store
pars init <your-gpg-id>

# List all stored entries
pars ls

# Add a new password
pars insert <path/to/password>

# Generate a password
pars generate <path/to/password> <length>  # -c to copy to clipboard

# Show a password
pars show <path/to/password>               # -c to copy / -q to show QR code

# Edit a password
pars edit <path/to/password>
# Default editor is 'vim' on Unix and 'notepad' on Windows.
# You can configure this in the config file.

# Remove a password
pars rm <path/to/password>                 # -r to remove recursively from git

# Search passwords by name
pars find <name>

# Search passwords by content
pars grep <content>

# For more commands, check the help message:
pars --help # or -h(short help)

Differences

While pars aims for full compatibility with pass, a few key differences exist:

  1. Configuration via File

    Unlike pass, pars does not rely on environment variables for configuration. All settings are managed through a dedicated config file. You can change the config file location by setting the PARS_CONFIG_PATH environment variable.

  2. No Plugin Support (Yet)

    Plugin support is currently not available, but may be considered in future versions.

Configuration

The configuration file's default location depends on your operating system:

  • Linux: ~/.config/pars/config.toml
  • macOS: ~/Library/Application Support/pars/config.toml
  • Windows: %APPDATA%/pars/config.toml

If no config file is found or some options are not set, pars will use the default values to fill the missing parts.

You can copy and modify the following default config file to make your own:

[print_config]
dir_color = "cyan"
file_color = ""
symbol_color = "bright green"
tree_color = ""
grep_pass_color = "bright green"
grep_match_color = "bright red"

[path_config]
default_repo = "<Your Home>/.password-store"
repos = ["<Your Home>/.password-store"]

[executable_config]
pgp_executable = "gpg2"
editor_executable = "vim" # "notepad" on Windows
git_executable = "git"

Command Line Completion

Currently, only powershell is supported for command line completion. We are working on adding support for bash, zsh and fish in the future.

Windows Powershell

Run the following command to download the latest ParsCompletion module to your local machine:

$documentsPath = (Get-ItemProperty 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders').Personal
$documentsPath = [Environment]::ExpandEnvironmentVariables($documentsPath)

$modulePath = Join-Path $documentsPath "PowerShell\Modules\ParsCompletion"

# make sure the module path exists
if (-Not (Test-Path $modulePath)) {
    Write-Host "Creating module directory at $modulePath"
    New-Item -Path $modulePath -ItemType Directory -Force | Out-Null
}

$files = @(
    @{
        Url = "https://raw.githubusercontent.com/vollate/pass-store-rs/refs/heads/main/completion/pwsh/ParsCompletion.psm1"
        Path = Join-Path $modulePath "ParsCompletion.psm1"
    },
    @{
        Url = "https://raw.githubusercontent.com/vollate/pass-store-rs/refs/heads/main/completion/pwsh/ParsCompletion.psd1"
        Path = Join-Path $modulePath "ParsCompletion.psd1"
    }
)

# Download the files
foreach ($file in $files) {
    Write-Host "Downloading $($file.Url) ..."
    Invoke-WebRequest -Uri $file.Url -OutFile $file.Path -UseBasicParsing
    Write-Host "Saved to $($file.Path)"
}

Then, run "Import-Module ParsCompletion" >> $PROFILE to enable the module.

Contributing

We welcome contributions of all kinds — from simple bug reports and typo fixes to major new features. Open an issue or pull request on our GitHub repository to get started.

Reporting Bugs

If you encounter any issues, please report them on our GitHub Issues page. When reporting a bug, please provide as much detail as possible to help us understand and reproduce the issue. This includes:

  • OS and version (e.g., Ubuntu 22.04, macOS 14, Windows 11)
  • pars version (pars --version)
  • Steps to reproduce
  • Relevant output or logs: set up the environment variable PARS_LOG_LEVEL=Debug to get more logs, remember to remove any sensitive information before sharing!
  • Crash reports: if pars exits abnormally, set up the environment variable PARS_LOG_LEVEL=Debug and RUST_BACKTRACE=1 to get the backtrace, and share it with us. Remember to remove any sensitive information before sharing!

Dependencies

~10–21MB
~285K SLoC