Skip to content

Latest commit

 

History

19 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cortex — a second brain for your notes

Run it · Your notes · Features · Setup

"Obsidian is the IDE, the LLM is the programmer, the wiki is the codebase."

You write raw notes. Claude compiles them into a linked, cited wiki. A web app, a spaced-repetition engine, and a calendar sit on top. Git is the source of truth.

Run it

  1. git clone https://github.com/AnikethCheluva/cortex && cd cortex/web
  2. npm install
  3. npm run dev

Open http://localhost:3000. It runs on the bundled demo vault. Total time: about 2 minutes.

Cortex — Overview and recall dashboard

Point it at your notes

Pick one. The helper writes VAULT_PATH to web/.env.local.

  1. Your own vaultnode scripts/use-vault.mjs /path/to/your/vault (a folder with sources/ and wiki/).
  2. Empty start — the default. Just run npm run dev.
  3. The worked demonode scripts/use-vault.mjs examples/demo-vault.

How it works

sources/   →  INPUT.  You write raw notes, by life area.
wiki/      →  OUTPUT. Claude builds the linked, cited pages.
CLAUDE.md  →  RULES.  How sources become the wiki.

You never hand-edit the wiki. A new note triggers an ingest. Claude creates and links pages, flags contradictions, and updates the index. Every claim cites a source.

Features

Feature What it does
Daily notes Dated notes with a rich editor, checkboxes, and inline LaTeX.
Voice notes Dictate with the on-device Web Speech API — no key, no upload.
Recall Keyless FSRS. Claude writes cards from your notes and grades answers. A dashboard tracks true retention.
Calendar Google + Outlook via client-side OAuth. Plus a toggleable "Planned" overlay of project deliverables.
Wiki Interlinked pages, one concept each, filed by type.
Tasks A git-backed task board with projects and priorities.
Docs Google-Docs-style long-form documents, saved as wiki sources.
Notion import Pull Notion pages and databases in as markdown sources.
Themes Six palettes, including a light one. Switch from the header.
Customizable Reorder or hide tabs, and arrange the Overview widget board.
Login Optional password gate, enforced on writes as well as the UI.
Clients Raycast, iOS Shortcuts, and a Slack bot.
Today — recall quiz + voice notes Calendar with the Planned overlay
Wiki pages by type Task board

Everything is markdown and JSON in git. The web UI edits the files. See it all populated with node scripts/use-vault.mjs examples/demo-vault.

How recall works

Cortex turns your notes into active-recall flashcards and schedules each one for the moment just before you would forget it. This is spaced repetition, built in.

A card is made from your notes. On each ingest, Claude reads what you wrote and writes atomic question-and-answer cards. Each card is one fact, grounded in a quote from the source.

You review on the Today tab. The day's quiz shows one question at a time. Recall the answer, type it, then reveal the reference to check yourself. Rate how sure you were.

Grading needs no API key. The app only captures your answer. The next ingest — which is the LLM — grades it against the card's reference answer.

FSRS picks the next date. Each card carries a memory model (stability + difficulty). FSRS schedules the next review to hit a target recall probability, 90% by default — the point where the review is hardest and sticks best. A card you skip is never penalized. It stays due and comes back, most-at-risk first.

The dashboard tracks retention. The Overview tab shows true 30-day retention on graduated cards, your review streak, a due forecast, memory-stability spread, and confidence calibration.

Make it yours

Open Settings (the gear, top right). Everything is saved per browser and never touches the repo.

  • Theme — six palettes (Notebook, Midnight, Graphite, Forest, Plum, and the light Parchment). Switch from the header or Settings → Appearance.
  • Tabs — reorder the nav, or hide tabs you never open.
  • Overview widgets — reorder, hide, and add widgets: streak, tasks, today's note, knowledge base, upcoming deliverables, recent docs, activity, recall. Pick 2 or 3 cards per row.

Setup

Everything below is optional. The app works without it.

Require a login

Set one environment variable:

APP_PASSWORD=your-password

The app then opens on a sign-in screen. The session is a stateless HMAC in an httpOnly cookie, and the write API enforces it server-side — so it gates real access, not just the interface. Leave it unset and the app opens with no login.

Import from Notion

Settings → Notion import pulls Notion pages and databases into sources/notion/ as markdown, so the next /ingest compiles them into the wiki like any other source.

  1. Create an internal integration at notion.so/my-integrations and copy the secret.
  2. In Notion, open a page → ⋯ → Connections → your integration. It only sees pages shared with it.
  3. Paste the secret in Settings, load your pages, tick what you want, import.

The secret stays in your browser and is passed per request — never committed, never stored on the server.

Google Calendar

Full steps + Outlook: web/CALENDAR.md. Short version:

  1. Google Cloud Console → enable the Google Calendar API.
  2. OAuth consent screenExternal → add your account as a Test user.
  3. CredentialsOAuth client IDWeb application. Add your origins to Authorized JavaScript origins: https://<your-project>.vercel.app and http://localhost:3000.
  4. Set NEXT_PUBLIC_GOOGLE_CLIENT_ID in Vercel. Redeploy.

Error 403: access_denied? Add your Google account as a Test user (step 2). Match the origin exactly — no trailing slash.

Install on iPhone (home-screen app)

  1. Open your deployed URL in Safari.
  2. ShareAdd to Home ScreenAdd.

It launches full-screen with the dark theme. For one-tap capture, add the iOS Shortcuts.

Slack bot

Full steps: tooling/slackbot/README.md. It turns /wiki <verb> into a headless Claude run on your vault.

Deploy the web app

Set GITHUB_TOKEN + GITHUB_REPO so the app commits your edits. See web/.env.example and web/DEPLOY.md.

Layout

web/                 Next.js web app — the main interface
clients/             Raycast extension + iOS Shortcuts
tooling/             The Slack bot (setup + env)
.claude/             Slash commands that drive Claude's wiki work
examples/vault/      Empty starter vault (the default)
examples/demo-vault/ The worked demo (optional, deletable)
CLAUDE.md            The rules: how sources become the wiki

License

MIT — see LICENSE.

About

A personal knowledge system where you write raw notes and an LLM compiles them into a synthesized wiki — web app, spaced-repetition, calendar planner, and clients included. Runs on clone.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages