Compare commits

..

8 commits

Author SHA1 Message Date
2cfddbbcbd
chore: Update README.md
All checks were successful
Write changelog / write-changelog (push) Successful in 24s
Rust CI / Rust CI (push) Successful in 2m54s
Signed-off-by: Awiteb <a@4rs.nl>
2024-08-21 17:09:35 +00:00
e8a18d4f53
chore: Do not validate password if file exists
Signed-off-by: Awiteb <a@4rs.nl>
2024-08-21 20:07:33 +03:00
75625f53b4
chore(typo): Fix typo Clening -> Cleaning
Signed-off-by: Awiteb <a@4rs.nl>
2024-08-21 16:32:37 +00:00
ae7e310a49
chore: Update the version in the lock file
Signed-off-by: Awiteb <a@4rs.nl>
2024-08-21 16:30:40 +00:00
00475f5240
chore: Add the docs as homepage
Signed-off-by: Awiteb <a@4rs.nl>
2024-08-21 16:30:24 +00:00
e8ac0ffaae
docs: Update issues template
Signed-off-by: Awiteb <a@4rs.nl>
2024-08-21 16:30:00 +00:00
656cc9f984
chore(ci): Update rust action username
Signed-off-by: Awiteb <a@4rs.nl>
2024-08-21 16:29:41 +00:00
f364f5bb4b
docs: Update remove command docs
All checks were successful
Write changelog / write-changelog (push) Successful in 3s
Rust CI / Rust CI (push) Successful in 1m56s
Signed-off-by: Awiteb <a@4rs.nl>
2024-08-20 17:46:12 +00:00
11 changed files with 44 additions and 30 deletions

View file

