Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/marevers/pleasant-cli
A command line interface for Pleasant Password Server
https://github.com/marevers/pleasant-cli
Last synced: about 2 months ago
JSON representation
A command line interface for Pleasant Password Server
- Host: GitHub
- URL: https://github.com/marevers/pleasant-cli
- Owner: marevers
- License: apache-2.0
- Created: 2023-03-31T10:57:51.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-06-13T14:47:29.000Z (3 months ago)
- Last Synced: 2024-07-14T23:21:46.154Z (2 months ago)
- Language: Go
- Size: 82 KB
- Stars: 4
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Pleasant CLI
Pleasant CLI is a simple CLI that lets you interact with Pleasant Password Server instances through the command line. It uses the [Pleasant Password Server API](https://pleasantpasswords.com/info/pleasant-password-server/m-programmatic-access/restful-api) to communicate with the server.
It should work with any instance that supports API version 5 (`/api/v5/`).
## Installation
Go to [Releases](https://github.com/marevers/pleasant-cli/releases) and download the latest release for your platform.
Extract the archive to a location in your `$PATH`, e.g. on Ubuntu: `/usr/local/bin`.
## Getting started
First, you need to set the server URL for the CLI to connect to.
It must be specified as `://:`.```
pleasant-cli config serverurl
```The server URL will be saved to the configuration file (default: `$HOME/.pleasant-cli.yaml`).
If you want to use a different config path, add the flag `--config ` to all commands.Next, log into the Pleasant Password Server:
```
pleasant-cli login
```**Note**: this will perform an interactive login. You can also pass your credentials as flags.
```
pleasant-cli login --username --password
```This will retrieve an access token and save it to a file (default: `$HOME/.pleasant-token.yaml`) for subsequent commands.
If you want to save/use the token in a different location, add the flag `--token ` to all commands.## Commands
In order to view all available commands, run the CLI without any arguments.
```
$ pleasant-clipleasant-cli is an easy to use CLI that uses the Pleasant Password Server
API to interact with a Pleasant Password Server instance.To use pleasant-cli, you must first set your server URL by running the following command:
pleasant-cli config serverurlYou can then log in by running:
pleasant-cli loginUsage:
pleasant-cli [command]Available Commands:
apply Applies a configuration to entries or folders
completion Generate the autocompletion script for the specified shell
config Interact with pleasant-cli configuration
create Creates entries or folders
delete Archives or deletes entries or folders or user access assignments for them
get Gets entries, folders, access levels, server info or password strength
help Help about any command
login Log in to Pleasant Password Server
patch Partially updates entries or folders or adds user access assignments for them
search Search for entries and folders matching a queryFlags:
--config string config file (default is $HOME/.pleasant-cli.yaml)
-h, --help help for pleasant-cli
-t, --toggle Help message for toggle
--token string token file (default is $HOME/.pleasant-token.yaml)
-v, --version version for pleasant-cliUse "pleasant-cli [command] --help" for more information about a command.
```To view information on (sub)commands, append `--help` to any command.
```
$ pleasant-cli login --helpLog into Pleasant Password Server with username and password.
Username and password can either be entered interactively or by using flags.Examples:
pleasant-cli login
pleasant-cli login --username --passwordUsage:
pleasant-cli login [flags]Flags:
-h, --help help for login
-p, --password string Password for Pleasant Password Server
-u, --username string Username for Pleasant Password ServerGlobal Flags:
--config string config file (default is $HOME/.pleasant-cli.yaml)
--token string token file (default is $HOME/.pleasant-token.yaml)
```## License
Pleasant CLI is released under the Apache 2.0 license. See [LICENSE.txt](https://github.com/marevers/pleasant-cli/blob/master/LICENSE.txt)