{"id":45211001,"url":"https://github.com/4ier/notion-cli","last_synced_at":"2026-04-07T03:02:34.829Z","repository":{"id":339237231,"uuid":"1160977040","full_name":"4ier/notion-cli","owner":"4ier","description":"Work seamlessly with Notion from the command line. Full Notion API coverage in a single binary.","archived":false,"fork":false,"pushed_at":"2026-04-06T22:37:11.000Z","size":6166,"stargazers_count":109,"open_issues_count":1,"forks_count":9,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-07T00:28:22.603Z","etag":null,"topics":["ai-agents","cli","developer-tools","go","notion","notion-api","terminal"],"latest_commit_sha":null,"homepage":"https://github.com/4ier/notion-cli","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/4ier.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-18T15:40:23.000Z","updated_at":"2026-04-06T22:36:54.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/4ier/notion-cli","commit_stats":null,"previous_names":["4ier/notion-cli"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/4ier/notion-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/4ier%2Fnotion-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/4ier%2Fnotion-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/4ier%2Fnotion-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/4ier%2Fnotion-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/4ier","download_url":"https://codeload.github.com/4ier/notion-cli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/4ier%2Fnotion-cli/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31498070,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-06T17:22:55.647Z","status":"online","status_checked_at":"2026-04-07T02:00:07.164Z","response_time":105,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-agents","cli","developer-tools","go","notion","notion-api","terminal"],"created_at":"2026-02-20T16:30:18.973Z","updated_at":"2026-04-07T03:02:34.823Z","avatar_url":"https://github.com/4ier.png","language":"Go","funding_links":[],"categories":["APIs"],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n  notion-cli\n\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cb\u003eLike \u003ccode\u003egh\u003c/code\u003e for GitHub, but for Notion. 39 commands. One binary.\u003c/b\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/4ier/notion-cli/releases/download/v0.2.0/demo.gif\" alt=\"demo\" width=\"640\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/4ier/notion-cli/releases\"\u003e\u003cimg src=\"https://img.shields.io/github/v/release/4ier/notion-cli?style=flat-square\" alt=\"Release\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/4ier/notion-cli/actions\"\u003e\u003cimg src=\"https://img.shields.io/github/actions/workflow/status/4ier/notion-cli/test.yml?style=flat-square\u0026label=tests\" alt=\"Tests\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/4ier/notion-cli/blob/main/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/github/license/4ier/notion-cli?style=flat-square\" alt=\"License\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://goreportcard.com/report/github.com/4ier/notion-cli\"\u003e\u003cimg src=\"https://goreportcard.com/badge/github.com/4ier/notion-cli?style=flat-square\" alt=\"Go Report Card\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n---\n\nA full-featured command-line interface for [Notion](https://notion.so). Manage pages, databases, blocks, comments, users, and files — all from your terminal. Built for developers and AI agents who need programmatic access without the browser.\n\n## Install\n\n### Homebrew (macOS/Linux)\n```sh\nbrew install 4ier/tap/notion-cli\n```\n\n### Go\n```sh\ngo install github.com/4ier/notion-cli@latest\n```\n\n### npm\n```sh\nnpm install -g notion-cli-go\n```\n\n### Scoop (Windows)\n```powershell\nscoop bucket add 4ier https://github.com/4ier/scoop-bucket\nscoop install notion-cli\n```\n\n### Docker\n```sh\ndocker run --rm -e NOTION_TOKEN ghcr.io/4ier/notion-cli search \"meeting\"\n```\n\n### Binary\n\nDownload from [GitHub Releases](https://github.com/4ier/notion-cli/releases) — available for Linux, macOS, and Windows (amd64/arm64).\n\n## Quick Start\n\n```sh\n# Authenticate\necho \"ntn_xxxxx\" | notion auth login --with-token\n\n# Search your workspace\nnotion search \"meeting notes\"\n\n# Query a database with filters\nnotion db query \u003cdb-id\u003e --filter 'Status=Done' --sort 'Date:desc'\n\n# Create a page in a database\nnotion page create \u003cdb-id\u003e --db \"Name=Weekly Review\" \"Status=Todo\"\n\n# Read page content as Markdown\nnotion block list \u003cpage-id\u003e --depth 3 --md\n\n# Append blocks from a Markdown file\nnotion block append \u003cpage-id\u003e --file notes.md\n\n# Raw API escape hatch\nnotion api GET /v1/users/me\n```\n\n## Commands\n\n| Group | Commands | Description |\n|-------|----------|-------------|\n| **auth** | `login` `logout` `status` `switch` `doctor` | Authentication \u0026 diagnostics |\n| **search** | `search` | Search pages and databases |\n| **page** | `view` `list` `create` `delete` `restore` `move` `open` `set` `props` `link` `unlink` | Full page lifecycle |\n| **db** | `list` `view` `query` `create` `update` `add` `add-bulk` `open` | Database CRUD + query |\n| **block** | `list` `get` `append` `insert` `update` `delete` | Content block operations |\n| **comment** | `list` `add` `get` | Discussion threads |\n| **user** | `me` `list` `get` | Workspace members |\n| **file** | `list` `upload` | File management |\n| **api** | `\u003cMETHOD\u003e \u003cpath\u003e` | Raw API escape hatch |\n\n**39 subcommands** covering 100% of the Notion API.\n\n## Features\n\n### Human-Friendly Filters\nNo JSON needed for 90% of queries:\n```sh\nnotion db query \u003cid\u003e --filter 'Status=Done' --filter 'Priority=High' --sort 'Date:desc'\n```\n\nFor complex queries (OR, nesting), use the JSON escape hatch:\n```sh\nnotion db query \u003cid\u003e --filter-json '{\"or\":[{\"property\":\"Status\",\"status\":{\"equals\":\"Done\"}},{\"property\":\"Status\",\"status\":{\"equals\":\"Cancelled\"}}]}'\n```\n\n### Schema-Aware Properties\nProperty types are auto-detected from the database schema:\n```sh\nnotion page create \u003cdb-id\u003e --db \"Name=Sprint Review\" \"Date=2026-03-01\" \"Points=8\" \"Done=true\"\n```\n\n### Smart Output\n- **Terminal**: Colored tables, formatted text\n- **Pipe/Script**: Clean JSON for `jq`, scripts, and AI agents\n```sh\n# Pretty table in terminal\nnotion db query \u003cid\u003e\n\n# JSON when piped\nnotion db query \u003cid\u003e | jq '.results[].properties.Name'\n```\n\n### Markdown I/O\n```sh\n# Read blocks as Markdown\nnotion block list \u003cpage-id\u003e --md --depth 3\n\n# Write Markdown to Notion\nnotion block append \u003cpage-id\u003e --file document.md\n```\nSupports headings, bullets, numbered lists, todos, quotes, code blocks, and dividers.\n\n### Recursive Block Reading\n```sh\nnotion block list \u003cpage-id\u003e --depth 5 --all\n```\n\n### URL or ID — Your Choice\n```sh\n# Both work\nnotion page view abc123def\nnotion page view https://notion.so/My-Page-abc123def456\n```\n\n### Actionable Error Messages\n```\nobject_not_found: Could not find page with ID abc123\n  → Check the ID is correct and the page/database is shared with your integration\n```\n\n## For AI Agents\n\nThis CLI is designed to be agent-friendly:\n- **JSON output** when piped — no parsing needed\n- **Schema-aware** — agents don't need to know property types\n- **URL resolution** — paste Notion URLs directly\n- **Single binary** — no runtime dependencies\n- **Exit codes** — 0 for success, non-zero for errors\n\nInstall as an agent skill:\n```sh\nnpx skills add 4ier/notion-cli\n```\n\n## Configuration\n\n```sh\n# Token is stored in ~/.config/notion-cli/config.json (mode 0600)\necho \"ntn_xxxxx\" | notion auth login --with-token\n\n# Or use environment variable\nexport NOTION_TOKEN=ntn_xxxxx\n\n# Check authentication\nnotion auth status\nnotion auth doctor\n```\n\n## Troubleshooting\n\n### Windows: MSYS / Git Bash path mangling\n\nIn MSYS-based shells (Git Bash, MSYS2), arguments starting with `/` are silently rewritten to Windows paths. This breaks API path arguments:\n\n```sh\n# ✗ /v1/users/me becomes C:/Program Files/Git/v1/users/me\nnotion api GET /v1/users/me\n```\n\n**Fix:** disable MSYS path conversion:\n\n```sh\nMSYS_NO_PATHCONV=1 notion api GET /v1/users/me\n```\n\nOr export it for the session: `export MSYS_NO_PATHCONV=1`\n\n\u003e This is a shell-level issue, not a bug in notion-cli. PowerShell and cmd.exe are not affected.\n\n## Contributing\n\nIssues and PRs welcome at [github.com/4ier/notion-cli](https://github.com/4ier/notion-cli).\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F4ier%2Fnotion-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F4ier%2Fnotion-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F4ier%2Fnotion-cli/lists"}