Skip to content

lb capture

Terminal window
lb capture [url] [options]

lb capture adds content to your knowledge graph. It accepts a URL to fetch and process, a local file to upload, a short inline note, or content piped from stdin.

Inputs are resolved in the following priority order. Only one source is used per invocation.

Priority Source How to trigger
1 File upload --file <path>
2 URL Positional argument
3 Inline note --note <text>
4 Stdin pipe Pipe content to lb capture
Option Type Description
--why <text> string Required. Why you are saving this. Used for ranking and recall.
--note <text> string Short inline note. Used as content when no URL or file is provided.
--title <text> string Override the auto-detected title.
--type <type> string Content type hint. See content types below.
--file <path> string Path to a local file to upload. Max 25 MB.
--json flag Output raw JSON.
--api-url <url> string Override the API base URL.
Type Description
article Web article or blog post (default for URLs)
tweet Twitter/X post
repo GitHub or similar code repository
pdf PDF document
audio Audio file
note Plain-text note (default for --note and stdin)
video Video content
image Image file

When --type is omitted, the CLI infers the type from the URL domain or file extension.

Input Limit
File upload (--file) 25 MB
Stdin pipe 5 MB

Capture a URL:

Terminal window
lb capture https://example.com/article --why "reference for the auth redesign"

Capture a quick note:

Terminal window
lb capture --note "Check the Drizzle docs for batch insert syntax" --why "ongoing reference"

Pipe content from stdin:

Terminal window
curl -s https://example.com/raw.md | lb capture --why "downloaded spec"

Upload a local PDF:

Terminal window
lb capture --file ./report.pdf --why "Q4 analysis" --type pdf

Override the title and type:

Terminal window
lb capture https://github.com/org/repo --why "dependency audit" --type repo --title "Org Monorepo"

Output as JSON for scripting:

Terminal window
lb capture https://example.com --why "research" --json | jq '.id'