Installing it
The command line is published on npm as@oncortex/cli. You need Node 18 or newer and nothing else:
cortex on its path and Node is present, it may offer once to run that install for you; it never installs anything unasked.
Signing in
1
Copy the connection URL
In Cortex, open any brain’s Connect page, choose the Claude Code tab and copy the URL. It looks like
https://api.oncortex.ai/t/your-workspace-id/mcp.2
Run cortex login
3
Paste the address back if the browser is elsewhere
After you approve, the browser is sent to an address on the machine running the tool. If the browser is on that machine, the tool picks it up on its own. If the browser is somewhere else (you are signing in to a server from your laptop, say), that page will not load: copy the address the browser landed on and paste it into the terminal. Pass
--no-browser when you know in advance there is no browser.cortex logout forgets the login locally; the connection stays listed on the Connect page until you revoke it there. cortex whoami shows who you are, the inbox counts and the brains you can see, and cortex brains lists the brains alone. If you work in more than one workspace, sign in to each and pick one with --profile <name>.
Importing a folder of notes
The command line is the migration tool: it takes a folder of markdown files, the kind Obsidian or a git-backed notes folder holds, and turns it into a brain. Four commands, in order.1
Analyse the folder
2
Create the brain
blank, personal, company, strategy or client; --personal marks the new brain as yours at the same time. A deleted brain keeps its address, so a slug that belonged to one is refused: choose another.3
Import
--dry-run shows the plan without writing. A thousand new pages take about five minutes.4
Verify
Marking your brain as yours
cortex init is not until you say so, or pass --personal to init. The same mark is the Make this my personal brain button under the brain’s Settings, then General.
Putting a file in
--claim, Cortex files it on its next pass under the workspace’s monthly ingestion limit; --skill names the filing skill (ingest-doc, ingest-meeting, ingest-conversation or ingest) so the “is this worth filing” check is skipped. With --claim, the item is held by the agent that ran the command: that agent reads the text, writes the pages and archives the item, and Cortex’s own filer never touches it. --url records where the document lives, so a later version is recognised as a revision; --folder suggests where it should file, and --partition names the client in a partitioned brain.
Emptying a brain
--yes. Add --keep-instructions to leave the instructions page alone.
Is it still being fed?
--json for the whole
report.
Forwarders
forwarders lists them with their state and who added each; add sends the six-digit code to the address (write access on the brain, and an address you can read); verify confirms the code; remove takes one off, with effect from the next delivery, for the member who added it or an Admin. Add --json to forwarders for the rows.
Using a service credential instead
Pass--ck with a service credential to run import, verify, upload, health and mail against that credential’s brain without signing in, for example from a scheduled job. A credential is pinned to one brain, so init, connect and personal need a login.
Try it
- Run
cortex analyseon a folder of notes and read the proposed folder tree. - Import it into a new brain, then run
cortex verifyand check every count matches. - Run
cortex whoamiand confirm the brain is marked as yours.