aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md104
1 files changed, 59 insertions, 45 deletions
diff --git a/README.md b/README.md
index b99fa27..33cd0a7 100644
--- a/README.md
+++ b/README.md
@@ -2,104 +2,118 @@
**Encrypted Notes, Oui.**
-A CLI tool for creating, editing, and managing encrypted notes with passphrase or SSH key authentication.
+[View Better Docs](https://stigr.org/eno.html)
-## Install
+Eno is a Linux CLI tool for encrypted notes authenticated by your SSH key — no
+cloud, no daemon, no extra passwords.
-```bash
-go install gitlab.com/whiteboardguy/eno/cmd/eno@latest
-```
+## Motivation
+
+I wanted encrypted notes designed for linux. Not the gnupg all-in-one mess, nor
+something as "javascripty" as Notesnook (*amazing tho*). Something for the
+terminal. Something quite simple. Something that could be synced and backed up
+using just git (TBD).
-Or download a binary from the [releases page](https://gitlab.com/whiteboardguy/eno/-/releases).
+<!-- TODO: add terminal recording or GIF showing eno in action -->
-## Quickstart
+## Quick Start
```bash
-# initialize config
eno init
-
-# create a passphrase-protected note
eno new my-note
-
-# create and open in editor immediately
eno new my-note -e
-
-# create an SSH-authenticated note
eno new my-note --ssh
-
-# decrypt and edit an existing note
eno edit my-note
```
+## Install
+
+Install Go if you don't have it:
+
+```bash
+# Arch Linux
+sudo pacman -S go
+# Fedora
+sudo dnf install golang
+# Debian / Ubuntu
+sudo apt install golang
+```
+
+Then install eno:
+```bash
+go install gitlab.com/whiteboardguy/eno/cmd/eno@latest
+```
+
## Usage
### `eno init`
-Create default config at `~/.config/eno/eno.conf` (or `$XDG_CONFIG_HOME/eno/eno.conf`).
+Creates default config in `~/.config/eno/eno.conf` (`$XDG_CONFIG_HOME/eno/eno.conf`).
### `eno new <note>`
-Create encrypted note. Note name defaults to `~/.EnoNotes/<note>.eno`. Use `-o` to specify custom output path.
+Creates encrypted note. Defaults to `~/.EnoNotes/<note>.eno`. Use `-o` for custom path.
-Flags:
-- `-o, --output` — output file path
-- `-e, --edit` — open editor after creating
-- `--ssh` — use SSH key for authentication instead of passphrase
+| Flag | Description |
+|---|---|
+| `-o, --output` | Output file path |
+| `-e, --edit` | Open editor after creating |
+| `--ssh` | Use SSH key instead of passphrase |
### `eno edit <note>`
-Decrypt note to temp file, open editor, re-encrypt on save. Temp file is securely wiped on exit.
+Decrypts, opens in editor, re-encrypts on save. Temp file securely wiped on exit.
### `eno encrypt <file>`
-Encrypt any file with a passphrase. Output defaults to `<file>.eno`.
+Encrypts any file with passphrase. Output defaults to `<file>.eno`.
-Flags:
-- `-o, --output` — output file path
+| Flag | Description |
+|---|---|
+| `-o, --output` | Output file path |
### `eno decrypt <file>`
-Decrypt a `.eno` file. Output defaults to `<file>` (with `.eno` stripped).
+Decrypts `.eno` file. Output defaults to `<file>` (`.eno` stripped).
-Flags:
-- `-o, --output` — output file path
+| Flag | Description |
+|---|---|
+| `-o, --output` | Output file path |
### `eno ssh init`
-Register an SSH key for note authentication. Writes key paths into config. Supports Ed25519 keys only with passphrase-protected private keys.
+Registers SSH key for note auth. Writes key paths to config. Ed25519 only,
+passphrase-protected private keys required.
## Configuration
-File: `~/.config/eno/eno.conf` (or `$XDG_CONFIG_HOME/eno/eno.conf`)
+`~/.config/eno/eno.conf` (`$XDG_CONFIG_HOME/eno/eno.conf`)
| Key | Default | Description |
|---|---|---|
-| `EDITOR_STRING` | `$EDITOR %s` or `nvim %s` | Editor command template. `%s` is replaced with temp file path |
-| `DATA_DIR` | `~/.EnoNotes` | Directory for encrypted notes |
-| `SSH_INIT` | `false` | Whether SSH has been initialized |
-| `DEFAULT_SSH_PRIV` | — | Path to default SSH private key |
-| `DEFAULT_SSH_PUB` | — | Path to default SSH public key |
+| `EDITOR_STRING` | `$EDITOR %s` or `nvim %s` | Editor command template. `%s` replaced with temp file path |
+| `DATA_DIR` | `~/.EnoNotes` | Encrypted notes directory |
+| `SSH_INIT` | `false` | SSH initialized flag |
+| `DEFAULT_SSH_PRIV` | — | Default SSH private key path |
+| `DEFAULT_SSH_PUB` | — | Default SSH public key path |
-## File Format
-
-Encrypted `.eno` files use a custom format:
+## How It Works
```
<header-length>:<gob-encoded headers><ChaCha20-Poly1305 ciphertext>
```
-- Header length is ASCII decimal, terminated by `:`
-- Headers contain salt, nonce, auth type (passphrase or SSH), and per-recipient wrapped keys
-- Ciphertext is encrypted with ChaCha20-Poly1305
-
-## Cryptography
+- `header-length` — ASCII decimal, `:`-terminated
+- Headers — salt, nonce, auth type (passphrase or SSH), per-recipient wrapped keys
+- Ciphertext — ChaCha20-Poly1305 encrypted
| Mode | Key Derivation | Cipher |
|---|---|---|
| Passphrase | Argon2id (1 pass, 2MB memory, 2 parallelism) | ChaCha20-Poly1305 |
| SSH | X25519 ECDH ephemeral key exchange per recipient | ChaCha20-Poly1305 |
-SSH mode converts Ed25519 keys to X25519 for ECDH. A random 32-byte note key is encrypted per recipient.
+Ed25519 keys converted to X25519 for ECDH. 32-byte random note key encrypted
+per recipient.
## Build from source