As said in issue #40, I've rewritten the client to use argparse, so that the users can have a better user experience.
I haven't tested every function, so there may be many bugs.
Examples now:
❯ python -m onlykey -h
usage: __main__.py [-h]
{version,fwversion,help,getlabels,getkeylabels,setslot,wipeslot,wipekey,idletimeout,keylayout,wipemode,keytypespeed,ledbrightness,storedkeymode,derivedkeymode,backupkeymode,2ndprofilemode,sysadminmode,lockbutton,hmackeymode,rng,ping,wink,setkey,init,credential}
...
optional arguments:
-h, --help show this help message and exit
commands:
{version,fwversion,help,getlabels,getkeylabels,setslot,wipeslot,wipekey,idletimeout,keylayout,wipemode,keytypespeed,ledbrightness,storedkeymode,derivedkeymode,backupkeymode,2ndprofilemode,sysadminmode,lockbutton,hmackeymode,rng,ping,wink,setkey,init,credential}
version display the version of the app
fwversion display the version of the OnlyKey firmware
help this message
getlabels return slot's labels
getkeylabels show key's labels
setslot set slot action, label ...
wipeslot wipe slot
wipekey wipe key
idletimeout OnlyKey locks after idletimeout is reached
keylayout set keyboard layout
idletimeout set idletimeout
wipemode set wipemode
keytypespeed set keytypespeed
ledbrightness set ledbrightness
storedkeymode set storedkeymode
derivedkeymode set derivedkeymode
backupkeymode set backupkeymode
2ndprofilemode set 2ndprofilemode
sysadminmode set sysadminmode
lockbutton set lockbutton
hmackeymode set hmackeymode
rng generate rng content
ping send ping
wink send wink command to key (blinks LED a few times).
setkey set key in a slot
init setup onlykey
credential credential actions
❯ python -m onlykey setslot -h
usage: __main__.py setslot [-h] id {label,ecckeylabel,rsakeylabel,url,addchar1,delay1,username,addchar2,delay2,password,addchar3,delay3,2fa,totpkey,addchar4,addchar5} value
positional arguments:
id
{label,ecckeylabel,rsakeylabel,url,addchar1,delay1,username,addchar2,delay2,password,addchar3,delay3,2fa,totpkey,addchar4,addchar5}
value
optional arguments:
-h, --help show this help message and exit
I have added a __main__.py file to help me test things more quickly from the shell.
Most of the commands should work as before. Even the interactive shell is still there.
I'm going to leave this here, in the hope somebody reviews the code and test it.
As said in issue #40, I've rewritten the client to use argparse, so that the users can have a better user experience.
I haven't tested every function, so there may be many bugs. Examples now:
I have added a
__main__.py
file to help me test things more quickly from the shell. Most of the commands should work as before. Even the interactive shell is still there. I'm going to leave this here, in the hope somebody reviews the code and test it.