π νκ΅μ΄ λ¬Έμ | π Architecture | μν€ν μ² (νκ΅μ΄)
A fast and simple Notion CLI written in Rust. Manage your Notion pages and databases from the terminal.
$ notion-cli search "meeting notes"
β 3 results found
β’ [page] Weekly Team Meeting
ID: abc123...
β’ [page] 1:1 Meeting Notes
ID: def456...- π Search - Find pages and databases instantly
- π Read - View page content with syntax highlighting
- βοΈ Create - Create new pages with content
- π Append - Add text, code blocks, headings, lists, bookmarks
- π Update - Modify titles and icons
- ποΈ Query - Filter and sort database entries
- π¦ Move - Relocate pages to different parents
- β‘ Fast - Written in Rust, minimal overhead
- π Auto-retry - Handles rate limits automatically
Linux / macOS:
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/demarlik01/notion-cli-rs/releases/latest/download/notion-cli-tool-installer.sh | shWindows (PowerShell):
powershell -ExecutionPolicy ByPass -c "irm https://github.com/demarlik01/notion-cli-rs/releases/latest/download/notion-cli-tool-installer.ps1 | iex"Or download binaries directly from GitHub Releases.
cargo install notion-cli-toolgit clone https://github.com/demarlik01/notion-cli-rs.git
cd notion-cli-rs
cargo install --path .- Go to Notion Integrations
- Click "New integration"
- Copy the "Internal Integration Token"
- Important: Share your pages with the integration!
# Interactive setup (recommended)
notion-cli init
# Or set environment variable
export NOTION_API_KEY=secret_xxxxx
# Or create config file manually
echo 'api_key = "secret_xxxxx"' > ~/.config/notion-cli/config.tomlnotion-cli search "my project"
notion-cli read <page_id>
notion-cli create --parent <page_id> --title "New Page"API key is resolved in this order:
--api-keycommand line optionNOTION_API_KEYenvironment variable~/.config/notion-cli/config.toml
# View current config
notion-cli config
# Update config
notion-cli init --api-key "secret_new_key"notion-cli search "query"
notion-cli search "project" --limit 10notion-cli read <page_id>notion-cli create --parent <parent_id> --title "Page Title"
notion-cli create --parent <parent_id> --title "Page Title" --content "First paragraph"# Text
notion-cli append <page_id> "New paragraph"
# Code block
notion-cli append-code <page_id> "console.log('hello')" --language javascript
# Heading
notion-cli append-heading <page_id> "Section Title" --level 2
# Bulleted list
notion-cli append-list <page_id> "Item 1,Item 2,Item 3"
# Bookmark
notion-cli append-bookmark <page_id> "https://example.com"
# Divider
notion-cli append-divider <page_id>notion-cli update <page_id> --title "New Title"
notion-cli update <page_id> --icon "π"
notion-cli update <page_id> --title "New Title" --icon "π"notion-cli delete <page_id> # Moves to trash# All entries
notion-cli query <database_id>
# With filter
notion-cli query <database_id> --filter "Status=Done"
notion-cli query <database_id> --filter "Priority:select=High"
# With sort
notion-cli query <database_id> --sort "Created" --direction desc
# Limit results
notion-cli query <database_id> --limit 20Filter format: PropertyName=value or PropertyName:type=value
Supported types: title, rich_text, select, checkbox, number
notion-cli move <page_id> --parent <new_parent_id>
notion-cli move <page_id> --parent <new_parent_id> --delete # Archive originalnotion-cli get-block-ids <page_id> # List all block IDs
notion-cli delete-block <block_id> # Delete a specific blocknotion-cli --api-key <key> <command> # Override API key
notion-cli --timeout 60 <command> # Custom timeout (default: 30s)
notion-cli --help # Show help
notion-cli --version # Show versionUses Notion API 2025-09-03 (latest).
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
MIT License - see LICENSE for details.