@4ier/notion-cli
Advanced tools
+1
-1
| { | ||
| "name": "@4ier/notion-cli", | ||
| "version": "0.3.2", | ||
| "version": "0.4.0", | ||
| "description": "Full-featured CLI for Notion. Like gh for GitHub, but for Notion. 44 commands, one binary.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
+29
-4
@@ -10,2 +10,6 @@ <h1 align="center"> | ||
| <p align="center"> | ||
| <img src="https://github.com/4ier/notion-cli/releases/download/v0.2.0/demo.gif" alt="demo" width="640"> | ||
| </p> | ||
| <p align="center"> | ||
| <a href="https://github.com/4ier/notion-cli/releases"><img src="https://img.shields.io/github/v/release/4ier/notion-cli?style=flat-square" alt="Release"></a> | ||
@@ -35,3 +39,3 @@ <a href="https://github.com/4ier/notion-cli/actions"><img src="https://img.shields.io/github/actions/workflow/status/4ier/notion-cli/test.yml?style=flat-square&label=tests" alt="Tests"></a> | ||
| ```sh | ||
| npm install -g notion-cli-go | ||
| npm install -g @4ier/notion-cli | ||
| ``` | ||
@@ -58,3 +62,3 @@ | ||
| # Authenticate | ||
| notion auth login --token ntn_xxxxx | ||
| echo "ntn_xxxxx" | notion auth login --with-token | ||
@@ -84,3 +88,3 @@ # Search your workspace | ||
| |-------|----------|-------------| | ||
| | **auth** | `login` `logout` `status` `doctor` | Authentication & diagnostics | | ||
| | **auth** | `login` `logout` `status` `switch` `doctor` | Authentication & diagnostics | | ||
| | **search** | `search` | Search pages and databases | | ||
@@ -173,3 +177,3 @@ | **page** | `view` `list` `create` `delete` `restore` `move` `open` `set` `props` `link` `unlink` | Full page lifecycle | | ||
| # Token is stored in ~/.config/notion-cli/config.json (mode 0600) | ||
| notion auth login --token ntn_xxxxx | ||
| echo "ntn_xxxxx" | notion auth login --with-token | ||
@@ -184,2 +188,23 @@ # Or use environment variable | ||
| ## Troubleshooting | ||
| ### Windows: MSYS / Git Bash path mangling | ||
| In MSYS-based shells (Git Bash, MSYS2), arguments starting with `/` are silently rewritten to Windows paths. This breaks API path arguments: | ||
| ```sh | ||
| # ✗ /v1/users/me becomes C:/Program Files/Git/v1/users/me | ||
| notion api GET /v1/users/me | ||
| ``` | ||
| **Fix:** disable MSYS path conversion: | ||
| ```sh | ||
| MSYS_NO_PATHCONV=1 notion api GET /v1/users/me | ||
| ``` | ||
| Or export it for the session: `export MSYS_NO_PATHCONV=1` | ||
| > This is a shell-level issue, not a bug in notion-cli. PowerShell and cmd.exe are not affected. | ||
| ## Contributing | ||
@@ -186,0 +211,0 @@ |
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
12256
6.34%211
13.44%6
20%