| 1 | # jotts |
| 2 | |
| 3 | Minimal markdown notes. Single binary with subcommands: |
| 4 | |
| 5 | - `jotts` — launch TUI (default, no args). |
| 6 | - `jotts tui [--remote URL --api-key KEY]` — TUI editor (Bubble Tea). |
| 7 | - `jotts server` — HTTP server (web UI + JSON API). |
| 8 | - `jotts auth` — save remote URL + API key to config. |
| 9 | - `jotts <file.md>` — upload file as a new note via the JSON API. |
| 10 | |
| 11 | ## Install |
| 12 | |
| 13 | **Homebrew:** |
| 14 | |
| 15 | ```bash |
| 16 | brew install stevedylandev/tap/jotts |
| 17 | ``` |
| 18 | |
| 19 | **Curl install (Linux/macOS):** |
| 20 | |
| 21 | ```bash |
| 22 | curl -fsSL https://raw.githubusercontent.com/stevedylandev/andromeda/main/install.sh | sh -s -- jotts |
| 23 | ``` |
| 24 | |
| 25 | **PowerShell (Windows):** |
| 26 | |
| 27 | ```powershell |
| 28 | & ([scriptblock]::Create((irm https://raw.githubusercontent.com/stevedylandev/andromeda/main/install.ps1))) jotts |
| 29 | ``` |
| 30 | |
| 31 | **Prebuilt binary:** Grab the right archive from the [releases page](https://github.com/stevedylandev/andromeda/releases?q=jotts%2F) and drop the binary somewhere on your `$PATH`. |
| 32 | |
| 33 | **From source:** |
| 34 | |
| 35 | ```bash |
| 36 | git clone https://github.com/stevedylandev/andromeda |
| 37 | cd andromeda/apps/jotts |
| 38 | go build . |
| 39 | ``` |
| 40 | |
| 41 | ## Stack |
| 42 | |
| 43 | - Go stdlib `net/http` + `html/template` |
| 44 | - `modernc.org/sqlite` (pure-Go SQLite, no CGO) |
| 45 | - `github.com/yuin/goldmark` (markdown w/ strikethrough, tables, tasklists) |
| 46 | - Bubble Tea / Lip Gloss / Glamour for the TUI |
| 47 | - `github.com/pkg/browser` and `github.com/atotto/clipboard` for TUI actions |
| 48 | |
| 49 | ## Quickstart |
| 50 | |
| 51 | Server: |
| 52 | |
| 53 | ```bash |
| 54 | cp .env.example .env |
| 55 | # edit .env with your password |
| 56 | go run . server |
| 57 | ``` |
| 58 | |
| 59 | TUI: |
| 60 | |
| 61 | ```bash |
| 62 | go run . |
| 63 | ``` |
| 64 | |
| 65 | ## Environment variables |
| 66 | |
| 67 | | Variable | Description | Default | |
| 68 | |---|---|---| |
| 69 | | `JOTTS_PASSWORD` | Login password | `changeme` | |
| 70 | | `JOTTS_DB_PATH` | SQLite file path | `jotts.sqlite` | |
| 71 | | `HOST` | Bind address | `127.0.0.1` | |
| 72 | | `PORT` | Server port | `3000` | |
| 73 | | `COOKIE_SECURE` | HTTPS-only cookies | `false` | |
| 74 | | `JOTTS_API_KEY` | API key for `/api/notes` (unset = API disabled) | _(unset)_ | |
| 75 | |
| 76 | ## API |
| 77 | |
| 78 | All endpoints require `x-api-key: $JOTTS_API_KEY` header. |
| 79 | |
| 80 | - `GET /api/notes` — list notes |
| 81 | - `POST /api/notes` — create `{title, content}` |
| 82 | - `GET /api/notes/{short_id}` |
| 83 | - `PUT /api/notes/{short_id}` — update `{title, content}` |
| 84 | - `DELETE /api/notes/{short_id}` |
| 85 | |
| 86 | ## Build |
| 87 | |
| 88 | ```bash |
| 89 | CGO_ENABLED=0 go build -o jotts . |
| 90 | ``` |
| 91 | |
| 92 | Single self-contained binary with all assets embedded. |
| 93 | |
| 94 | ## Docker |
| 95 | |
| 96 | ```bash |
| 97 | docker compose up -d |
| 98 | ``` |