Files
prompt/README.md
T
TZGyn a09f7b3196 Make the composer wrap and grow, and surface Launch at Login
Long prompts hit a single-line field before; the composer is now an
NSTextView that wraps and grows up to seven lines, keeps Return as send,
and uses Shift+Return for a newline. Launch at Login already existed in
the menu bar icon's right-click menu, so it is now also a toggle in the
sync panel where it is easier to find.
2026-10-16 22:28:16 +08:00

105 lines
4.4 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Prompt
A native macOS app for keeping prompts and photos, in the spirit of
[Copper](https://shadcn.com/copper) by shadcn: a floating panel that sits next
to your work. Select what you need and send it back to your clipboard.
- **Click to select** — clicking a card selects it (Shift+click for a range),
and the selection bar copies a single item as-is, the whole selection as a
numbered list or as plain newline-separated lines, or deletes it.
- **Text or photo** — copying sends text back as text and a photo back as an
image.
- **Capture from anywhere** — select text in any app and tap **Left Shift twice**.
- **Photos** — paste (Cmd+V), drag & drop, or add via the photo button.
- **A composer that grows** — long prompts wrap and the input grows up to seven
lines, then scrolls. Return sends, Shift+Return inserts a newline.
- **Launch at Login** — toggle in the sync panel (Cmd+,) or the menu bar icon's
right-click menu, to start Prompt on boot.
- **Workspaces** — type `# Name` in the composer, or use "New Workspace" in
the Cmd+K switcher (which opens a name modal); Cmd+K switches, and the
up/down arrows in the switcher reorder them. (The code and the saved JSON
still call these `sections` so existing data keeps working.)
- **Right-click for actions** — Copy, Copy as List, Copy as Lines, Mark as Done,
Edit, Open, Merge Notes, Move To, Delete — each acting on the whole selection.
- **Search** — Cmd+F searches across all workspaces.
- **Sync (optional)** — generate an 8-digit code (`1234-5678`) on one Mac and
enter it on the other; no account, no login. The code is the only secret.
- **Local & private** — everything lives in
`~/Library/Application Support/Prompt/` (`store.json` + `Images/`). No
account, no sync, no telemetry.
## Shortcuts
| Action | Shortcut |
| --- | --- |
| Capture current selection | Left Shift ×2 (or Cmd+Shift+C) |
| Show/hide panel | Right Shift ×2 (or Cmd+Shift+Space) |
| Switch/create workspace | Cmd+K |
| Search | Cmd+F |
| Focus composer | Cmd+N |
| New line in composer | Shift+Return |
| Sync settings | Cmd+, |
| Copy selection as numbered list | Shift+Cmd+C |
| Copy selection as plain lines | Option+Cmd+C |
| Clear selection | Esc |
| Close panel | Esc |
Double-Shift gestures require **Accessibility access** (Prompt reads the
selection by simulating Cmd+C, then restores your clipboard untouched). Until
it is granted, use Cmd+Shift+Space and Cmd+Shift+C, or click the menu bar icon
— and launching the app again always brings the panel back. Bare keys like
Space and Cmd+C are deliberately not bound inside the panel so they never
conflict with typing in the composer.
## Install
```bash
brew tap TZGyn/tap https://gitea.tzgyn.dev/TZGyn/homebrew-tap.git
brew trust TZGyn/tap
brew install --cask prompt
```
## Sync server
Sync is optional and needs the small Go backend in `Server/`. There is no
authentication: a sync group is identified by an 8-digit code, and whoever has
the code can read and write the group.
```bash
createdb prompt_sync
cd Server
PROMPT_SYNC_DATABASE_URL="postgres://localhost:5432/prompt_sync?sslmode=disable" \
go run . # listens on :8080
```
Or build the Docker image (`docker build -t prompt-sync Server/`) and point it
at your own Postgres — see [Server/README.md](Server/README.md) for that and for
deploying to a host.
Then in the panel: click the sync icon (or Cmd+,), confirm the server URL, and
either **Generate Code** on the first Mac or paste the code into **Join** on the
other.
Notes:
- Sync defaults to `https://prompt.tzgyn.dev`; change it in the sync panel to
point at your own server. Both Macs must be able to reach it — a LAN address
or a Tailscale hostname works, and `localhost` only works if the server runs
on the same Mac. See [Server/README.md](Server/README.md) to deploy it.
- Joining a group that already has notes replaces what's on that Mac.
- The app polls every 5 seconds (a tiny version check) and pushes 1.5s after a
change; last write wins, and changes that came from the server are not echoed
back.
- Verify sync from a terminal with `Prompt --sync-check`.
## Build from source
```bash
swift build # debug build
swift run Prompt # dev run (menu bar icon appears)
./build-app.sh 0.1.0 # release build + Prompt.app + icon + codesign
./release.sh 0.1.0 # build + dist/Prompt.zip (+ notarization when configured)
```
Requires macOS 14+.