The hkeydb command
- The hkeydb command provides a simple way to create or modify Hyperkey database files, which are where Hyperkey stores records that define the keys, what resources they refer to, and what actions to take upon those resources.
- Hyperkey database files are ordinary text files, and editable using normal text editors such as the 'Notepad' program. They are required to have a specific structure and internal syntax, which is discussed in the section on "Database File Format" .
-
hkeydb [-new [-project "<project-name>"]]
- Starts the Database Editor sub-command layer.
- Any options on the command-line that begin with a dash ('-') will have the same result as would entering that option (without the dash) as a response to the sub-command prompt below.
- For example, if the -new option is passed, it will perform the 'new' sub-command.
-
The hkeydb menu and command prompt
-
The hkeydb command displays a menu that shows the various
commands available, and prompts the user to enter a command.
This menu displays upon startup after processing any commands
passed on the command line, and looks like this:
-
--------------------------------------------
HYPERKEY DATABASE EDITOR
--------------------------------------------
DATABASE COMMANDS:
new Create a new database
init Add a new server path level to database
k or <Enter> Add a new key to current database
list or fk List/Find key in database
db Set current database
a Add an alias to an existing key
ss Set SERVER to current directory
c Clear screen
? Display this menu
?? Display command help menu
x Exit the program
COMMAND?
-
- The COMMAND? prompt is displayed after each command finishes, so that multiple actions can be done to a database in one session.
- At each prompt, the user enters a database sub-command, which the hkeydb sub-command processor then carries out.
- The user closes the program by responding with the 'x' sub-command.
-
The hkeydb database sub-commands
-
new
- Creates a new Hyperkey database file in the current directory, named "_hkey.db.txt", and makes it the Hyperkey 'current database'.
- If the hkeydb command was invoked from the right-click menu in Windows, the 'current directory' will be set from the file or folder that was clicked upon.
- For more detail, see the "Database 'new' Sub-command" page.
-
init
- Initializes the server location data for a new Hyperkey database file that was just created using the new sub-command above. The server paths will be constructed based upon the current directory.
- If the hkeydb command was invoked from the right-click menu in Windows, the 'current directory' will be set from the file or folder that was clicked upon.
- The init sub-command applies the changes to the 'current' database file, which if run right after the new sub-command will be the new one just created.
- For more detail, see the "Database 'init' Sub-command" page.