Przejdź do treści
Biblioteka skilli
Produktywność osobista · Integracja z narzędziem

notion-cli

/notion-cli

Obsługuje Notion przez binarkę Go 4ier/notion-cli: wyszukiwanie, zapytania do baz danych, odczyt stron i eksport danych z poziomu terminala.

Repozytorium
cc-skills ↗
Licencja
MIT
Ostatnia zmiana repozytorium
25.10.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
2
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
1
Przestarzałość

Brak sygnałów. Repozytorium zmienione 25.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co robi i kiedy

Obsługuje Notion przez binarkę Go 4ier/notion-cli: wyszukiwanie, zapytania do baz danych, odczyt stron i eksport danych z poziomu terminala.

Oryginalny opis (EN)

Access Notion via the 4ier/notion-cli Go binary. Use when user wants to search Notion, query databases, read pages, export data,

Jak działa

  1. When to Use
  2. Preflight
  3. Output Formats
  4. Core Commands
  5. ID Resolution
  6. Common Patterns
  7. Credential Storage
  8. Troubleshooting
  9. Post-Execution Reflection
Sekcje z nagłówków SKILL.md, w oryginale · 201 linii, 954 słów
Podgląd SKILL.md
---
name: notion-cli
description: Access Notion via the 4ier/notion-cli Go binary. Use when user wants to search Notion, query databases, read pages, export data,
allowed-tools: Read, Bash, Glob, Grep
---

# Notion CLI

Fast, agent-friendly access to Notion via the `4ier/notion-cli` Go binary. Single static binary, sub-second startup, auto-JSON when piped.

> **Self-Evolving Skill**: Fix this file immediately if instructions drift. Do not defer.

## When to Use

Use this skill when the user wants to interact with Notion from the command line — searching pages, querying databases, reading content, exporting data, managing blocks, or adding comments. This wraps the Go binary `notion` (installed via `brew install 4ier/tap/notion-cli`).

Do NOT use this skill for programmatic Python automation with the Notion SDK — use `productivity-tools:notion-sdk` instead. This skill is for CLI-first, pipe-friendly operations.

## Preflight

Before any operation, verify the CLI is authenticated:

```bash
notion auth status
```

If not authenticated, retrieve the token from Doppler and authenticate:

```bash
doppler secrets get NOTION_API_TOKEN --project private-config --config prd --plain | notion auth login --with-token
```

Fallback: prompt the user for their integration token.

## Output Formats

The CLI auto-detects context:

- **TTY** (interactive terminal): colored tables
- **Piped** (to `jq`, file, etc.): clean JSON

Force a format with `--format`:

| Flag             | Output      |
| ---------------- | ----------- |
| `--format json`  | JSON        |
| `--format table` | ASCII table |
| `--format md`    | Markdown    |
| `--format text`  | Plain text  |

For agent consumption, always pipe or use `--format json` to get structured output.

## Core Commands

### Search

```bash
notion search "meeting notes"                  # Search by title
notion search --type page "roadmap"            # Pages only
notion search --type database                  # List all databases
notion search --all                            # Fetch all results (paginated)
notion search --limit 20 "query"               # Limit results
```

### Pages

```bash
notion page view <page-id|url>                 # View page content (blocks as markdown)
notion page props <page-id|url>                # Show page properties
notion page create --parent <id> --title "X"   # Create a page
notion page set <id> --prop 'Status=Done'      # Set property
notion page edit <id>                          # Edit in $EDITOR
notion page move <id> --to <parent-id>         # Move page
notion page delete <id>                        # Archive page
notion page restore <id>                       # Restore archived page
notion page open <id>                          # Open in browser
notion page list                               # List accessible pages
```

### Databases

```bash
notion db list                                 # List all databases
notion db view <db-id|url>                     # Show schema
notion db query <db-id|url>                    # Query all rows
notion db query <id> --filter 'Status=Done'    # Simple filter
notion db query <id> --filter 'Date>=2026-01-01' --sort 'Date:desc'
notion db query <id> --filter-json '{"or":[...]}' # Complex filters
notion db query <id> --all                     # Fetch all pages
notion db export <id> --format csv -o data.csv # Export to CSV
notion db export <id> --format json            # Export to JSON
notion db export <id> --format md              # Export to Markdown table
notion db add <id> --prop 'Name=Task' --prop 'Status=Todo'  # Add row
notion db add-bulk <id> --file rows.json       # Bulk add from JSON
```

