| name | noti |
| description | Notion CLI tool for managing pages, databases, and content. Use when working with Notion data, creating/updating pages, querying databases, or syncing content. |
noti - Notion CLI Tool Skill
noti is a CLI tool for operating Notion from the command line. With this skill, you can create/edit pages, manipulate databases, search, and more.
Installing noti
npm install -g @hirokidaichi/noti
Or build from source:
git clone https://github.com/hirokidaichi/noti.git
cd noti
npm install && npm run build && npm link
Installing the Skill
noti setup-skills --user
noti setup-skills --project
Initial Setup
Set your Notion API token:
noti configure --token <your_token>
noti configure --show
Get your Notion Integration Token from https://www.notion.so/my-integrations
Page Operations
Get Page
noti page get <page_id_or_url>
noti page get <page_id_or_url> --format json
noti page get <page_id_or_url> -o output.md
Create Page
noti page create <parent_page_id> content.md
noti page create <parent_page_id> content.md -t "New Page"
The first # heading in the Markdown file is used as the title (can be overridden with -t option).
Update Page
noti page update <page_id> new_content.md -f
Append to Page
noti page append <page_id> additional_content.md
Delete Page
noti page remove <page_id> -f
Database Operations
List Databases
noti database list
noti database list --json
Show Database Schema
noti database schema <database_id>
noti database schema <database_id> --json
noti database schema <database_id> --json -o schema.json
Shows property names, types, and available options (select/multi_select/status).
Use --json to get detailed type information for programmatic use.
Query Database
noti database query <database_id>
noti database query <database_id> -f "Status=Done"
noti database query <database_id> -f "Priority!=Low" -f "Status=In Progress"
noti database query <database_id> -s "Name:asc"
noti database query <database_id> -s "created_time:desc"
noti database query <database_id> -f "Status=Done" -s "Name:asc" --limit 10
Filter Operators:
=, != - Equality comparison
>, <, >=, <= - Numeric/date comparison
contains, !contains - Text/multi-select search
Export Database
noti database export <database_id> -f json -o data.json
noti database export <database_id> -f csv -o data.csv
noti database export <database_id> -f markdown -o data.md
Import to Database
noti database import -f data.csv -d <database_id>
noti database import -f data.csv -d <database_id> --dry-run
noti database import -f data.csv -d <database_id> --map-file mapping.json
Create Database
noti database create <parent_page_id> schema.json
Schema JSON format:
{
"title": "Task Management",
"properties": {
"Name": { "type": "title" },
"Status": { "type": "select", "options": ["Todo", "In Progress", "Done"] },
"Priority": { "type": "number" },
"DueDate": { "type": "date" }
}
}
Database Page Operations
noti database page add <database_id> page_data.json
noti database page get <page_id>
noti database page update <page_id> page_data.json
noti database page remove <page_id> -f
Page data JSON format (used for both add and update):
{
"properties": {
"Name": "Task Name",
"Status": "Todo",
"Priority": 1
}
}
For update, only the specified properties are changed; other properties remain unchanged.
Comment Operations
noti page comment get <page_id>
noti page comment get <page_id> -f thread
noti page comment add <page_id> "Comment content"
noti page comment reply <page_id> <thread_id> "Reply content"
noti page comment list-threads <page_id>
Search
noti search "search keyword"
noti search "keyword" --json
noti search "keyword" --limit 50
Block Operations
noti block get <block_id>
noti block get <block_id> -c
noti block list <page_id>
noti block delete <block_id> -f
Alias Management
Set aliases for frequently used pages:
noti alias add mypage <page_id_or_url>
noti alias set mypage <page_id_or_url>
noti alias list
noti alias remove mypage
noti open mypage
User Information
noti user me
noti user list
noti user get <user_id>
Open in Browser
noti open <page_id_or_url_or_alias>
Examples: Typical Workflows
1. Create and Save Meeting Notes
echo "# Meeting Notes 2024-01-15
## Attendees
- Alice
- Bob
## Agenda
1. Project progress
2. Next actions
## Decisions
- Finalize design by next week
" > meeting.md
noti page create <parent_page_id> meeting.md
2. Search and Update Tasks
noti database query <task_db_id> -f "Status!=Done" -s "Priority:desc"
noti database page get <task_page_id>
3. Data Backup
noti database export <database_id> -f csv -o backup_$(date +%Y%m%d).csv
4. Bulk Data Import
noti database import -f new_data.csv -d <database_id> --dry-run
noti database import -f new_data.csv -d <database_id>
Notes
- Page ID, database ID, or Notion URL can be specified
- Set aliases to access with short names instead of IDs or URLs
- Use
--debug or -d option for detailed logs
- Destructive operations (delete, update) require
-f option