@ -9,16 +9,12 @@ assignees: ''
## Checks ## Checks
* [ ] I added a descriptive title to this issue * [ ] I added a descriptive title to this issue
* [ ] I have searched Google for similar issues and couldn't find anything * [ ] I have read [the documentation](https://lprs.4rs.nl) and still think this it's a bug
* [ ] I have read [the README](https://git.4rs.nl/awiteb/lprs/src/branch/master/README.md) and still think this is a bug
## Version ## Version
<!-- Report for the bug only if it's present in the latest version of Lprs. <!-- Report for the bug only if it's present in the latest version of Lprs.
If you are not using the latest version, please update and check if the bug is still present. --> If you are not using the latest version, please update and check if the bug is still present. -->
<!-- Run `rustc --version` to get the version -->
Rustc version: `...`
<!-- Run `lprs --version` to get the version, and make sure it's the latest one -->
Lprs version: `...` Lprs version: `...`
## Description ## Description

View file

@ -12,5 +12,5 @@ For the location, please provide a link to the code or the documentation.
| Location | Suggestion | | Location | Suggestion |
|----------|------------| |----------|------------|
| Code-link| Suggestion | | location | Suggestion |

View file

@ -12,7 +12,7 @@ jobs:
runs-on: debian runs-on: debian
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: https://codeberg.org/TheAwiteb/rust-action@v1.74 - uses: https://codeberg.org/awiteb/rust-action@v1.74
- name: Check MSRV - name: Check MSRV
run: cargo +1.74 build run: cargo +1.74 build
- name: Build the source code - name: Build the source code

2
Cargo.lock generated
View file

@ -704,7 +704,7 @@ checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c"
[[package]] [[package]]
name = "lprs" name = "lprs"
version = "2.0.0-rc.0" version = "2.0.0-rc.2"
dependencies = [ dependencies = [
"aes", "aes",
"base32", "base32",

View file

@ -6,6 +6,7 @@ license = "GPL-3.0-or-later"
authors = ["Awiteb <a@4rs.nl>"] authors = ["Awiteb <a@4rs.nl>"]
readme = "README.md" readme = "README.md"
description = "A local CLI vaults manager. For human and machine use" description = "A local CLI vaults manager. For human and machine use"
homepage = "https://lprs.4rs.nl"
repository = "https://git.4rs.nl/awiteb/lprs" repository = "https://git.4rs.nl/awiteb/lprs"
rust-version = "1.74.1" rust-version = "1.74.1"
keywords = ["password", "vault", "manager", "CLI"] keywords = ["password", "vault", "manager", "CLI"]

View file

@ -1,7 +1,7 @@
<div align="center"> <div align="center">
# Lprs # Lprs
A local vault manager designed to securely store and manage your vaults. A local vault manager designed to securely store and manage your vaults.
[![Docs](https://img.shields.io/badge/docs-lprs.4rs.nl-purple)](https://lprs.4rs.nl) [![Docs](https://img.shields.io/badge/docs-lprs.4rs.nl-purple)](https://lprs.4rs.nl)
@ -14,6 +14,7 @@ A local vault manager designed to securely store and manage your vaults.
</div> </div>
## Features ## Features
- Auto checks for updates (Can be disabled). - Auto checks for updates (Can be disabled).
- Passing the master password as an argument and via stdin. - Passing the master password as an argument and via stdin.
- Changing the master password. - Changing the master password.
@ -36,17 +37,21 @@ A local vault manager designed to securely store and manage your vaults.
## Installation ## Installation
### Build from source (MSRV: `1.74.0`) ### Build from source (MSRV: `1.74.0`)
```bash ```bash
# From crates.io # From crates.io
cargo install lprs cargo install lprs
# From source (after cloning the repository) # From source (after cloning the repository)
# The binary will be in target/release/lprs # The binary will be in target/release/lprs
cargo build --release cargo build --release
``` ```
This will build Lprs with update checking enabled. If you want to disable update checking, you can build Lprs without the default features by passing the `--no-default-features` flag. This will build Lprs with update checking enabled. If you want to disable update
checking, you can build Lprs without the default features by passing the
`--no-default-features` flag.
### Pre-built binaries ### Pre-built binaries
Pre-built binaries are available for Linux and Windows on the [releases Pre-built binaries are available for Linux and Windows on the [releases
page](https://git.4rs.nl/awiteb/lprs/releases/latest). There is tow version of page](https://git.4rs.nl/awiteb/lprs/releases/latest). There is tow version of
the binary, one with update checking enabled and other not, the binaries with the binary, one with update checking enabled and other not, the binaries with
@ -54,7 +59,8 @@ update checking enabled have the `lrps-update-notify` prefix.
## Usage ## Usage
Lprs provides a command-line interface for managing your vaults. The following commands are available: Lprs provides a command-line interface for managing your vaults. The following
commands are available:
``` ```
A local CLI vaults manager. For human and machine use A local CLI vaults manager. For human and machine use
@ -71,7 +77,7 @@ Commands:
get Get a entire vault or single field from it get Get a entire vault or single field from it
export Export the vaults export Export the vaults
import Import vaults import Import vaults
change-master-password Change the master password change-master-password Change master password, reencrypt the vaults with new password
completion Generate shell completion completion Generate shell completion
help Print this message or the help of the given subcommand(s) help Print this message or the help of the given subcommand(s)
@ -79,26 +85,37 @@ Options:
-f, --vaults-file <VAULTS_FILE> The vaults json file -f, --vaults-file <VAULTS_FILE> The vaults json file
-v, --verbose Show the logs in the stdout -v, --verbose Show the logs in the stdout
-m, --master-password <MASTER_PASSWORD> The master password, or you will prompt it -m, --master-password <MASTER_PASSWORD> The master password, or you will prompt it
-h, --help Print help -h, --help Print help (see more with '--help')
-V, --version Print version -V, --version Print version
``` ```
## Documentation ## Documentation
You can find the full documentation for Lprs on the official website at https://lprs.4rs.nl.
You can find the full documentation for Lprs here <https://lprs.4rs.nl>.
## Contributing ## Contributing
Contributions to Lprs are welcome! If you would like to contribute, please follow the guidelines outlined in the [CONTRIBUTING.md](CONTRIBUTING.md) file. Contributions to Lprs are welcome! If you would like to contribute, please
follow the guidelines outlined in the [CONTRIBUTING.md](CONTRIBUTING.md) file.
## Mirrors ## Mirrors
This repository is mirrored on the following platforms: This repository is mirrored on the following platforms:
- [GitHub](https://github.com/TheAwiteb/lprs) - [GitHub](https://github.com/TheAwiteb/lprs)
- [Codeberg](https://codeberg.org/awiteb/lprs) - [Codeberg](https://codeberg.org/awiteb/lprs)
## License ## License
Lprs is licensed under the GPL-3.0 License. This means that you are free to use, modify, and distribute the software under the terms of this license. Please refer to the [LICENSE](LICENSE) file for more details. Lprs is licensed under the GPL-3.0 License. This means that you are free to use,
modify, and distribute the software under the terms of this license. Please
refer to the [LICENSE](LICENSE) file for more details.
--- ---
## Support
If you like this project and want to support it, you can do so by donating via
[Ko-fi](https://ko-fi.com/awiteb).
[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/awiteb) [![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/awiteb)

View file

@ -8,7 +8,7 @@
- [Editing a vault](commands/edit.md) - [Editing a vault](commands/edit.md)
- [Getting a vault](commands/get.md) - [Getting a vault](commands/get.md)
- [Listing all vaults](commands/list.md) - [Listing all vaults](commands/list.md)
- [Clening the vaults](commands/clean.md) - [Cleaning the vaults](commands/clean.md)
- [Generating a password](commands/gen.md) - [Generating a password](commands/gen.md)
- [Importing and exporting vaults](commands/import-export.md) - [Importing and exporting vaults](commands/import-export.md)
- [Changing the master password](commands/change-master-password.md) - [Changing the master password](commands/change-master-password.md)

View file

@ -36,7 +36,7 @@ Now let's take a look at the available commands and how to use them.
- [Editing a vault](commands/edit.md) - [Editing a vault](commands/edit.md)
- [Getting a vault](commands/get.md) - [Getting a vault](commands/get.md)
- [Listing all vaults](commands/list.md) - [Listing all vaults](commands/list.md)
- [Clening the vaults](commands/clean.md) - [Cleaning the vaults](commands/clean.md)
- [Generating a password](commands/generate-password.md) - [Generating a password](commands/generate-password.md)
- [Importing and exporting vaults](commands/import-export.md) - [Importing and exporting vaults](commands/import-export.md)
- [Changing the master password](commands/change-master-password.md) - [Changing the master password](commands/change-master-password.md)

View file

@ -1,4 +1,4 @@
# Clening the vaults # Cleaning the vaults
## Usage ## Usage

View file

@ -3,17 +3,17 @@
## Usage ## Usage
``` ```
Usage: lprs remove [OPTIONS] <INDEX-or-NAME> Usage: lprs remove [OPTIONS] [INDEX-or-NAME]...
Arguments: Arguments:
<INDEX-or-NAME> The vault to remove, index or name [INDEX-or-NAME]... The vaults to remove, index or name
Options: Options:
-f, --force Force remove, will not return error if there is no vault with the given index or name -f, --force Force remove, will not return error if there is no vault with the given index or name
-h, --help Print help -h, --help Print help
``` ```
To remove a vault you need to provide the index or the name of the vault. If you To remove a vaults you need to provide the index or the name of each vault. If you
provide the index, the vault will be removed by its index, if you provide the provide the index, the vault will be removed by its index, if you provide the
name, the vault will be removed the first vault with the given name. name, the vault will be removed the first vault with the given name.
@ -22,17 +22,17 @@ unless you provide the `--force` option, in which case the command will not
return an error if there is no vault with the given index or name. return an error if there is no vault with the given index or name.
## Examples ## Examples
Remove a vault by its index: Remove a vaults by its index:
```sh ```sh
lprs remove 1 lprs remove 1 10 14
``` ```
Remove a vault by its name: Remove a vault by its name:
```sh ```sh
lprs remove my-vault lprs remove my-vault 'another vault' "third vault"
``` ```
Force remove a vault by its index: Force remove a vault by its index (will not return an error if there is no vault with the given index):
```sh ```sh
lprs remove 234 --force lprs remove 234 --force
``` ```

View file

@ -138,7 +138,7 @@ pub fn master_password_prompt(is_new_vaults_file: bool) -> LprsResult<[u8; 32]>
secret_prompt( secret_prompt(
"Master Password:", "Master Password:",
is_new_vaults_file, is_new_vaults_file,
Some(vec![Box::new(password_validator)]), is_new_vaults_file.then(|| vec![Box::new(password_validator) as Box<dyn StringValidator>]),
) )
.map(|p| sha2::Sha256::digest(p).into()) .map(|p| sha2::Sha256::digest(p).into())
} }