**Filter operators**: `=` `!=` `>` `>=` `<` `<=` `~=` (contains)

Multiple `--filter` flags are AND-combined. For OR logic, use `--filter-json`.

### Blocks

```bash
notion block list <page-id|url>                # List child blocks
notion block list <id> --depth 3               # Recursive (3 levels)
notion block get <block-id>                    # Get specific block
notion block append <page-id> --md "# Hello"   # Append markdown
notion block insert <after-block-id> --md "X"  # Insert after block
notion block delete <block-id>                 # Delete block
notion block move <block-id> --to <parent-id>  # Move block
```

### Comments

```bash
notion comment list <page-id>                  # List comments
notion comment add <page-id> --body "text"     # Add comment
notion comment reply <comment-id> --body "X"   # Reply to comment
```

### Users

```bash
notion user me                                 # Current bot user
notion user list                               # Workspace users
notion user get <user-id>                      # User details
```

### Files

```bash
notion file upload <file-path>                 # Upload file
notion file list                               # List uploads
```

### Raw API (escape hatch)

```bash
notion api GET /v1/users/me
notion api POST /v1/search --body '{"query":"test"}'
echo '{"query":"test"}' | notion api POST /v1/search
```

## ID Resolution

The CLI accepts both Notion URLs and raw IDs interchangeably:

```bash
notion page view https://www.notion.so/My-Page-abc123def456
notion page view abc123def456
```

## Common Patterns

### Export entire database to JSON

```bash
notion db export <db-id> --format json -o database.json
```

### Search and pipe to jq

```bash
notion search "project" --format json | jq '.results[] | {title: .properties.title.title[0].plain_text, url: .url}'
```

### List all databases with their IDs

```bash
notion search --type database --all --format json | jq '.results[] | {id: .id, title: .title[0].plain_text}'
```

### Recursive page content dump

```bash
notion block list <page-id> --depth 10 --format md
```

## Credential Storage

| Store   | Location                              | Purpose          |
| ------- | ------------------------------------- | ---------------- |
| Doppler | `private-config/prd:NOTION_API_TOKEN` | SSoT for token   |
| CLI     | `~/.config/notion/credentials.json`   | Local auth cache |

Token format: `ntn_*` (Notion internal integration token).

## Troubleshooting

| Issue              | Fix                                                                  |
| ------------------ | -------------------------------------------------------------------- |
| `unauthorized`     | Token expired/revoked — regenerate at notion.so/profile/integrations |
| `object not found` | Page not connected to integration — add via page menu > Connections  |
| `rate_limited`     | CLI auto-retries; for bulk ops use `--limit` to reduce batch size    |
| `validation_error` | Check property names match schema: `notion db view <id>`             |

## Post-Execution Reflection

After this skill completes, check before closing:

1. **Did the command succeed?** If not, fix the instruction or error table that caused the failure.
2. **Did parameters or output change?** If the CLI interface drifted, update usage examples and command tables.
3. **Was a workaround needed?** If you had to improvise (different flags, extra steps), update this SKILL.md so the next invocation doesn't need the same workaround.

Only update if the issue is real and reproducible — not speculative.
Pliki w paczce (2)
  • SKILL.md 7 KB
  • references/evolution-log.md 1 KB

Wersje

W bazie nie ma innych skilli o nazwie notion-cli.

Migawka bazy z 13.11.2026 · wersja paczki eba45224e74b (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 96notion
    Przeszukuje, czyta, tworzy i aktualizuje strony oraz bazy danych w Notion przez API.
  • 100notion-tool
    Obsługuje Notion przez API: wyszukuje, pobiera, tworzy i aktualizuje strony oraz wiersze baz danych w przestrzeni roboczej.
  • 95notion
    Wyszukuje, czyta, dopisuje i tworzy strony oraz bazy danych w Notion przez REST API, na przykład przy logowaniu wpisów do bazy w przestrzeni roboczej.
  • 100notion-api
    Wyszukuje, czyta i zapisuje strony, bazy danych oraz bloki w Notion przez API, w tym dodawanie wierszy i dopisywanie treści do stron.
  • 100notion
    Obsługuje Notion z terminala lub agenta przez skrypt notion-cli, domyślnie tylko do odczytu, z potwierdzeniem przy każdej zmianie: strony, bazy, wyszukiwanie i właściwości.
  • 100notion-tool
    Integruje się z Notion przez API: wyszukuje, pobiera, tworzy i aktualizuje strony oraz bazy danych, w tym dodaje wiersze do baz.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.