Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Cueward
Local memory and automation for AI agents on macOS.
Cueward is a Unix-style CLI for agents that need structured access to native macOS data and actions. It reads Safari, Notes, Reminders, Calendar, Messages, Voice Memos, Stickies, Quick Notes, and Apple Shortcuts locally, then returns machine-friendly JSON that agents can actually use.
It is designed for agent workflows first:
- Native macOS reach: SQLite reads, AppleScript, EventKit, Vision OCR, and Shortcuts integration
- Agent-friendly output: structured JSON instead of chatty terminal prose
- Local-first privacy: no cloud APIs, no scraping proxy, no third-party data backend
- Practical automation: diagnose permissions with
cueward doctor, then read, capture, search, and act
Common use cases:
- Give an agent a searchable local memory layer for what you read, saved, and wrote on macOS
- Build Shortcuts programmatically from CLI or spec files
- Read reminders and calendar events fast enough for background agents and daily briefings
- Capture Safari, Notes, screenshots, clipboard, and OCR results into a local index
Most first-time macOS integrations require system permissions before they work. If a command fails immediately on first use, check Privacy & Security settings first, grant the needed access, then run it again.
Install
Install the latest published release from crates.io:
To build from the local repo instead:
Requires Rust 1.85+ (edition 2024).
What's New in 0.3.0
Cueward 0.3.0 adds several major capabilities and reliability improvements:
- Shortcuts CLI: create, run, rename, move, apply/export spec, Share Sheet setup, and action editing
cueward doctor: audit Full Disk Access, Automation, and optional Safari live probes before using integrations- Reminders reads moved to EventKit-first with AppleScript fallback, removing the previous multi-second read bottleneck on supported setups
- Calendar reads moved to EventKit-first with AppleScript fallback
- Notes attachment support expanded, including drawing attachments and richer structured attachment enrichment
macOS Permissions
Cueward reads local databases that require Full Disk Access:
- Open System Settings > Privacy & Security > Full Disk Access
- Add your terminal app (Termdock, Terminal.app, iTerm2, WezTerm, etc.)
For Apple Notes, Reminders, and Calendar operations, also allow automation:
- System Settings > Privacy & Security > Automation > allow your terminal to control Notes, Reminders, and Calendar
Some integrations may additionally require:
- Accessibility / 輔助使用 for UI scripting style automations
- app-specific data access via Full Disk Access when reading container files
Calendar / Reminders Read Access
As of 0.3.0, Cueward prefers EventKit for reminders and calendar read commands because it is dramatically faster and more reliable than app scripting.
cueward reminders listcueward reminders todaycueward reminders list --due-tomorrowcueward calendar listcueward calendar today
For Reminders, allow the terminal app to read reminders when macOS prompts for access.
For Calendar, newer macOS versions may expose more than one permission level. Depending on your system language/version, you may see labels similar to:
取用/僅寫入完整取用
If Calendar only has write-only access, Cueward will fall back to AppleScript for reads. That keeps commands working, but calendar list / calendar today can be much slower on some calendars. For the best performance, grant Calendar full access / 完整取用 to your terminal app.
Usage
Discover Commands
Use the built-in Clap help to explore the CLI surface:
# Top-level command list
# Subcommand-specific help
# Alternative form
This is the fastest way to see the current command tree and flags, especially as new integrations land.
Capture
Extract knowledge fragments from local sources:
# Everything from the last 24 hours
# Safari only, last 7 days
# Apple Notes, last 3 hours
Safari
Read current Safari tabs, not just browsing history:
# List all open tabs
# Filter by Safari profile name parsed from window title
# Current active tab in the front window
# Open a new tab
# Close current tab or a specific tab index in the front window
# Read current page text or a specific element
# Read full HTML source
# Execute JavaScript / DOM actions in the active tab
# Target a specific tab by index or URL/title match
# Scroll the page
# Close multiple tabs by profile or URL pattern
# List bookmark/folder items from the Safari bookmarks root
# Scope bookmarks to a specific Safari profile folder
# Traverse nested bookmark folders inside a profile
# Folder paths use "/" as the separator; folder titles containing "/" are not supported
# in this first version
# Search bookmarks recursively from the root or a profile folder
# Add a bookmark into a nested folder inside a profile
# Delete by exact title + URL within a profile folder
Safari AI
Control web-based AI providers (Gemini, ChatGPT) via Safari automation. Uses URL navigation and execCommand — no fragile DOM clicking, no focus stealing.
# Send a prompt (general chat)
# Switch to a specific mode first
# Deep Research with auto-confirm
# Switch mode only (no prompt)
# List conversations from sidebar
# Read a conversation's text content (reports, chat history)
# Poll an in-progress Deep Research
# Save AI-generated images as PNG
# Download video/music via browser (triggers Safari native download)
# Use a specific Safari profile
Supported Gemini modes: deep-research, image, video, music.
Read Reddit via public old.reddit.com/*.json endpoints. These commands do not use Safari automation.
# Read a subreddit feed
# Read a post plus top-level comments
# Search posts globally or inside one subreddit
Repeated scans may return status metadata such as fresh, unchanged, skipped, warning, or deleted, with data omitted when the target is skipped or confirmed deleted.
Outputs JSON to stdout:
Triage
Auto-tag and index captured cues:
Reads from ~/.cueward/inbox/, applies keyword-based auto-tagging, and writes to a local BM25 index.
Configure auto-tagging in ~/.cueward/tags.toml:
[]
= ["Rust", "cargo", "crate", "rustc"]
[]
= ["AI", "LLM", "ChatGPT", "Claude", "GPT"]
[]
= ["stock", "ETF", "investment"]
Search
Query the local index:
Send
Create a digest note in Apple Notes and optionally trigger a macOS notification:
# Create a note
# With notification
# Pipe from capture
|
Plan
Create a reminder in Apple Reminders:
Reminders
Read and manage Apple Reminders:
# List all reminders
# Filter by reminders list
# Reminders due today
# Create a reminder
# Update a reminder by id or title
# Mark complete
# Delete
Outputs JSON with title, notes, due_date, completed, and list_name.
OCR
Extract text from images or PDFs via Apple Vision Framework:
Supports PNG, JPG, PDF. Languages: zh-Hant, zh-Hans, en-US, ja.
Notes Management
Update, delete, or move Apple Notes:
# Create a note
# Update a note's body
# Delete a note
# Move between folders
Calendar
Query and manage Apple Calendar events:
# Today's events
# Events in a time range
# Filter by calendar
# Create an event
# Delete an event (matches by title + start time)
# Update an event
Datetime format: ISO 8601 (2026-04-11T14:00:00) or YYYY-MM-DD HH:MM.
Shortcuts
Create and manage Apple Shortcuts, including declarative spec workflows:
# List shortcuts
# Create a blank shortcut
# Show one shortcut as a high-level YAML-like spec
# Set accepted input and attach Share Sheet surface
# Append actions incrementally
# Control flow
# Spec-based workflow
# Rename, move, and run
Selector-based commands generally accept either --name or --id.
Screenshot
Capture a screenshot, optionally with OCR:
# Capture main screen
# With OCR text extraction
# Specific display (1=main, 2=secondary, 3=third)
# List capturable windows
# Capture a specific window
# Capture a specific window with OCR
# Custom output path
Clipboard
Read and write the system clipboard:
# Read clipboard (text or image)
# Save clipboard image to a specific path
# Write text to clipboard
Text content returns JSON with "type": "text". Image content is saved as PNG and returns "type": "image" with the file path.
Doctor
Run a read-only macOS preflight before using integrations that depend on permissions:
# Human-readable summary
# Machine-readable report
# Opt-in Safari JavaScript probe
doctor checks:
- filesystem / Full Disk Access access to the current local data sources
- Apple Events / Automation access for Notes, Reminders, Calendar, and Safari
- an optional Safari JavaScript probe that reuses the normal Safari guard path
The JSON output includes stable check IDs such as fda.messages.chat_db, automation.notes, and live.safari.js.
Quick Notes
List, update, archive, and delete system Quick Notes (快速備忘錄):
# List all Quick Notes
# Update a Quick Note's body
# Delete a Quick Note
# Archive a Quick Note into a regular note, then remove it from Quick Notes
# Create a note in the Quick Notes folder
Quick Notes are identified by the system ZISSYSTEMPAPER flag — notes created via the macOS Quick Note gesture (hot corner, Apple Pencil, etc.). list, update, and delete operate on these system-tagged notes regardless of which folder they reside in. create places a regular note in the "Quick Notes" folder but does not mark it as a system Quick Note.
archive is the cleanup workflow for real Quick Notes: it copies the note into a regular destination folder, waits for the new note to appear, and deletes the original Quick Note so it disappears from the Quick Notes smart view. This preserves link URLs, but Apple Notes rich-link cards may be flattened into normal links in the archived copy.
Voice Memos
Read Voice Memos metadata from the local shared database:
# List all voice memos
# Read one voice memo by id
Outputs JSON with id, title, duration_seconds, timestamp, and path.
Stickies
Manage Stickies notes from the desktop:
# List notes
# Create a note
# Update a note
# Delete a note
Use cueward stickies --help to inspect the geometry and color flags for create / update.
Agent Integration
Cueward outputs structured JSON — it does not call any LLM. The LLM layer is your Agent's responsibility.
Pipe to an Agent
# Claude Code
|
# Gemini CLI
|
As a Skill
A reference skill for Claude Code is included in skills/cueward-agent/. Copy it to your skills directory to teach Claude how to use Cueward automatically:
&&
Architecture
crates/
├── core/ Cue types, adapter trait, inbox/state/index, shortcuts spec model
├── cli/
│ ├── main.rs CLI entrypoint
│ └── commands/ Per-command clap enums, dispatch, and parse tests
├── adapter-macos/
│ ├── applescript.rs Shared AppleScript helpers
│ ├── bookmarks/ Safari bookmarks CRUD + plist tree operations
│ ├── calendar.rs Apple Calendar CRUD + AppleScript fallback
│ ├── calendar_eventkit.rs EventKit-backed calendar reads
│ ├── clipboard.rs Clipboard read / write
│ ├── doctor/ Full Disk Access / Automation diagnostics
│ ├── messages.rs iMessage capture
│ ├── notes/ Apple Notes CRUD, capture, DB reads, attachments
│ ├── ocr.rs Vision OCR
│ ├── plan.rs Reminder creation shortcut command
│ ├── quick_notes.rs Quick Notes workflows
│ ├── reddit/ Reddit JSON API reads and scan-state integration
│ ├── reminders.rs Apple Reminders read / write + AppleScript fallback
│ ├── reminders/eventkit.rs EventKit-backed reminder reads
│ ├── safari/ Tabs, history, AI providers, social feeds
│ ├── safari_guard.rs Shared Safari rate limit + file lock guard
│ ├── scan_state.rs Shared polling / target state tracking
│ ├── screenshot/ Screen/window capture + OCR integration
│ ├── shortcuts/ Shortcuts DB compiler, installer, and tests
│ ├── stickies/ Stickies CRUD, geometry, color, state
│ └── voice_memos.rs Voice Memos metadata reads
└── adapter-windows/ Reserved for future cross-platform support
- Core Engine + Adapter Pattern: Platform-specific code is isolated in adapters. Core logic is platform-agnostic.
- Native First: Direct SQLite reads, AppleScript, EventKit, and Vision Framework. No cloud APIs and no browser-driving frameworks in the normal data path.
- Privacy: All data extraction happens locally. Nothing leaves your machine.
Data Storage
~/.cueward/
├── inbox/ Captured cues awaiting triage
├── processed/ Triaged cues moved out of inbox
├── index/ Tantivy BM25 search index and lock files
├── cache/
│ ├── ocr/ OCR result cache keyed by SHA256
│ ├── screenshots/ Screenshot captures
│ └── clipboard/ Clipboard image captures
├── state.json High watermark timestamps and scan target state
├── tags.toml Auto-tagging keyword rules
└── lock.json Safari automation lock / rate-limit coordination
Additional app- or tool-specific scratch directories may appear under ~/.cueward/ over time, but the paths above are the stable managed data layout that Cueward itself depends on.
License
MIT