{"id":47920975,"url":"https://github.com/nitaiaharoni1/notion-cli","last_synced_at":"2026-04-04T06:01:07.929Z","repository":{"id":329916737,"uuid":"1120958976","full_name":"nitaiaharoni1/notion-cli","owner":"nitaiaharoni1","description":"A powerful command-line interface for Notion built with pure bash. No dependencies - just bash, curl, and python3. Supports all major Notion API endpoints (API version 2025-09-03).","archived":false,"fork":false,"pushed_at":"2025-12-22T14:01:01.000Z","size":31,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-23T20:28:08.937Z","etag":null,"topics":["api","automation","bash","cli","command-line","notion","notion-api","productivity"],"latest_commit_sha":null,"homepage":null,"language":"Shell","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/nitaiaharoni1.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":"nitaiaharoni1"}},"created_at":"2025-12-22T08:03:56.000Z","updated_at":"2025-12-22T14:01:05.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/nitaiaharoni1/notion-cli","commit_stats":null,"previous_names":["nitaiaharoni1/notion-cli"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/nitaiaharoni1/notion-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nitaiaharoni1%2Fnotion-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nitaiaharoni1%2Fnotion-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nitaiaharoni1%2Fnotion-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nitaiaharoni1%2Fnotion-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nitaiaharoni1","download_url":"https://codeload.github.com/nitaiaharoni1/notion-cli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nitaiaharoni1%2Fnotion-cli/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31389392,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T04:26:24.776Z","status":"ssl_error","status_checked_at":"2026-04-04T04:23:34.147Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["api","automation","bash","cli","command-line","notion","notion-api","productivity"],"created_at":"2026-04-04T06:01:06.883Z","updated_at":"2026-04-04T06:01:07.904Z","avatar_url":"https://github.com/nitaiaharoni1.png","language":"Shell","funding_links":["https://github.com/sponsors/nitaiaharoni1"],"categories":[],"sub_categories":[],"readme":"# Notion CLI\n\nA powerful, lightweight command-line interface for Notion built with pure bash. No Node.js or Python dependencies required - just bash, curl, and python3.\n\n**API Version:** 2025-09-03 (latest as of December 2025)\n\n## Features\n\n- 🔍 **Search** pages and databases\n- 📄 **Create and manage pages** (create, update, archive, restore, move)\n- 🗄️ **Database operations** (list, query, create, update)\n- 📊 **Data source operations** (new in API 2025-09-03)\n- 🧱 **Block operations** (get, create, update, delete blocks)\n- 💬 **Comments** (create and list comments)\n- 👥 **User management** (list workspace users)\n- 🔐 **Secure token storage** (uses `~/.notion_token` with proper permissions)\n\n## Installation\n\n### Quick Install (One Command)\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/nitaiaharoni1/notion-cli/main/install.sh | bash\n```\n\n### Using Homebrew\n\n```bash\nbrew tap nitaiaharoni1/notion-cli\nbrew install notion-cli\n```\n\nAfter installation, add to your shell config (`~/.zshrc` or `~/.bashrc`):\n```bash\nsource $(brew --prefix)/bin/notion\n```\n\nThen reload your shell: `source ~/.zshrc`\n\n### Manual Installation\n\n1. Download the script:\n```bash\ncurl -o notion-cli.sh https://raw.githubusercontent.com/nitaiaharoni1/notion-cli/main/notion-cli.sh\n```\n\n2. Make it executable:\n```bash\nchmod +x notion-cli.sh\n```\n\n3. Move to a directory in your PATH:\n```bash\nmkdir -p ~/.local/bin\nmv notion-cli.sh ~/.local/bin/notion-cli.sh\n```\n\n4. Add to your shell configuration (`~/.zshrc` or `~/.bashrc`):\n```bash\nexport PATH=\"$HOME/.local/bin:$PATH\"\nsource ~/.local/bin/notion-cli.sh\n```\n\n5. Reload your shell:\n```bash\nsource ~/.zshrc  # or source ~/.bashrc\n```\n\n## Setup\n\n### Quick Setup (Recommended)\n\nAfter installation, run:\n```bash\nnotion init\n```\n\nThis will guide you through:\n- Getting a Notion integration token\n- Storing it securely\n- Testing the connection\n\n### Manual Setup\n\n### 1. Get a Notion Integration Token\n\n1. Go to [Notion Integrations](https://www.notion.so/my-integrations)\n2. Click **\"+ New integration\"**\n3. Give it a name (e.g., \"Notion CLI\")\n4. Select your workspace\n5. Copy the **Internal Integration Token** (starts with `secret_`)\n6. **Important:** Share the pages/databases you want to access with this integration in Notion\n\n### 2. Store Your Token Securely\n\n```bash\necho 'secret_your-token-here' \u003e ~/.notion_token\nchmod 600 ~/.notion_token\n```\n\n## Usage\n\n### Basic Commands\n\n```bash\n# Show your integration info\nnotion me\n\n# Search for pages/databases\nnotion search 'My Page'\n\n# Get page details\nnotion get 'page-id-here'\n\n# Create a new page\nnotion create 'parent-page-id' 'New Page Title'\n\n# Update page property\nnotion update 'page-id' 'Status' 'Done'\n\n# Update page title\nnotion update-title 'page-id' 'New Title'\n\n# Archive a page\nnotion archive 'page-id'\n\n# Restore an archived page\nnotion restore 'page-id'\n\n# Move page to new parent\nnotion move 'page-id' 'new-parent-id'\n\n# Get page property value\nnotion get-property 'page-id' 'property-id'\n```\n\n### Database Operations\n\n```bash\n# List all databases\nnotion databases\n\n# Get database details\nnotion get-database 'database-id'\n\n# Create a new database\nnotion create-database 'parent-page-id' 'My Database'\n\n# Update database title\nnotion update-database 'database-id' 'New Title'\n\n# Query a database\nnotion query 'database-id' 20\n```\n\n### Data Sources (API 2025-09-03+)\n\n```bash\n# Get data source details\nnotion get-datasource 'ds-id'\n\n# Query a data source\nnotion query-datasource 'ds-id' 20\n\n# Create a data source\nnotion create-datasource 'database-id' 'New Data Source'\n\n# Update data source\nnotion update-datasource 'ds-id' 'New Title'\n\n# List data source templates\nnotion datasource-templates 'ds-id'\n```\n\n### Block Operations\n\n```bash\n# Get page blocks/children\nnotion blocks 'page-id' 20\n\n# Get a single block\nnotion get-block 'block-id'\n\n# Append a block to a page\nnotion append-block 'page-id' 'paragraph' 'This is new content'\n\n# Update block content\nnotion update-block 'block-id' 'Updated content'\n\n# Delete (archive) a block\nnotion delete-block 'block-id'\n```\n\n### Comments\n\n```bash\n# Add a comment to a page\nnotion comment 'page-id' 'This is my comment'\n\n# List comments on a page\nnotion comments 'page-id'\n\n# Get a specific comment\nnotion get-comment 'comment-id'\n```\n\n### Users\n\n```bash\n# List workspace users\nnotion users\n\n# Get specific user details\nnotion get-user 'user-id'\n```\n\n## Examples\n\n### Quick Note Creation\n\n```bash\n# First, find a parent page ID\nnotion search 'My Notes'\n\n# Then create a child page\nnotion create 'parent-page-id' 'Quick Note'\n```\n\n### Database Query\n\n```bash\n# List databases to find the one you want\nnotion databases\n\n# Query the database\nnotion query 'database-id' 50\n```\n\n### Add Content to a Page\n\n```bash\n# Add a paragraph\nnotion append-block 'page-id' 'paragraph' 'Hello World!'\n\n# Add a heading\nnotion append-block 'page-id' 'heading_1' 'My Heading'\n\n# Add a bullet point\nnotion append-block 'page-id' 'bulleted_list_item' 'First bullet'\n```\n\n### Update Page Status\n\n```bash\n# Update a property (e.g., Status field)\nnotion update 'page-id' 'Status' 'In Progress'\n```\n\n## All Commands Reference\n\n| Category | Command | Description |\n|----------|---------|-------------|\n| **Setup** | `init` | Initial setup and token configuration |\n| **Setup** | `me` | Show your integration user information |\n| **Pages** | `search` | Search pages and databases |\n| **Pages** | `get` | Get page details |\n| **Pages** | `create` | Create a new page |\n| **Pages** | `update` | Update page property |\n| **Pages** | `update-title` | Update page title |\n| **Pages** | `archive` | Archive a page |\n| **Pages** | `restore` | Restore an archived page |\n| **Pages** | `move` | Move page to new parent |\n| **Pages** | `get-property` | Get page property value |\n| **Databases** | `databases` | List all databases |\n| **Databases** | `get-database` | Get database details |\n| **Databases** | `create-database` | Create a new database |\n| **Databases** | `update-database` | Update database title |\n| **Databases** | `query` | Query a database |\n| **Data Sources** | `get-datasource` | Get data source details |\n| **Data Sources** | `query-datasource` | Query a data source |\n| **Data Sources** | `create-datasource` | Create a data source |\n| **Data Sources** | `update-datasource` | Update data source |\n| **Data Sources** | `datasource-templates` | List data source templates |\n| **Blocks** | `blocks` | Get page blocks/children |\n| **Blocks** | `get-block` | Get a single block |\n| **Blocks** | `append-block` | Append block children |\n| **Blocks** | `update-block` | Update block content |\n| **Blocks** | `delete-block` | Delete (archive) a block |\n| **Comments** | `comment` | Create a comment on a page |\n| **Comments** | `comments` | List comments on a page |\n| **Comments** | `get-comment` | Get a specific comment |\n| **Users** | `users` | List workspace users |\n| **Users** | `get-user` | Get specific user details |\n\n## Requirements\n\n- Bash 4.0+\n- curl\n- python3\n- macOS or Linux\n\n## Troubleshooting\n\n### \"unauthorized\" or \"invalid\" errors\n\n- Make sure your token is correct and starts with `secret_`\n- Ensure you've shared the pages/databases with your integration in Notion\n- Check that your integration has the necessary capabilities\n\n### \"object_not_found\" errors\n\n- Verify the page/database ID is correct\n- Make sure the page/database is shared with your integration\n- Check that you're using the correct ID format (with or without dashes)\n\n### Token not found\n\n- Ensure `~/.notion_token` exists and has correct permissions (`chmod 600`)\n- Or set `NOTION_TOKEN` environment variable\n- Run `notion init` to set up your token\n\n## API Version\n\nThis CLI uses the Notion API version **2025-09-03** (latest as of December 2025). API versions are only updated for backwards-incompatible changes. Check https://developers.notion.com/reference/versioning for the latest version.\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## License\n\nMIT License - see [LICENSE](LICENSE) file for details.\n\n## Author\n\nCreated by [Nitai Aharoni](https://github.com/nitaiaharoni)\n\n## Support\n\nFor issues and feature requests, please use the [GitHub Issues](https://github.com/nitaiaharoni/notion-cli/issues) page.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnitaiaharoni1%2Fnotion-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnitaiaharoni1%2Fnotion-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnitaiaharoni1%2Fnotion-cli/lists"}