Skip to content

Commit

Permalink
docs: update README
Browse files Browse the repository at this point in the history
  • Loading branch information
Zaphoood committed Dec 3, 2023
1 parent 664f6c2 commit fbfe32c
Showing 1 changed file with 48 additions and 16 deletions.
64 changes: 48 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,42 +31,74 @@ This will save the executable to the working directory.
## Usage

To open a file, run `tresor <file>`. Alternatively, run just `tresor` and input the filename when prompted.
After entering your password, the KeePass database should open.

After inputting your password, the KeePass database should open.
Navigate using the `h`, `j`, `k` and `l` keys, type `:q` and hit <kbd>Enter</kbd> to exit.
Navigate using the `h`, `j`, `k` and `l` keys, type `:q` and hit `Enter` to exit.

### Key bindings

**Quick reference:**

| Key | Action |
| --------- | ------------------------------------------------------- |
| `j` / `k` | Go up / down |
| `h` | Leave group or entry |
| `l` | Enter focused group or entry |
| `y` | Copy password of focused entry or field value |
| `d` | Delete focused field value |
| `u` | Undo last change |
| `C-r` | Redo change |
| `c` | Change title of focused entry or value of focused field |

When hovering over an entry, press `y` to copy its password to the system clipboard.
After focusing an entry with `h` or <kbd>Enter</kbd>, you can select and copy specific fields (again using `y`).
After focusing an entry with `h` or `Enter`, you can select individual fields and copy their value (also using `y`).
For encrypted values, the clipboard will be cleared automatically after ten seconds.

Commands work just like in vim: To execute a command, type `:` followed by the command and press <kbd>Enter</kbd>.
To delete a field, select it and press `d`. Some fields (i. e. title, username and password) are special: They won't be
deleted, instead their value will be set to an empty string. This is because KeePass considers these fields 'default
fields', and they should always be present for any given entry.

Note that deleting entries or groups is not implemented yet.

Entries can be renamed by pressing `c` and entering a new name. As with `y`, you can also change individual fields by
selecting them and pressing `c`.

To undo any change, press `u`. To redo, press `C-r`.

### Searching

To search through the current group, type `/` (or `?` for backward search) followed by a query, and press `Enter`.
Cycle through matches using `n` and `N` for the next and last result, respectively.

### Commands

Commands work just like in vim: To execute a command, type `:` followed by the name of the command and optionally some
arguments; then, press `Enter`.
These commands are currently available:

| Command | Action |
| ----------- | ----------------------------------------------------------------------- |
| `:q` | Quit without saving |
| `:w` | Save file. Specify path with `:w <file>` |
| `:wq`, `:x` | Save file and quit. Specifying the path works analogous to `:w` |
| `:e` | Reload current file (You will be prompted to enter your password again) |
| `:e <file>` | Load `<file>` from disk |
| Command | Action |
| --------------------- | ----------------------------------------------------------------------- |
| `:q` | Quit without saving |
| `:w` | Save file. Specify path with `:w <file>` |
| `:wq`, `:x` | Save file and quit. Specifying the path works analogous to `:w` |
| `:e` | Reload current file (You will be prompted to enter your password again) |
| `:e <file>` | Load `<file>` from disk |
| `:change <new-value>` | Set value of focused entry / field to `<new-value>` (shortcut: `c`) |

Note that currently, the `:w` command is pretty much useless, since editing entries is not supported, so it's not possible to actually make changes to a file. However, the last selected group is, in fact, stored and remembered when re-opening.

To search through the current group, type `/` (or `?` for backward search), followed by a query, and press <kbd>Enter</kbd>.
Cycle through matches using `n` and `N`.

## Roadmap

This project is at a very early stage. Here is the short list of what is possible right now:
This project is at an early stage. Here is the list of what's possible right now:

- Load and save `.kdbx` files of version 3.1
- Navigate groups and entries
- Preview entries
- Copy passwords to clipboard
- Editing entries (kind of)

Some features planned for the future are:

- Editing entries
- Fuzzy-finding
- Creating new databases
- Customization via config file (inculding color scheme)
Expand Down

0 comments on commit fbfe32c

Please sign in to comment.