# notion-cli-agent

> Notion CLI with AI agent support. Smart queries, Obsidian sync, batch ops, backups, validation and more.

- **URL**: https://www.freshcrate.ai/projects/notion-cli-agent
- **Author**: Balneario-de-Cofrentes
- **Category**: AI Agents
- **Latest version**: `v0.19.0` (2026-04-08)
- **License**: MIT
- **Source**: https://github.com/Balneario-de-Cofrentes/notion-cli-agent
- **Homepage**: https://www.npmjs.com/package/notion-cli-agent
- **Language**: TypeScript
- **GitHub**: 84 stars, 14 forks
- **Registry**: github
- **Tags**: `agent-first`, `agentskills`, `ai-agent`, `cli`, `llm-tools`, `nodejs`, `notion`, `notion-api`, `typescript`

## Description

Notion CLI with AI agent support. Smart queries, Obsidian sync, batch ops, backups, validation and more.

## Recent releases

| Version | Date | Urgency | Changes |
| --- | --- | --- | --- |
| `v0.19.0` | 2026-04-08 | High | ## What's new  ### Added  - **`page edit --find/--replace-text`** — search-and-replace within a page via native markdown API. Single PATCH call, no block position calculations. `--replace-all` replaces all occurrences.    ```bash   notion page edit <id> --find "DRAFT" --replace-text "FINAL"   notion page edit <id> --find "old text" --replace-text "new text" --replace-all   ```  - **`comment create --markdown`** — create comments with markdown formatting.    ```bash   notion comment create --page |
| `v0.17.0` | 2026-04-08 | Medium | ## Changed  **`page read` now uses Notion's native markdown API** — 1 API call instead of N recursive block fetches.  ```bash notion page read <page_id>           # native markdown (default) notion page read <page_id> --blocks  # legacy block-by-block conversion ```  Benefits: - Supports block types we don't convert client-side (columns, synced blocks, callouts, meeting notes) - Massive reduction in API calls for large pages - `truncated` warning for very large pages (>20k blocks)  MCP `page_get |
| `v0.16.0` | 2026-04-07 | Medium | ## New features  ### Workspace sync ```bash notion sync          # cache all databases locally notion list          # show cached databases (no API call) notion list --json   # for scripts ```  ### Database names everywhere No more copying UUIDs — use names in any database command: ```bash notion db query "Tasks" --llm --limit 5 notion find "Projects" "overdue" --llm notion stats overview "OKRs" notion validate health "Tasks" notion dedup "Contacts" --fuzzy ```  Resolution: exact > case-insensit |
| `v0.15.0` | 2026-04-07 | Medium | ## New features  ### notion doctor ```bash notion doctor # ✅ Token: Token found and configured # ✅ API Connection: Authenticated as Klaus (bot) # ✅ Workspace Access: Integration has access to workspace content # ✅ API Version: 2026-03-11 # ✅ CLI Version: 0.15.0 # 5/5 checks passed ```  ### Database lookup by name No more copying UUIDs: ```bash notion db query "Proyectos" --llm --limit 5 notion db get "Clases 2026" --json ```  Resolves via `~/.config/notion/workspace.json` first, then API search. |
| `v0.14.0` | 2026-04-06 | Medium | ## MCP Server Mode  Run notion-cli-agent as an MCP tool server for agent frameworks:  ```bash notion --mcp ```  ### Configure in Claude Code ```json {   "mcpServers": {     "notion": {       "command": "notion",       "args": ["--mcp"],       "env": { "NOTION_TOKEN": "ntn_your_token" }     }   } } ```  ### 14 tools exposed `search`, `page_get`, `page_create`, `page_update`, `db_query`, `db_schema`, `block_children`, `block_append`, `find`, `batch`, `inspect_workspace`, `comment_create`, `validat |
| `v0.13.0` | 2026-04-06 | Medium | ## New command: `notion dedup`  Find and clean duplicate pages in any database.  ```bash # Find duplicates notion dedup <db_id> notion dedup <db_id> --fuzzy      # catches "Page (copy)", "Page - OLD"  # Clean duplicates notion dedup <db_id> --fix --strategy keep-largest --yes notion dedup <db_id> --fix --strategy keep-newest --yes notion dedup <db_id> --fix --strategy keep-oldest --yes ```  \| Strategy \| Keeps \| Best for \| \|----------\|-------\|----------\| \| `keep-largest` \| Most blocks \| Content p |
| `v0.12.0` | 2026-04-06 | Medium | ## New output modes  Unix-friendly output formats for composability with standard tools.  ```bash # Export database as CSV notion db query <db_id> --csv > tasks.csv  # Tab-separated for spreadsheets notion db query <db_id> --tsv \| pbcopy  # Pipe IDs into other commands notion db query <db_id> --ids-only \| xargs -I {} notion page archive {}  # Count search results notion search "bugs" --ids-only \| wc -l ```  \| Flag \| Commands \| Output \| \|------\|----------\|--------\| \| `--csv` \| `db query`, `find` |
| `v0.11.1` | 2026-04-03 | Medium | ### Fixed  - **Schema-aware property types in `page create` and `page update`** — `--prop "Status=In Progress"` no longer fails when the property is a `status` type. The CLI now fetches the database schema to resolve ambiguous types instead of guessing from the value format. Type hints still take precedence. (#31) - **Multiple `--filter` flags with AND logic** — passing multiple `--filter` flags to `db query` now correctly combines them with AND instead of silently dropping all but the last one. |
| `v0.11.0` | 2026-03-21 | Low | ## Changed  - **Notion API upgraded from `2025-09-03` to `2026-03-11`** — no user-facing CLI changes - Archive/trash: `archived` field → `in_trash` (centralized via `buildTrashPayload()`) - Block positioning: `after` string → `position: { after_block: id }` (centralized via `buildBlockPosition()`) - `transcription` → `meeting_notes` block type: not applicable (unused in codebase)  769 tests, 0 failures.  ### Install ```bash npm install -g notion-cli-agent@0.11.0 ``` |
| `v0.10.0` | 2026-03-21 | Low | ## New features  ### Deterministic search ```bash notion search "Known Title" --exact --first --json   # one result or exit 1 notion search "task" --db <db_id>                     # filter by parent database notion search "keyword" --llm                         # compact: [type] id title ```  ### Exact title query ```bash notion db query <db_id> --title "Known Page"          # auto-detects title property notion db query <db_id> --llm                         # compact output ```  ### Type-aware p |

## Citation

- HTML: https://www.freshcrate.ai/projects/notion-cli-agent
- Markdown: https://www.freshcrate.ai/projects/notion-cli-agent.md
- Dependencies JSON: https://www.freshcrate.ai/api/projects/notion-cli-agent/deps

_Generated by freshcrate.ai. Indexes github releases for AI-agent ecosystem packages._
