Red Cliff Record CLI
Directory name is red-cliff-record; frontmatter name remains rcr — cross-link as /rcr.
The rcr CLI provides direct access to Red Cliff Record, a highly networked, manually curated knowledge base.
Source Of Truth
- Trust live CLI help and errors over this document if they diverge.
- The command surface is implemented in
src/server/cli/rcr/.
Live CLI Help
Run rcr --help before composing a command; the flags below are a summary, and the installed CLI is the source of truth. Report the CLI as unavailable if the command fails rather than guessing its surface.
Safety Defaults
- Prefer read commands first (
list, get, search) before mutations.
- Ask for confirmation before destructive operations:
rcr records delete ...
rcr records merge ...
rcr links delete ...
rcr db restore ...
rcr db reset ...
rcr db clone-prod-to-dev ...
- Use
--dry-run for destructive-capable db operations when available.
- Add
--limit to list/search commands unless the user explicitly wants broad output.
Global Behavior
- Default output: JSON wrapper
{"data":<result>,"meta":{"count":N,"duration":M}}
- Error output (stderr, exit code 1):
{ "error": { "code": "ERROR_CODE", "message": "..." } }
--raw outputs just data without {data,meta} wrapper.
--format=table prints human-readable tables.
- Global options:
--format=json|table
--raw
--limit=N
--offset=N
--dev (uses development DB connection)
--debug
--help, -h
--version, -v
- Practical note:
--limit and --offset are most useful on list/search commands. Some strict subcommands reject them.
- Boolean flags support all forms:
--flag
--flag=true
--flag=false
- Command alias:
record is accepted as records.
Data Model
- Records: entities, concepts, artifacts
- Links: typed edges between records
- Media: files/URLs attached to records (image, video, text, etc.)
- Sources: integration provenance on records
Command Reference
records
rcr records get <id...> [--links]
- Single ID returns one record or NOT_FOUND error
- Multi-ID returns array; missing records return
{ id, error: "NOT_FOUND" }
rcr records list [filters]
- Filters:
--type=entity,concept,artifact
--source=<comma-separated integration types>
ai_chat, airtable, browser_history, crawler, embeddings, feedbin, github, lightroom, manual, raindrop, readwise, twitter
--has-title[=BOOL]
--curated[=BOOL]
--private[=BOOL]
--parent[=BOOL]
--media[=BOOL]
--embedding[=BOOL]
--rating-min=N and --rating-max=N (0-3)
--order=field:dir,...
- Fields:
recordUpdatedAt, recordCreatedAt, title, contentCreatedAt, contentUpdatedAt, rating, id
- Direction:
asc|desc
--full to fetch complete records instead of ID-only rows
rcr records create '<json>'
rcr records update <id> '<json>'
rcr records bulk-update <id,id,...> '<json>'
rcr records delete <id...>
rcr records merge <sourceId> <targetId>
rcr records embed <id...>
rcr records tree <id...>
rcr records children <id>
rcr records parent <id>
media
rcr media get <id...> [--with-record]
rcr media list [filters]
--type=application|audio|font|image|message|model|multipart|text|video
--alt-text[=BOOL]
--record=<recordId>
--order=recordCreatedAt|recordUpdatedAt|id
--direction=asc|desc
rcr media create --record <id> --file <path> [--name <filename>] [--type <mime>]
rcr media create --record <id> --url <url>
- Exactly one of
--file or --url is required
rcr media update <id> '{"altText":"..."}'
rcr media generate-alt <id...> [--force]
search
- Hybrid (default):
rcr search <query> [--limit=N]
- Text:
rcr search text <query> [--type=entity|concept|artifact] [--limit=N]
- Semantic:
rcr search semantic <query> [--limit=N] [--exclude=id,id,...]
- Similar by record:
rcr search similar <id...> [--limit=N]
links
rcr links list <recordId> [--predicate=<slug>] [--direction=incoming|outgoing]
rcr links create '<json>'
- JSON shape:
{ sourceId, targetId, predicateId, notes? }
rcr links delete <id...>
rcr links predicates
browsing
rcr browsing daily <YYYY-MM-DD>
rcr browsing omit
rcr browsing omit-add <pattern> (SQL LIKE syntax, % wildcard)
rcr browsing omit-delete <pattern...>
github
rcr github daily <YYYY-MM-DD>
rcr github get <commitId>
sync
rcr sync
- Runs daily sync set, then enrichments:
- Daily integrations:
browsing, raindrop, readwise, github, airtable, twitter
- Then: avatars, alt-text, embeddings enrichments
rcr sync <integration>
- Valid integrations:
github, readwise, raindrop, airtable, adobe, feedbin, browsing, twitter, agents
- Single integration run is still followed by enrichments.
enrich
rcr enrich
- Runs all:
avatars -> alt-text -> embeddings
rcr enrich avatars
rcr enrich alt-text [--limit=N]
rcr enrich embeddings
--limit is only valid with rcr enrich alt-text.
db
rcr db backup <prod|dev> [--data-only] [--dry-run|-n]
rcr db restore <prod|dev> [--clean] [--data-only] [--file <path>|--file=<path>|-f <path>|-f=<path>] [--dry-run|-n] [--yes|-y]
- If
--file/-f is omitted, restore auto-selects the newest matching backup for the target environment:
- Data-only restore:
<target>-data-*.dump
- Full restore:
<target>-*.dump excluding <target>-data-*.dump
--dry-run uses a placeholder dump path when no matching file exists.
rcr db reset [dev] (dev only)
rcr db seed [dev] (dev only)
rcr db status
- Connection determined by
--dev flag / NODE_ENV. Use --dev for dev, omit for prod.
rcr db clone-prod-to-dev [--dry-run|-n] [--yes|-y]
fetch
rcr fetch url <url> [--content-only]
- Uses Jina Reader (
https://r.jina.ai/) to return parsed markdown.
Practical Examples
# Get one record with links
rcr records get 123 --links
# Find uncurated entities/concepts
rcr records list --type=entity,concept --curated=false --limit=25
# Bulk curate
rcr records bulk-update 101,202,303 '{"isCurated":true}'
# Find media missing alt text
rcr media list --type=image --alt-text=false --limit=50
# Generate alt text for specific media items
rcr media generate-alt 123 456 789 --force
# Hybrid search (default search mode)
rcr search "recursive prompting patterns" --limit=10
# Semantic search excluding known IDs
rcr search semantic "knowledge graphs" --exclude=12,34 --limit=15
# Add an omit pattern to browsing summaries
rcr browsing omit-add "%localhost%"
# Run one integration sync + automatic enrichments
rcr sync github --debug
# Run only alt-text enrichment with a smaller batch
rcr enrich alt-text --limit=20
# Preview a prod->dev clone without changes
rcr db clone-prod-to-dev --dry-run
# Emit raw output for downstream tooling
rcr records list --source=readwise --raw | jq '.[].id'
# Fetch clean markdown from a URL
rcr fetch url https://example.com/article --content-only --raw
1---2name: rcr3description: Use when the user mentions rcr, Red Cliff Record, personal knowledge base, records, links, graph-style queries, or sync/integration runs for that KB—even if they omit the tool name. Runs and interprets the `rcr` CLI.4---56# Red Cliff Record CLI78Directory name is `red-cliff-record`; frontmatter `name` remains `rcr` — cross-link as `/rcr`.910The `rcr` CLI provides direct access to Red Cliff Record, a highly networked, manually curated knowledge base.1112## Source Of Truth1314- Trust live CLI help and errors over this document if they diverge.15- The command surface is implemented in `src/server/cli/rcr/`.1617## Live CLI Help1819Run `rcr --help` before composing a command; the flags below are a summary, and the installed CLI is the source of truth. Report the CLI as unavailable if the command fails rather than guessing its surface.2021## Safety Defaults2223- Prefer read commands first (`list`, `get`, `search`) before mutations.24- Ask for confirmation before destructive operations:25 - `rcr records delete ...`26 - `rcr records merge ...`27 - `rcr links delete ...`28 - `rcr db restore ...`29 - `rcr db reset ...`30 - `rcr db clone-prod-to-dev ...`31- Use `--dry-run` for destructive-capable `db` operations when available.32- Add `--limit` to `list`/`search` commands unless the user explicitly wants broad output.3334## Global Behavior3536- Default output: JSON wrapper3738```json39{"data":<result>,"meta":{"count":N,"duration":M}}40```4142- Error output (stderr, exit code 1):4344```json45{ "error": { "code": "ERROR_CODE", "message": "..." } }46```4748- `--raw` outputs just `data` without `{data,meta}` wrapper.49- `--format=table` prints human-readable tables.50- Global options:51 - `--format=json|table`52 - `--raw`53 - `--limit=N`54 - `--offset=N`55 - `--dev` (uses development DB connection)56 - `--debug`57 - `--help`, `-h`58 - `--version`, `-v`59- Practical note: `--limit` and `--offset` are most useful on list/search commands. Some strict subcommands reject them.60- Boolean flags support all forms:61 - `--flag`62 - `--flag=true`63 - `--flag=false`64- Command alias: `record` is accepted as `records`.6566## Data Model6768- Records: entities, concepts, artifacts69- Links: typed edges between records70- Media: files/URLs attached to records (image, video, text, etc.)71- Sources: integration provenance on records7273## Command Reference7475### `records`7677- `rcr records get <id...> [--links]`78 - Single ID returns one record or NOT_FOUND error79 - Multi-ID returns array; missing records return `{ id, error: "NOT_FOUND" }`80- `rcr records list [filters]`81 - Filters:82 - `--type=entity,concept,artifact`83 - `--source=<comma-separated integration types>`84 - `ai_chat, airtable, browser_history, crawler, embeddings, feedbin, github, lightroom, manual, raindrop, readwise, twitter`85 - `--has-title[=BOOL]`86 - `--curated[=BOOL]`87 - `--private[=BOOL]`88 - `--parent[=BOOL]`89 - `--media[=BOOL]`90 - `--embedding[=BOOL]`91 - `--rating-min=N` and `--rating-max=N` (0-3)92 - `--order=field:dir,...`93 - Fields: `recordUpdatedAt, recordCreatedAt, title, contentCreatedAt, contentUpdatedAt, rating, id`94 - Direction: `asc|desc`95 - `--full` to fetch complete records instead of ID-only rows96- `rcr records create '<json>'`97- `rcr records update <id> '<json>'`98- `rcr records bulk-update <id,id,...> '<json>'`99- `rcr records delete <id...>`100- `rcr records merge <sourceId> <targetId>`101- `rcr records embed <id...>`102- `rcr records tree <id...>`103- `rcr records children <id>`104- `rcr records parent <id>`105106### `media`107108- `rcr media get <id...> [--with-record]`109- `rcr media list [filters]`110 - `--type=application|audio|font|image|message|model|multipart|text|video`111 - `--alt-text[=BOOL]`112 - `--record=<recordId>`113 - `--order=recordCreatedAt|recordUpdatedAt|id`114 - `--direction=asc|desc`115- `rcr media create --record <id> --file <path> [--name <filename>] [--type <mime>]`116- `rcr media create --record <id> --url <url>`117 - Exactly one of `--file` or `--url` is required118- `rcr media update <id> '{"altText":"..."}'`119- `rcr media generate-alt <id...> [--force]`120121### `search`122123- Hybrid (default): `rcr search <query> [--limit=N]`124- Text: `rcr search text <query> [--type=entity|concept|artifact] [--limit=N]`125- Semantic: `rcr search semantic <query> [--limit=N] [--exclude=id,id,...]`126- Similar by record: `rcr search similar <id...> [--limit=N]`127128### `links`129130- `rcr links list <recordId> [--predicate=<slug>] [--direction=incoming|outgoing]`131- `rcr links create '<json>'`132 - JSON shape: `{ sourceId, targetId, predicateId, notes? }`133- `rcr links delete <id...>`134- `rcr links predicates`135136### `browsing`137138- `rcr browsing daily <YYYY-MM-DD>`139- `rcr browsing omit`140- `rcr browsing omit-add <pattern>` (SQL `LIKE` syntax, `%` wildcard)141- `rcr browsing omit-delete <pattern...>`142143### `github`144145- `rcr github daily <YYYY-MM-DD>`146- `rcr github get <commitId>`147148### `sync`149150- `rcr sync`151 - Runs daily sync set, then enrichments:152 - Daily integrations: `browsing, raindrop, readwise, github, airtable, twitter`153 - Then: avatars, alt-text, embeddings enrichments154- `rcr sync <integration>`155 - Valid integrations:156 - `github, readwise, raindrop, airtable, adobe, feedbin, browsing, twitter, agents`157 - Single integration run is still followed by enrichments.158159### `enrich`160161- `rcr enrich`162 - Runs all: `avatars -> alt-text -> embeddings`163- `rcr enrich avatars`164- `rcr enrich alt-text [--limit=N]`165- `rcr enrich embeddings`166- `--limit` is only valid with `rcr enrich alt-text`.167168### `db`169170- `rcr db backup <prod|dev> [--data-only] [--dry-run|-n]`171- `rcr db restore <prod|dev> [--clean] [--data-only] [--file <path>|--file=<path>|-f <path>|-f=<path>] [--dry-run|-n] [--yes|-y]`172 - If `--file/-f` is omitted, restore auto-selects the newest matching backup for the target environment:173 - Data-only restore: `<target>-data-*.dump`174 - Full restore: `<target>-*.dump` excluding `<target>-data-*.dump`175 - `--dry-run` uses a placeholder dump path when no matching file exists.176- `rcr db reset [dev]` (dev only)177- `rcr db seed [dev]` (dev only)178- `rcr db status`179 - Connection determined by `--dev` flag / `NODE_ENV`. Use `--dev` for dev, omit for prod.180- `rcr db clone-prod-to-dev [--dry-run|-n] [--yes|-y]`181182### `fetch`183184- `rcr fetch url <url> [--content-only]`185- Uses Jina Reader (`https://r.jina.ai/`) to return parsed markdown.186187## Practical Examples188189```bash190# Get one record with links191rcr records get 123 --links192193# Find uncurated entities/concepts194rcr records list --type=entity,concept --curated=false --limit=25195196# Bulk curate197rcr records bulk-update 101,202,303 '{"isCurated":true}'198199# Find media missing alt text200rcr media list --type=image --alt-text=false --limit=50201202# Generate alt text for specific media items203rcr media generate-alt 123 456 789 --force204205# Hybrid search (default search mode)206rcr search "recursive prompting patterns" --limit=10207208# Semantic search excluding known IDs209rcr search semantic "knowledge graphs" --exclude=12,34 --limit=15210211# Add an omit pattern to browsing summaries212rcr browsing omit-add "%localhost%"213214# Run one integration sync + automatic enrichments215rcr sync github --debug216217# Run only alt-text enrichment with a smaller batch218rcr enrich alt-text --limit=20219220# Preview a prod->dev clone without changes221rcr db clone-prod-to-dev --dry-run222223# Emit raw output for downstream tooling224rcr records list --source=readwise --raw | jq '.[].id'225226# Fetch clean markdown from a URL227rcr fetch url https://example.com/article --content-only --raw228```