Installing it
The command line is not yet published as a package, so today it is installed from the Cortex repository. You need Node 18 or newer and nothing else. Clone the repository, go to the folder that holds the tool (the repository’s own guide names it) and runnpm link; that puts a cortex command on your path. Running the tool’s script with node directly works the same way.
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. There is no switch for this in Settings yet, so the command line and the API are the ways to set it today.
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.
Using a service credential instead
Pass--ck with a service credential to run import, verify and upload 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.