尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證製作者的介紹僅有上面的一句話。 更多詳情請閱讀儲存庫 README。 儲存庫 README ↗
正在載入完整 README。
檢視完整 README ↗A personal index for the books you read: on paper, on Kindle, or as EPUBs read right in the app. When a page matters, write its number and one line in your own words. Link ideas across books and say why they're alike. Later, ask a question and Cairn walks your shelf and points to the book and the page. Installable on phone and laptop, works offline, syncs between devices.
Same family as margin and recall.
public/ (no React, no build step for the UI). Same setup as margin and recall.cairn_books, cairn_marks, cairn_links) and its private cairn-books storage bucket don't touch margin's or recall's.public/vendor/. Books render in a sandboxed frame with scripts off.app/api/suggest, app/api/ask, app/api/kindle and app/api/draft. app/api/koreader reads your Kindle's highlight files from your cloud folder; it doesn't call Claude. The key stays on the server and only ALLOWED_EMAIL can use it.app/api/suggest/route.js POST /api/suggest: a new mark → up to 3 marks that might be "like" it (owner only)
app/api/ask/route.js POST /api/ask: a question + your marks → the marks that answer it, a short answer, and what's missing (owner only)
app/api/kindle/route.js POST /api/kindle: up to 4 photos of a Kindle screen → your highlights, their location or page, and a drafted line (owner only)
app/api/draft/route.js POST /api/draft: imported highlights → a drafted one-line note for each, which you edit (owner only)
app/api/config/route.js served as /config.js: hands the browser the public Supabase URL and key
lib/server.js who is calling, and the call to Claude (same as recall's)
public/index.html markup
public/styles.css styles (tokens at the top; dark mode redefines them)
public/app.js all app logic, split into commented sections
public/sw.js offline cache (bump CACHE to force-refresh every device)
public/vendor/supabase.js pinned Supabase client (2.118.0, same file as recall)
public/vendor/epub.min.js pinned epub.js (0.3.93, BSD-2-Clause) for the reader
public/vendor/jszip.min.js pinned JSZip (3.10.1, MIT), which epub.js uses to open .epub files
supabase/schema.sql tables, row-level security
design/ the four directions explored first
docs/screens/ screenshots
supabase/schema.sql → Run. Safe to run again after updates. Nothing else to change: you sign in with your margin account.
cairn-books storage bucket with its policies). Until you do, Cairn keeps your shelf on this device and the sync status says Run supabase/schema.sql.git clone https://github.com/ajushibu/cairn.git
cd cairn
npm install
cp .env.local.example .env.local # same four values as recall's .env.local
npm run dev # http://localhost:3000
Sign in from the banner on the shelf (or ⋯ → Sign in) with your margin email and password.cairn (framework: Next.js, nothing to change). Add the env vars below, then deploy.public/, refresh localhost:3000. No build step for the UI.git add -A && git commit -m "what changed" && git push
Vercel deploys every push to main automatically, usually in under a minute.npm run build before pushing if you've touched anything in app/ or lib/.CACHE in public/sw.js.| Name | What |
|---|---|
SUPABASE_URL | Project URL (same as margin and recall) |
SUPABASE_PUBLISHABLE_KEY | Publishable (or legacy anon) key. Safe to expose; RLS does the locking. |
ANTHROPIC_API_KEY | Claude API key. Server only. |
ALLOWED_EMAIL | The only account allowed to use Claude in Cairn. |
CLAUDE_MODEL | Optional. Answers Look deeper and reads Kindle photos. Defaults to claude-sonnet-5-5. |
CLAUDE_QUICK_MODEL | Optional. Suggests matches for links and drafts lines for imported highlights. Defaults to claude-haiku-5-5. |
CLAUDE_EFFORT | Optional. low (default), medium, high or off. |
PCLOUD_AUTH | Optional. Kindle sync: a pCloud access token you make yourself (see Kindle sync). Never your password. |
PCLOUD_FOLDER | Optional. Kindle sync: the pCloud folder KOReader saves highlights to, e.g. /KOReader/highlights. |
PCLOUD_HOST | Optional. api.pcloud.com (default, US) or eapi.pcloud.com (Europe). |
KOREADER_WEBDAV_URL, KOREADER_WEBDAV_USER, KOREADER_WEBDAV_PASS | Optional. Kindle sync from any WebDAV folder instead of the pCloud API. The URL must be https://. |
updated_at; changes go up in batches, and each device pulls rows newer than the last server_ts it saw. If a device holds a different account's shelf, it asks before replacing it.The quickest way to capture is the moment something matters, with your phone beside the book:
Open a DRM-free EPUB and read it inside Cairn, marking lines as you go. Import → EPUB book (the ↓ button on the shelf), or ⋯ → Open an EPUB.
<your user id>/<book id>.epub, readable only by you. Another signed-in device downloads it the first time it opens the book. Files over 50 MB (the free plan's limit per file) stay on the device that opened them.Books can be Paper or Kindle (set it when you add or edit a book). Kindle books are numbered by location, plus the page when the book has real page numbers; the index, Revisit and Ask show whichever the book uses. Mark a Kindle spot by hand with the Location / Page switch, or import highlights. Import is the ↓ button on the shelf, or ⋯ → Import from Kindle.
documents → My Clippings.txt, and choose that file. It's read on your device with no AI. Cairn lists the books in it with how many highlights are new; tick the ones you want. Highlights you later extended are merged, your Kindle notes are attached to the highlight they belong to and become its line, and importing the same file again only adds what's new. The notebook export from the Kindle app (an .html file it emails you) works too. English-language Kindles only for now.Highlights made on a Kindle running KOReader with the HighlightSync plugin reach Cairn without any steps from you:
.json file per book to your cloud folder whenever the Kindle is online./api/koreader to read that folder. The server reads only the files that changed since the last check.Set up (once)
https://api.pcloud.com/userinfo?getauth=1&logout=1&username=YOUR_EMAIL&password=YOUR_PASSWORD&authexpire=31536000&authinactiveexpire=31536000 and copy the auth value from the reply. (A European account uses eapi.pcloud.com here and as PCLOUD_HOST.) Clear that page from your history afterwards.PCLOUD_AUTH (the token), PCLOUD_FOLDER and, for a European account, PCLOUD_HOST. Redeploy.
If that link says "Log in failed" (common when you sign in to pCloud with Google or Apple, have two-step login, or have a special character in your password), use pCloud's own login page instead: create an app under My Apps at https://docs.pcloud.com/my_apps/ (any redirect address, such as https://example.com/), then open https://my.pcloud.com/oauth2/authorize?client_id=YOUR_APP_KEY&response_type=token&redirect_uri=YOUR_REDIRECT, sign in and allow. The address you land on ends in #access_token=…&hostname=…. Use that access_token as PCLOUD_AUTH and that hostname as PCLOUD_HOST.If it says the login was not accepted, the token has expired: make a new one and update PCLOUD_AUTH. Not on pCloud? Any WebDAV folder works through KOREADER_WEBDAV_*. Cairn never stores your Amazon login, and the token only lives in your Vercel settings.
Reading EPUBs and marking them costs nothing; book files use Supabase Storage (1 GB on the free plan, so a few hundred typical EPUBs). Suggest matches, Look deeper, Draft lines and reading photos are all buttons, so nothing is sent or billed unless you tap one. The clippings file costs nothing. Look deeper sends every mark: 300 marks is roughly 8,000 tokens in and a few hundred out, which is about 2–3 US cents at Sonnet-class prices of about $3 / $15 per million tokens. Suggest matches and Draft lines use the smaller Haiku model and cost less. A photo is shrunk to about 1,500 × 1,100 pixels before it's sent, roughly 1,600 tokens, so reading one costs on the order of half a cent to a cent. Check Anthropic's pricing page for current numbers. Supabase and Vercel free tiers cover the rest.
design/ were drawn before the margin and recall look was applied. They used MarginNote and Recall AI as references by mistake. Direction A, the index, was picked.