Package: lihim
CLI tool for managing secret keys, tokens, sensitive and/or public key-value pairs. AKA"A glorified note-taking CLI tool  with added security and complexity for listing key-value pairs."OverviewLihim(Filipino word forsecret) uses PyNaCl'sSecretBoxfor secret key encryption, and stores the key-value pairs in an SQLite (PostgreSQL coming soon) database. Secret keys are managed according to users and groups. That is, each user has groups and these groups can contain several key-value pairs.Installationpip install lihimGet StartedRunlihim initdbto create the database and tables,Next,lihim useradd [username]to add your first user. You may readNotessection > Re: Users' key for prompts to expect.Then,lihim login [username]to login.Before you can add key-value pairs, you need a group. Runlihim groupadd [group name]to create a group.Now you can add a pair.lihim pairaddcommand will prompt interactively for key, value, and group.You just added your first key-val pair! Refer toCommandssection below for more commands.CommandsCommandDescriptioninitdbOne-off command to create the database and tables.usersCheck registered users.useradd [username]Create a new user with username of ____.login [username]Login as user with username of ____.logoutLogout current user.checkCheck who is currently logged in.groupsDisplay all the groups of current user.group [group name]Display all the keys of key-value pairs in the group with name of ____.groupadd [group name]Add new group with name of ____.groupdel [group name]Delete group with name of ____pairsDisplay all the keys of available pairs of the current user.pair [key]Display the key-value pair with key of ____.pairaddAdd a new key-value pair. Will prompt interactively for key, value, and group.pairdel [key] [group name]Delete pair with key ____ and within group ____.NotesRe: User's "key"As perPyNaCl's documentation:The 32 bytes key given toSecretBoxmust be kept secret. It is the combination to your “safe” and anyone with this key will be able to decrypt the data, or encrypt new data.InLihim, this "key" is generated whencreatinga new user. The key's path (where to put it) and name (unique, only you knows) are all up to the user. When creating a user byuseradd [username], there will be prompts asking where and what to name the key. This is only for generating the key and the usercan (absolutely) rename and/or movethe key elsewhere anytime. The key's path and name are not stored in the database.When logging in, there will be prompts asking where your key is and what is its name. This happens everylogin [username]. You must give the current key path and key name if you ever moved and/or renamed the key.Re: SQLite3The project currently uses sqlite. Postgresql option is on the roadmap. All values of key-value pairs are encrypted using PyNaCl'sSecretBox.DevelopmentThe project uses Poetry to package and manage dependencies:poetry installRun tests:pytestLicenseMIT LicenseCopyright (c) 2021 Neil VanPermission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.