Autokpass is a small GUI utility that provides functionality to paste username or/and password from your KeePass database into any aplication by simulating keyboard typing.
For simulating keyboard typing Autokpass uses xdotool on Linux and cliclick or AppleScript via osascript on macOS. Access to KeePass database is provided by Kotpass.
- Install Java version >= 11
- Install xdotool
- Download
autokpass.jar
for Linux from Release page. Alternatively you can build from sources
- Install Java version >= 11
- Install cliclick
- Download
autokpass.jar
for macOS file from Release page. Alternatively you can build from sources
Option to download singed application is not available now, but should be available in near future.
Apple doesn't allow to run unsigned application but it allows to run unsigned application that was created on the same machine. That means in order to install Autokpass as application, it should be packaged on the destination machine. For that please check out Build application
section below.
Open a Terminal and execute downloaded autokpass.jar
with java
.
$ java -jar autokpass.jar --file PATH_TO_KEEPASS_DATABASE.kdbx --delay 1
$ java -jar autokpass.jar [OPTIONS]
-f, --file
: path to KeePass database file-d, --delay
: delay in seconds before autotype will be started-b, --autotype-delay
: delay in milliseconds between adjacent autotype actions-k, --key-file
: path to key file-a, --autotype
: programm responsible for keyboard emulation; available options:xdotool
,osascript
,cliclick
; default options:xdotool
for Linux,osascript
for macOS;-c, --process-key-command
: Shell command that can be executed on file specified in--key-file
and uses it to unlock database-h, --help
: print usage info
All options can be specified in a configuration file located at $HOME/.config/autokpass/autokpass.cfg
file=... # path to KeePass database file
delay=... # delay in seconds before autotype will be started
autotype-delay=... # delay in milliseconds between adjacent autotype actions
key-file=... # path to key file
autotype=... # programm responsible for keyboard emulation; available options: `xdotool`, `osascript`, `cliclick`; default options: `xdotool` for Linux, `osascript` for macOS
process-key-command=... # Shell command that can be executed on file specified in `--key-file` and uses it to unlock database
git clone https://github.com/aivanovski/autokpass.git
cd autokpass
Then to build the project run:
./gradlew packageReleaseUberJarForCurrentOS
After build is finished autokpass-[platform]-[version].jar
can be found at autokpass/build/compose/jars
git clone https://github.com/aivanovski/autokpass.git
cd autokpass
Then to build the project run:
./gradlew packageDmg
After build is finished autokpass-[version].dmg
can be found at autokpass/build/compose/binaries/main/dmg/
$ java -jar autokpass.jar \
--file PATH_TO_KEEPASS_FILE
Write your passwrd to a file and encrypt it, for example with gpg
.
Then encrypted password can be decrypted by Autokpass with --process-key-command
option
$ java -jar autokpass.jar \
--file PATH_TO_KEEPASS_FILE \
--key-file PATH_TO_ENCRYPTED_FILE_WITH_PASSWORD \
--process-key-command 'gpg --decrypt ...'
$ java -jar autokpass.jar \
--file PATH_TO_KEEPASS_FILE \
--key-file PATH_TO_KEY_FILE
Create config file at $HOME/.config/autokpass/autokpass.cfg
file=PATH_TO_KEEPASS_FILE
Run Autokpass without arguments
$ java -jar autokpass.jar
Add to i3 config file.
# Make Terminal window with Autokpass floating, resize it and position it
for_window [title="autokpass-autotype"] floating enable, resize set 2000 800, move position 920 1400
# Start new Terminal window with Autokpass by pressing MOD+SHIFT+A
bindsym $mod+Shift+a exec "$term --command 'java -jar autokpass.jar --file PATH_TO_KEEPASS_FILE --delay 1' --title autokpass-autotype"