krz/yoshi-cli

Archived

A password manager for the command line. cli password-manager terminal

Commit 6dde4dd0bc

6dde4dd0bc5e5f91f89587c75a30c9ef7a24494c

parent: b5a5fadff8

Verified · cmc

cmc <hello@cleberg.net> · 2024-11-07 05:23 UTC

package as a cli app

Layout: unified · split

.gitignore +1
@@ -1,6 +1,7 @@
11.DS_Store
22.idea/
33.pypirc
4build/
45dist/
56venv/
67__pycache__/
README.md +2 −3
@@ -34,8 +34,7 @@ To run the script locally, run the following commands:
3434```bash
3535git clone REPO_URL
3636cd yoshi
37pip3 install -r requirements.txt
38python3 main.py --help
37pip install .
3938```
4039
4140# Usage
@@ -43,7 +42,7 @@ python3 main.py --help
4342[(Back to top)](#table-of-contents)
4443
4544All commands can be passed to the program with the following template:
46`python3 main.py <COMMAND> <FLAG> <PARAMETER>`
45`python3 src/yoshi/cli.py <COMMAND> <FLAG> <PARAMETER>`
4746
4847![Yoshi CLI Help](./examples/yoshi-help.png)
4948
pyproject.toml +4 −1
@@ -1,6 +1,6 @@
11[project]
22name = "yoshi-cli"
3version = "0.1.0"
3version = "0.1.1"
44authors = [
55 { name="Christian Cleberg", email="hello@cleberg.net" },
66]
@@ -16,3 +16,6 @@ classifiers = [
1616[project.urls]
1717Homepage = "https://github.com/ccleberg/yoshi"
1818Issues = "https://github.com/ccleberg/yoshi/issues"
19
20[project.scripts]
21yoshi = "yoshi.cli:yoshi"
requirements.txt +1 −1
@@ -1,2 +1,2 @@
11prettytable~=2.2.0
2cryptography~=3.4.8
\ No newline at end of file
2cryptography
src/yoshi_cli.egg-info/SOURCES.txt deleted −11
@@ -1,11 +0,0 @@
1LICENSE
2README.md
3pyproject.toml
4src/account.py
5src/crypto.py
6src/database.py
7src/process.py
8src/yoshi_cli.egg-info/PKG-INFO
9src/yoshi_cli.egg-info/SOURCES.txt
10src/yoshi_cli.egg-info/dependency_links.txt
11src/yoshi_cli.egg-info/top_level.txt
\ No newline at end of file
src/yoshi_cli.egg-info/top_level.txt deleted −4
@@ -1,4 +0,0 @@
1account
2crypto
3database
4process
yoshi/__init__.py added
yoshi/__main__.py added +3
@@ -0,0 +1,3 @@
1if __name__ == "__main__":
2 from yoshi.cli import yoshi
3 yoshi()
src/account.py → yoshi/account.py renamed +1 −1
@@ -5,7 +5,7 @@ Modules imported:
55 - database: A custom module providing database functionality.
66"""
77
8import database
8import yoshi.database as database
99
1010
1111class Account:
main.py → yoshi/cli.py renamed +7 −4
@@ -5,11 +5,11 @@ It imports the required modules and sets up a parser with basic options for demo
55"""
66
77import argparse
8import crypto
9import database
10import process
8import yoshi.crypto as crypto
9import yoshi.database as database
10import yoshi.process as process
1111
12if __name__ == '__main__':
12def yoshi():
1313 parser = argparse.ArgumentParser(
1414 description='Manage your username and passwords via a convenient CLI vault.'
1515 )
@@ -131,3 +131,6 @@ if __name__ == '__main__':
131131 raise TypeError(
132132 'Please specify a command or use the --help flag for more information.'
133133 )
134
135if __name__ == "__main__":
136 yoshi()
src/crypto.py → yoshi/crypto.py renamed
src/database.py → yoshi/database.py renamed
src/process.py → yoshi/process.py renamed +4 −3
@@ -27,8 +27,8 @@ from string import ascii_letters, punctuation, digits
2727import random
2828import uuid
2929from prettytable import PrettyTable
30from account import Account
31import database
30from yoshi.account import Account
31import yoshi.database as database
3232
3333
3434def generate_characters(n: int) -> list:
@@ -176,7 +176,8 @@ def create_account() -> None:
176176 if password_length < 8:
177177 print('Error: Your password length must be at least 8 characters.')
178178 return
179 password_string = generate_password(password_length) # pylint: disable=undefined-variable
179 password_characters = generate_characters(password_length)
180 password_string = shuffle_characters(password_characters)
180181 else:
181182 password_string = input('Please enter your desired password: ')
182183
src/yoshi_cli.egg-info/PKG-INFO → yoshi_cli.egg-info/PKG-INFO renamed +10 −11
@@ -1,6 +1,6 @@
11Metadata-Version: 2.1
22Name: yoshi-cli
3Version: 0.1.0
3Version: 0.1.1
44Summary: A password manager for the command line.
55Author-email: Christian Cleberg <hello@cleberg.net>
66Project-URL: Homepage, https://github.com/ccleberg/yoshi
@@ -35,22 +35,21 @@ information.
3535
3636[(Back to top)](#table-of-contents)
3737
38To run the script locally, run the following commands:
38## PyPi
3939
4040```bash
41git clone REPO_URL
41pip install yoshi-cli
4242```
4343
44```bash
45cd yoshi
46```
44## Manual
4745
48```bash
49pip3 install -r requirements.txt
50```
46To run the script locally, run the following commands:
5147
5248```bash
53python3 main.py --help
49git clone REPO_URL
50cd yoshi
51pip3 install -r requirements.txt
52python3 src/yoshi/cli.py --help
5453```
5554
5655# Usage
@@ -58,7 +57,7 @@ python3 main.py --help
5857[(Back to top)](#table-of-contents)
5958
6059All commands can be passed to the program with the following template:
61`python3 main.py <COMMAND> <FLAG> <PARAMETER>`
60`python3 src/yoshi/cli.py <COMMAND> <FLAG> <PARAMETER>`
6261
6362![Yoshi CLI Help](./examples/yoshi-help.png)
6463
yoshi_cli.egg-info/SOURCES.txt added +15
@@ -0,0 +1,15 @@
1LICENSE
2README.md
3pyproject.toml
4yoshi/__init__.py
5yoshi/__main__.py
6yoshi/account.py
7yoshi/cli.py
8yoshi/crypto.py
9yoshi/database.py
10yoshi/process.py
11yoshi_cli.egg-info/PKG-INFO
12yoshi_cli.egg-info/SOURCES.txt
13yoshi_cli.egg-info/dependency_links.txt
14yoshi_cli.egg-info/entry_points.txt
15yoshi_cli.egg-info/top_level.txt
\ No newline at end of file
src/yoshi_cli.egg-info/dependency_links.txt → yoshi_cli.egg-info/dependency_links.txt renamed
yoshi_cli.egg-info/entry_points.txt added +2
@@ -0,0 +1,2 @@
1[console_scripts]
2yoshi = yoshi.cli:yoshi
yoshi_cli.egg-info/top_level.txt added +1
@@ -0,0 +1 @@
1yoshi