aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorishaan <contact@ishaan.cc>2026-07-14 21:21:53 +0530
committerishaan <contact@ishaan.cc>2026-07-14 21:21:53 +0530
commit6b33b7a8abf03d15a8164ff207547f45475e737e (patch)
treed5f1407ff32393393884ab8832f291c3c08e42ec
parent46531992e3ecd724e0c4cedaca30c3abc5a3ed4d (diff)
docs: end-user README with install, usage, config, crypto
-rw-r--r--README.md108
1 files changed, 107 insertions, 1 deletions
diff --git a/README.md b/README.md
index 6ab7173..b99fa27 100644
--- a/README.md
+++ b/README.md
@@ -1,2 +1,108 @@
# Eno
-*(Encrypted Notes, Oui.)*
+
+**Encrypted Notes, Oui.**
+
+A CLI tool for creating, editing, and managing encrypted notes with passphrase or SSH key authentication.
+
+## Install
+
+```bash
+go install gitlab.com/whiteboardguy/eno/cmd/eno@latest
+```
+
+Or download a binary from the [releases page](https://gitlab.com/whiteboardguy/eno/-/releases).
+
+## Quickstart
+
+```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
+```
+
+## Usage
+
+### `eno init`
+
+Create default config at `~/.config/eno/eno.conf` (or `$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.
+
+Flags:
+- `-o, --output` — output file path
+- `-e, --edit` — open editor after creating
+- `--ssh` — use SSH key for authentication instead of passphrase
+
+### `eno edit <note>`
+
+Decrypt note to temp file, open editor, re-encrypt on save. Temp file is securely wiped on exit.
+
+### `eno encrypt <file>`
+
+Encrypt any file with a passphrase. Output defaults to `<file>.eno`.
+
+Flags:
+- `-o, --output` — output file path
+
+### `eno decrypt <file>`
+
+Decrypt a `.eno` file. Output defaults to `<file>` (with `.eno` stripped).
+
+Flags:
+- `-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.
+
+## Configuration
+
+File: `~/.config/eno/eno.conf` (or `$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 |
+
+## File Format
+
+Encrypted `.eno` files use a custom format:
+
+```
+<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
+
+| 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.
+
+## Build from source
+
+```bash
+go build -o eno ./cmd/eno
+```