Skip to content

Capture from Anywhere

Rahil P edited this page Jul 3, 2026 · 6 revisions

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.


Browser extension

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.

Install

  1. Clone or download the repo
  2. Go to chrome://extensions, enable Developer mode, click Load unpacked, and select the folder
  3. On first launch, the extension opens a setup page — enter your Worker URL and auth token and click Save

Usage

  • 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 /capture with source: "extension" and any #hashtags you include in the note are auto-extracted as tags

CLI

Install the CLI once and capture from any terminal session.

npm install -g second-brain-cf-cli

On 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


Browser bookmarklet

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.


iOS Shortcuts

Three shortcut templates are available in the ios Shortcuts/ folder.

Install

  1. Download a template from the links below
  2. Open it in the Shortcuts app and tap Add Shortcut
  3. Edit the shortcut and replace YOUR_WORKER_URL and YOUR_TOKEN with your values

Brain Dump (voice)

Hands-free voice capture. Say "Hey Siri, Brain Dump" and it starts recording. When you pause, your dictation is sent to the Worker automatically.

Download Brain Dump template

Steps to build manually:

  1. New Shortcut → Dictate Text (stop: after pause)
  2. Get Contents of URL → POST to /capture
    • Header: Authorization: Bearer YOUR_TOKEN
    • Body (JSON): content = Dictated Text, source = voice
  3. Show Notification → "Saved ✓"

Text Brain Dump

Type what's on your mind. Good for when you can't speak out loud.

Download Text Brain Dump template

Steps to build manually:

  1. New Shortcut → Ask for Input (prompt: "What's on your mind?", type: Text)
  2. Get Contents of URL → same POST config, source = phone
  3. Show Notification → "Saved ✓"

Save to Brain (share sheet)

Save any link or article directly from Safari or any app via the share sheet.

Download Save to Brain template

Steps to build manually:

  1. New Shortcut → enable Show in Share Sheet (accepts: URLs, Articles, Text)
  2. Get Name of Shortcut Input
  3. Get URLs from Shortcut Input
  4. Text action combining name + URL
  5. Get Contents of URL → same POST config, source = browser, tags = ["reading"]
  6. Show Notification → "Saved ✓"

Back tap (bonus)

Go to Settings → Accessibility → Touch → Back Tap → Double Tap → select Brain Dump. Two taps on the back of your phone starts voice capture instantly.


Notion

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.

Clone this wiki locally