CLI › Commands
Brain
Create and edit notes, organize folders, upload files and search the Brain from the command line.
The Brain holds what agents consult: manuals, policies, price lists, minutes, contracts. It works like an Obsidian vault: Markdown notes, in folders, connected by [[Note name]]. From the CLI you keep the Brain up to date from folders, repositories and jobs.
doublex brain list | folders | get | search | create | update | upload | deleteCreate and edit notes#
doublex brain create "Meeting with Acme" --folder Clients/Meetings --content "Next steps with [[Acme]]. #meeting"
cat minutes.md | doublex brain create "Minutes 10/29" --folder Minutes --content -
doublex brain update kno_2c4e6a8b0d1f --content-file policy.md| Option | What for |
|---|---|
--folder <folder> | Note folder, like Clients/Meetings. Default: the root. |
--content <text> | Note text. Use - to read from stdin, or --content-file <file>. |
--scope, --team-id | Who can see the note (on create only). Default: personal. |
If a note with the same name already exists in the folder, the new one gets a number (Minutes 10/29 1).
Rename and move#
doublex brain update kno_2c4e6a8b0d1f --title "Refund and cancellation policy"
doublex brain update kno_2c4e6a8b0d1f --folder Sales/PoliciesLinks in other notes you can edit follow the change, as in Obsidian. The CLI shows how many links changed. Use --no-update-links to leave them alone.
Upload files#
doublex brain upload refund-policy.pdf --folder Sales
doublex brain upload docs/*.md --scope team --team-id team_9c8b7a6d5e4f
doublex brain upload contract.docx --title "Standard contract 2026"
doublex brain upload manual.pdf --replace kno_7e9f1a3b5c2d| Option | What for |
|---|---|
--folder <folder> | Destination folder. |
--scope personal|team|organization | Who can see it. Default: personal. organization requires being an admin. |
--team-id <id> | The team, when the scope is team. See the IDs with doublex teams list. |
--title <title> | Note name (only when you upload one file). Default: the file name. |
--replace <id> | Replaces an existing note's text with the file's. The ID, name and linked agents stay. |
Accepted formats: PDF, Word (.docx), Excel (.xlsx), CSV, JSON, Markdown and text. Each file can be up to 20 MB. Scanned (image-only) PDFs and password-protected files are refused, because they have no text to extract.
Search#
doublex brain search "refund period" --limit 5
doublex brain search "tag:#client plan"
doublex brain search "path:Sales \"30 days\" -draft"Search ignores accents and capitalization and shows the most relevant passages with their note. It's the same search agents use. The tag:, path:, file:, "exact phrase" and -word operators filter notes, as in Obsidian.
List, read and delete#
doublex brain list
doublex brain list --folder Clients
doublex brain folders
doublex brain get kno_2c4e6a8b0d1f > policy.md
doublex brain delete kno_2c4e6a8b0d1f --yeslist shows the path, the size in characters, the scope and how many agents use each note. get prints the text. delete also removes the note from the agents that used it.
Link a note to an agent#
Uploading a note isn't enough: the agent only consults the notes linked to it. Link them in the agent screen or from the CLI:
doublex agents update agt_8f3a2b1c9d0e --args-json '{"knowledgeIds": ["kno_2c4e6a8b0d1f", "kno_7e9f1a3b5c2d"]}'The agent searches passages and can also open a whole note by name, following the [[links]] between the notes linked to it.
Keep the Brain up to date#
An example job that replaces a manual's text every time it changes, without changing its ID (agents stay linked):
#!/bin/sh
set -e
ID=$(doublex brain list --json | jq -r '.docs[] | select(.path == "Manuals/manual.pdf") | .id')
if [ -n "$ID" ]; then
doublex brain upload manual.pdf --replace "$ID"
else
doublex brain upload manual.pdf --folder Manuals --scope organization
fi