-
-
Notifications
You must be signed in to change notification settings - Fork 96
Capture from Anywhere
The /capture endpoint accepts plain HTTP POST requests — no MCP required. This lets you get ideas in from anywhere: a browser, your phone, a script, a cron job.
The second-brain-browser-extension is the fastest way to capture from a browser. One click saves the current page; highlight text first to capture your selection alongside the source.
- Clone or download the repo
- Go to
chrome://extensions, enable Developer mode, click Load unpacked, and select the folder - On first launch, the extension opens a setup page — enter your Worker URL and auth token and click Save
- Capture a page — click the extension icon, optionally add a note, then click Capture
- Capture a highlight — select text on the page first; the popup shows a "Highlighted" badge and includes your selection in the saved content
- The extension calls
/capturewithsource: "extension"and any#hashtagsyou include in the note are auto-extracted as tags
Install the CLI once and capture from any terminal session.
npm install -g second-brain-cf-cliOn first run, brain will prompt for your Worker URL and token.
# Store something
brain remember "switched to pnpm for all new projects"
# Recall by meaning
brain recall "package manager decisions"
# Browse recent entries
brain list
# Append to an existing entry
brain append <id> "follow-up detail here"Full command reference: CLI repo
Create a bookmark and paste this as the URL. Replace YOUR_WORKER_URL and YOUR_TOKEN first.
javascript:(function(){
const WORKER='https://YOUR_WORKER_URL/capture';
const TOKEN='YOUR_TOKEN';
const text=window.getSelection().toString().trim();
const content=text?`${text}\n\n${document.title}\n${location.href}`:`${document.title}\n${location.href}`;
fetch(WORKER,{method:'POST',headers:{'Authorization':`Bearer ${TOKEN}`,'Content-Type':'application/json'},body:JSON.stringify({content,source:'browser',tags:['reading']})})
.then(r=>r.json())
.then(()=>{
const b=document.createElement('div');
b.textContent='✓ Saved to brain';
Object.assign(b.style,{position:'fixed',top:'20px',right:'20px',zIndex:'99999',background:'#1a1a1a',color:'#fff',padding:'10px 16px',borderRadius:'8px',fontSize:'14px'});
document.body.appendChild(b);
setTimeout(()=>b.remove(),2000)
})
.catch(()=>alert('Capture failed — check your token and Worker URL'));
})();Click with nothing selected to save the page title and URL. Highlight text first to save your selection alongside the source.
The full commented source is in bookmarklet.js.
Three shortcut templates are available in the ios Shortcuts/ folder.
- Download a template from the links below
- Open it in the Shortcuts app and tap Add Shortcut
- Edit the shortcut and replace
YOUR_WORKER_URLandYOUR_TOKENwith your values
Hands-free voice capture. Say "Hey Siri, Brain Dump" and it starts recording. When you pause, your dictation is sent to the Worker automatically.
Steps to build manually:
- New Shortcut → Dictate Text (stop: after pause)
- Get Contents of URL → POST to
/capture- Header:
Authorization: Bearer YOUR_TOKEN - Body (JSON):
content= Dictated Text,source=voice
- Header:
- Show Notification → "Saved ✓"
Type what's on your mind. Good for when you can't speak out loud.
Download Text Brain Dump template
Steps to build manually:
- New Shortcut → Ask for Input (prompt: "What's on your mind?", type: Text)
- Get Contents of URL → same POST config,
source=phone - Show Notification → "Saved ✓"
Save any link or article directly from Safari or any app via the share sheet.
Download Save to Brain template
Steps to build manually:
- New Shortcut → enable Show in Share Sheet (accepts: URLs, Articles, Text)
- Get Name of Shortcut Input
- Get URLs from Shortcut Input
- Text action combining name + URL
- Get Contents of URL → same POST config,
source=browser,tags=["reading"] - Show Notification → "Saved ✓"
Go to Settings → Accessibility → Touch → Back Tap → Double Tap → select Brain Dump. Two taps on the back of your phone starts voice capture instantly.
Want whole Notion pages in your brain rather than one-off notes? The Notion Integration mirrors any page you share with it into memory and keeps it synced as you edit it in Notion.