CLI interface

101 views
Skip to first unread message

TheZero

unread,
Jan 5, 2017, 5:36:13 AM1/5/17
to KeePassXC
I wanna throw my 2cent about the now closed CLI Interface thread https://groups.google.com/forum/#!topic/keepassx-reboot/4XU_2LxXEyA

Since we already have code that merge two database, it shouldn't be trivial to make a tool (like ones in the utils folder: https://github.com/keepassxreboot/keepassxc/tree/develop/utils)
that do this operation starting from 2 file. Having a tool like this can be useful IMHO.

PS: I hate google group. When a best answer is selected you no longer can reply to that thread

Janek Bevendorff

unread,
Jan 5, 2017, 2:31:30 PM1/5/17
to KeePassXC
Yeah, same here. I wanted to reply, but couldn't.
I had a closer look at kpcli and it actually is cross-platform and supports both KeePass 1.x and 2.x formats. So I guess we don't need to duplicate that functionality if there already is a cross-platform tool that does everything you want. However, KeePass 2.x has a few neat command line options which KeePasssXC is lacking. The only real password-related CLI option, KeePassXC has is --pw-stdin and it doesn't even work properly (password is shown while typing and the main window shows up, but the contents aren't rendered). Supporting at least the options KeePass 2.x has and doing the --pw-stdin thing right, would be quite nice I think.

droidmonkey

unread,
Jan 5, 2017, 5:38:16 PM1/5/17
to KeePassXC
That's my fault i locked the topic, I'll refrain from doing that

Louis-Bertrand Varin

unread,
Jan 6, 2017, 11:48:20 AM1/6/17
to KeePassXC
Thanks for pointing out the /utils folder. Honestly I wasn't aiming for a full-fledged CLI interface in my initial question. Just making a couple of core functionalities (merging, that is) available from the command line would be perfect.

In that sense, adding a helper script for functionalities that could be useful to call from the command line, as needed, could be a good compromise.

I could try to add a script that would allow to merge 2 databases from the command line, using the newly merged merging functionality.
This script would use kdbx-extract.cpp as a template for a utility script.

What do you guys think?

Louis-Bertrand Varin

unread,
Jan 23, 2017, 2:47:14 PM1/23/17
to KeePassXC
Just found out KeePass has a couple of Single commands http://keepass.info/help/v2_dev/scr_sc_index.html
I think it could be nice to add some of them, and make it easy for the users to call them from a command line once keepassxc is installed.
We already have
* EstimateQuality (entropy-meter.cpp)
* Export (kdbx-extract.cpp)
* Sync (kdbx-merge.cpp)

Next step would be to allow calling those commands directly from the keepassxc executable, for example
keepassxc merge [args]
keepassxc generate [args]
etc...

I could pretty easily add some entry manipulation commands (addEntry, removeEntry, listEntries, for example), but I would like to know what you think of it before doing so.

TheZero

unread,
Jan 26, 2017, 4:35:09 AM1/26/17
to KeePassXC
I think it should be better having a separate cli program called keepassxc-cli (like KeePass does)

Louis-Bertrand Varin

unread,
Jan 26, 2017, 1:42:15 PM1/26/17
to KeePassXC
I agree, a separate executable is a better idea!
Reply all
Reply to author
Forward
0 new messages