https://github.com/cipherboy/p
p is a concise, opinionated interface over pass
https://github.com/cipherboy/p
json pass password password-store
Last synced: 11 months ago
JSON representation
p is a concise, opinionated interface over pass
- Host: GitHub
- URL: https://github.com/cipherboy/p
- Owner: cipherboy
- License: gpl-3.0
- Created: 2018-11-20T03:26:31.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-02-17T00:17:42.000Z (about 4 years ago)
- Last Synced: 2025-03-30T05:11:24.493Z (12 months ago)
- Topics: json, pass, password, password-store
- Language: Shell
- Homepage:
- Size: 362 KB
- Stars: 8
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# `p`
`p` is a concise, opinionated interface over pass
## Requirements
Building `p` requires `python` to be installed; Python 3 is necessary to use
`sharg`.
Please install the [`sharg`](https://github.com/cipherboy/sharg) Python
module; this provides our command line argument parsing logic.
Using `p` requires `pass` and `jq` to be installed, or at least, available on
the system. However, additional functionality is provided by:
- `su` -- for local user changes
- `ssh` -- for executing `p` on remote servers
- `tree`, `sed`, `grep`, `cat` and other Unix utilities.
## Building
To build `p`, cd into the main directory, and run the build script.
cd p/
./build.py
This will create a directory, `bin/` with the built `p` command:
ls `bin/p`
This script can be relocated anywhere and used assuming the dependencies above
are on the target system.
(Why a build system? The script was getting a little long so I split it int
separate files. I wanted to be able to copy a single script anywhere and
use it immediately, so the build script converts `. ` style imports
into a single file. If you don't want to build `p`, you can test it with
`cd p/src` and running `bash main.bash `.)
## Philosophy
`p` is concise in that common operations are given one-letter command aliases;
e.g., `p g []` fetches the given JSON key (if specified, otherwise,
defaults to `password`) from the specified file.
`p` is opinionated in that it prefers metadata to be stored as JSON, while
remaining compatible with the de facto standard of first line being the target
password. Also, `p` insists that there's one right command to perform an
action, unlike pass where the following are equivalent:
- `pass `
- `pass ls `
- `pass show `
Under `p`, the `ls` operation only lists files and directories and will not
show the contents of the file.