Giter Club home page Giter Club logo

keepass-cli-rs's Introduction

KeePass CLI with Emacs Integration

Why KeePass

  • I don’t want to pay for password managers anymore. Especially most of them are subscription-based. I argue that having a password manager is basic human right in 21st century, and it should be free and accessible to everybody.
  • GNU Pass is good, but it’s hard to interact with it outside of terminal.

Why New CLI

  • UI/UX of keepassxc-cli is not friendly.
    • keepassxc-cli can only list the title of entry. However, only showing the title might not be enough in some cases. Even worse, there might be entries with the exact same title.
  • Need to parse CLI output to get the information we want.
  • Above reasons make it really difficult to develop a good Emacs package to retrieve passwords.

Feature

  • List the entries with user-specified fields keepass-cli -d <DATABSE> ls -f title username
  • Server mode keepass-cli -d <DATABASE> server --emacs
  • Emacs integration uses pure completing-read, so you can use any completion engine you want.

Restriction/Warning

  • It’s read only! Please use official CLI to add/remove/edit entries/download icons.
  • It’s only used/tested by me now.

Note

The icon data is saved in the project directory, which is different between operating systems.

For example, on macOS, the directory is ~/Library/Application Support/keepass-cli.

The directory path is generate by the following code from directories crate. Please refer to it to find your path.

ProjectDirs::from("", "", "keepass-cli")

Goal

Download

git clone --recursive https://github.com/fuyu0425/keepass-cli-rs

Installation

CLI binary

cargo install --path .

Emacs integration

Required package: s, dash, hydra

(add-to-list 'load-path "/Users/fuyu0425/project/github/keepass-cli-rs/")
(require 'keepass)
(setq keepass-database "/Users/fuyu0425/keepass/keepass.kdbx")
(keepass-make-hydra-favorite
 ("t" "test")
 ("o" "totp seed"))
;; for spacemacs with SPC a k
(spacemacs/set-leader-keys
  "ak" 'keepass-inplace)

There are two functions: keepass and keepass-inplace. keepass will switch to a special buffer keepass:main. keepass-inplace will not.

Please refer to the source code to find what you can customize.

Screenshots for Emacs integration

Interface

./screenshots/keepass-inplace.png

Select Entries

./screenshots/keepass-select.png

Favorite Entries

./screenshots/keepass-favorite.png

Contribution

I have listed some TODOs in TODOs.org. Welcome PR and discussion.

Credit

keepass-cli-rs's People

Contributors

fuyu0425 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.