fix(#298): add README to bundled notion-cli plugin - #376
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
📝 WalkthroughWalkthroughThe Notion CLI plugin now includes a complete README with setup instructions, authentication, installation, command examples, upstream passthrough, JSON output behavior, and supported features. ChangesNotion CLI documentation
Estimated code review effort: 1 (Trivial) | ~3 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@plugins/notion-cli/README.md`:
- Line 57: Update the notion page create example to use a single --db option
followed by both Name=Task and Status=Todo property values, matching the
command’s accepted syntax.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 08ad7c69-98fa-4273-8287-7b2f129ebafc
📒 Files selected for processing (1)
plugins/notion-cli/README.md
| ```bash | ||
| dcli notion page list --json | ||
| dcli notion page view <pageId> --json | ||
| dcli notion page create <dbId> --db "Name=Task" --db "Status=Todo" --json |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== repo files =="
git ls-files | rg '(^|/)plugins/notion-cli/(README\.md|plugin\.json|.*\.(js|ts|zig|mfl|sh))$|(^|/)notion-cli/README\.md$|notion.*README' || true
echo
echo "== notion plugin README around line 57 =="
if [ -f plugins/notion-cli/README.md ]; then
nl -ba plugins/notion-cli/README.md | sed -n '45,70p'
fi
echo
echo "== local references to notion_cli/notion/page create/db =="
rg -n "notion|dbId|page create|--db|Status=Todo|Name=Task" . --glob '*.{md,js,ts,jsx,tsx,zig,mfl,sh,json}' || true
echo
echo "== plugin metadata =="
if [ -f plugins/notion-cli/plugin.json ]; then
cat plugins/notion-cli/plugin.json
fiRepository: javimosch/supercli
Length of output: 317
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== check local package availability without executing repo code =="
python3 - <<'PY'
import importlib.util, subprocess, sys
specs = ["notion_cli", "notion"]
for name in specs:
spec = importlib.util.find_spec(name)
print(f"{name}: {spec.origin if spec else 'not found'}")
PY
echo
echo "== inspect installed package docs/help if present =="
python3 - <<'PY'
import subprocess
for cmd in [
["python", "-m", "justcode.notion_cli", "-h"],
["python", "-m", "justcode.notion_cli", "--help"],
]:
try:
r = subprocess.run(cmd, text=True, capture_output=True, timeout=10)
print("CMD:", " ".join(cmd), "EXIT", r.returncode)
out = (r.stdout + r.stderr).strip()
for line in out.splitlines()[:120]:
print(line)
except Exception as e:
print("CMD:", " ".join(cmd), "ERROR", repr(e))
PY
echo
echo "== search for --db in installed files if package present =="
python3 - <<'PY'
import importlib.util, glob, os
spec = importlib.util.find_spec("justcode.notion_cli")
if spec and spec.submodule_search_locations:
roots = spec.submodule_search_locations
for root in roots:
files = glob.glob(os.path.join(root, "**", "*.py"), recursive=True)
matches = []
for f in files:
txt = open(f, encoding="utf-8", errors="replace").read()
if "--db" in txt or "db argument" in txt.lower():
matches.append(f)
print("MATCHES:", "\n".join(matches))
for f in matches:
txt = open(f, encoding="utf-8", errors="replace").read().splitlines()
for i,line in enumerate(txt,1):
if "--db" in line or "db argument" in line.lower():
start=max(1,i-5); end=min(len(txt),i+15)
print(f"\n## {f}:{start}-{end}")
for j in range(start,end+1):
print(f"{j}: {txt[j-1]}")
PYRepository: javimosch/supercli
Length of output: 992
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== repo files =="
git ls-files | rg '(^|/)plugins/notion-cli/(README\.md|plugin\.json|.*\.(js|ts|zig|mfl|sh))$|(^|/)notion-cli/README\.md$|notion.*README' || true
echo
echo "== notion plugin README around line 57 =="
if [ -f plugins/notion-cli/README.md ]; then
nl -ba plugins/notion-cli/README.md | sed -n '45,70p'
fi
echo
echo "== local references to notion_cli/notion/page create/db =="
rg -n "notion|dbId|page create|--db|Status=Todo|Name=Task" . --glob '*.{md,js,ts,jsx,tsx,zig,mfl,sh,json}' || true
echo
echo "== plugin metadata =="
if [ -f plugins/notion-cli/plugin.json ]; then
cat plugins/notion-cli/plugin.json
fi
echo
echo "== check local package availability without executing repo code =="
python3 - <<'PY'
import importlib.util
specs = ["justcode.notion_cli", "notion_cli", "notion"]
for name in specs:
spec = importlib.util.find_spec(name)
print(f"{name}: {spec.origin if spec else 'not found'}")
PY
echo
echo "== inspect installed package docs/help if present =="
python3 - <<'PY'
import subprocess
for cmd in [
["python", "-m", "justcode.notion_cli", "-h"],
["python", "-m", "justcode.notion_cli", "--help"],
]:
try:
r = subprocess.run(cmd, text=True, capture_output=True, timeout=10)
print("CMD:", " ".join(cmd), "EXIT", r.returncode)
out = (r.stdout + r.stderr).strip()
for line in out.splitlines()[:120]:
print(line)
except Exception as e:
print("CMD:", " ".join(cmd), "ERROR", repr(e))
PY
echo
echo "== search for --db in installed files =="
python3 - <<'PY'
import importlib.util, glob, os
spec = importlib.util.find_spec("justcode.notion_cli")
if spec and spec.submodule_search_locations:
for root in spec.submodule_search_locations:
for f in glob.glob(os.path.join(root, "**", "*.py"), recursive=True):
txt = open(f, encoding="utf-8", errors="replace").read()
if "--db" in txt or "db argument" in txt.lower():
lines = txt.splitlines()
for i,line in enumerate(lines,1):
if "--db" in line or "db argument" in line.lower():
start=max(1,i-5); end=min(len(lines),i+15)
print(f"\n## {f}:{start}-{end}")
for j in range(start,end+1):
print(f"{j}: {lines[j-1]}")
PYRepository: javimosch/supercli
Length of output: 317
🌐 Web query:
github 4ier notion-cli README page create --db properties syntax
💡 Result:
For the notion-cli developed by 4ier (available at github.com/4ier/notion-cli), page creation in a database involves two primary methods for handling properties: the standard Notion API JSON format and a simplified key-value syntax [1][2][3]. Standard API Syntax To create a page with full control over the Notion API structure, you pass a JSON object to the --properties flag [4]. This requires following the official Notion API schema, where each property is explicitly defined by its type [4]: notion page create --properties '{"Name": {"title": [{"text": {"content": "New Page"}}]}, "Status": {"select": {"name": "Done"}}}' Simplified Property Syntax The tool supports a simplified property mode using the -S or --simple-properties flag [5][6]. This mode allows you to pass a flat JSON object, which the CLI maps to the database schema automatically, significantly reducing the complexity of the command [5][6]. Usage with simple properties: notion page create -S --properties '{"Name": "Task Title", "Status": "Done", "Priority": 5}' [2][6] Key advantages of simple properties: - Flat Structure: Uses straightforward key-value pairs (e.g., string, number, boolean) instead of nested API objects [5][6]. - Type Detection: The CLI fetches the database schema to automatically validate and map property types [3][5]. - AI-Friendly: This format is designed for programmatic access and AI agents, minimizing errors associated with the verbose standard API structure [5][6]. For additional context, you can use the notion db schema command to inspect the available property names and types in your target database before creating pages [5][4].
Citations:
- 1: https://github.com/4ier/notion-cli/blob/main/README.md
- 2: https://pkg.go.dev/github.com/4ier/notion-cli
- 3: https://github.com/4ier/notion-cli/releases
- 4: https://github.com/Catafal/notion-cli/blob/main/docs/user-guides/ai-agent-cookbook.md
- 5: https://github.com/Catafal/notion-cli/blob/main/docs/user-guides/simple-properties.md
- 6: https://github.com/Catafal/notion-cli/blob/main/docs/user-guides/ai-agent-guide.md
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== notion README section using sed =="
sed -n '45,70p' plugins/notion-cli/README.md | cat -n
echo
echo "== plugin manifest =="
cat plugins/notion-cli/plugin.json | sed -n '1,160p'
echo
echo "== local references to notion "--db" syntax =="
rg -n "notion|page create|--db|-- properties|properties|simple-properties|simple_properties|Status=Todo|Name=Task" . --glob '*.{md,js,ts,jsx,tsx,zig,mfl,sh,json}' || true
echo
echo "== inspect upstream notion-cli command docs via git URL =="
python3 - <<'PY'
import urllib.request
urls = [
"https://raw.githubusercontent.com/4ier/notion-cli/main/README.md",
"https://raw.githubusercontent.com/4ier/notion-cli/main/commands/page.go",
"https://raw.githubusercontent.com/4ier/notion-cli/main/commands/page_create.go",
"https://raw.githubusercontent.com/4ier/notion-cli/main/commands/page.go",
]
for url in urls:
print(f"\n## {url}")
try:
data = urllib.request.urlopen(url, timeout=15, data=None).read().decode("utf-8", "replace")
except Exception as e:
print("FETCH_ERROR", repr(e))
continue
hits = [i for i,line in enumerate(data.splitlines(),1) if ("page create" in line or "--db" in line or "db" in line.lower())][:240]
for i,line in enumerate(data.splitlines(),1):
if i in hits:
print(f"{i}: {line}")
if len(hits) > 30:
hit_set = set(hits)
nearby = sorted(set(range(1, len(data.splitlines())+1)) & set(t for i in hits for t in range(max(1,i-20), i+21)))
hit_set = set(nearby)
if i in hit_set and i not in hits:
continue
PYRepository: javimosch/supercli
Length of output: 50376
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== notion README section =="
sed -n '45,70p' plugins/notion-cli/README.md
echo
echo "== plugin manifest =="
cat plugins/notion-cli/plugin.json
echo
echo "== local references to notion command syntax =="
rg -n "notion|page create|--db|--properties|-S|simple-properties|Status=Todo|Name=Task" . --glob '*.{md,js,ts,jsx,tsx,zig,mfl,sh,json}' || trueRepository: javimosch/supercli
Length of output: 50376
🌐 Web query:
github.com/4ier/notion-cli page create --db command
💡 Result:
In the 4ier/notion-cli package, the command to create a page within a database is executed using the notion page create command followed by the database ID and the --db flag [1][2]. The syntax is: notion page create --db "PropertyName=Value" "PropertyName2=Value2" For example, to create a row in a database with specific property values: notion page create --db "Name=Sprint Review" "Date=2026-03-01" "Points=8" "Done=true" Key details: - The is the unique identifier of the target database [1][3]. - The --db flag is used specifically for database page creation, allowing you to define property values in a key=value format [1][4]. - This CLI tool automatically handles schema awareness, detecting property types based on the target database schema [5]. Be sure to distinguish this tool from others with similar names (e.g., notion-cli by henryreith or FroeMic), as their command syntax differs [6][7][8]. The 4ier/notion-cli documentation consistently specifies the command structure above [1][2][9].
Citations:
- 1: https://github.com/4ier/notion-cli/blob/main/README.md
- 2: https://github.com/4ier/notion-cli
- 3: https://pkg.go.dev/github.com/4ier/notion-cli
- 4: https://www.npmjs.com/package/@4ier/notion-cli
- 5: https://github.com/4ier/notion-cli/releases
- 6: https://github.com/henryreith/notion-cli/blob/main/docs/commands.md
- 7: https://github.com/FroeMic/notion-cli
- 8: https://github.com/chen-gdp/notion-cli
- 9: https://registry.npmjs.org/@4ier/notion-cli
Use one --db option for multiple properties.
Line 57 repeats --db, but the notion page create syntax accepts one --db followed by additional Name=Value values.
Proposed correction
-dcli notion page create <dbId> --db "Name=Task" --db "Status=Todo" --json
+dcli notion page create <dbId> --db "Name=Task" "Status=Todo" --json📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| dcli notion page create <dbId> --db "Name=Task" --db "Status=Todo" --json | |
| dcli notion page create <dbId> --db "Name=Task" "Status=Todo" --json |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@plugins/notion-cli/README.md` at line 57, Update the notion page create
example to use a single --db option followed by both Name=Task and Status=Todo
property values, matching the command’s accepted syntax.
Automated maintenance run by automaintainer.
Focus: == ASSIGNED OBJECTIVE ==
Fix GitHub issue #298 ONLY: Add 4ier/notion-cli as a bundled plugin in SuperCLI. PR title MUST reference #298.
OPEN PR AWARENESS (secondary — do not replace the ASSIGNED OBJECTIVE):
These open pull requests are already open and awaiting review. Do NOT start UNRELATED work on the files they touch. If your ASSIGNED OBJECTIVE requires editing one of those files, complete the objective anyway. Never abandon the objective to pick a different GitHub issue just to avoid overlap.
touches: plugins/notion-cli/install-guidance.json, plugins/notion-cli/plugin.json, plugins/notion-cli/skills/quickstart/SKILL.md
touches: plugins/notion-cli/install-guidance.json, plugins/notion-cli/plugin.json, plugins/notion-cli/skills/quickstart/SKILL.md
touches: plugins/notion-cli/install-guidance.json, plugins/notion-cli/plugin.json, plugins/notion-cli/skills/quickstart/SKILL.md
touches: plugins/notion-cli/install-guidance.json, plugins/notion-cli/plugin.json, plugins/notion-cli/skills/quickstart/SKILL.md
touches: plugins/notion-cli/install-guidance.json, plugins/notion-cli/plugin.json, plugins/notion-cli/skills/quickstart/SKILL.md
touches: plugins/notion-cli/install-guidance.json, plugins/notion-cli/plugin.json, plugins/notion-cli/skills/quickstart/SKILL.md
run <plugin> <resource> <action>one-shot command #365 (am/am-f17c27-dkdoeotqzvn8-3120cd1a): fix(feat:sc run <plugin> <action>— one-shot discover+install+execute #335): implementrun <plugin> <resource> <action>one-shot commandtouches: tests/run-command.test.js, cli/help-json.js, cli/help.js, cli/run.js, cli/supercli.js
Branch:
am/am-f17c27-dkl69r15q5up-8de7f2caDiff:
Summary by CodeRabbit