Skip to content

fix(#298): add README to bundled notion-cli plugin - #376

Merged
javimosch merged 1 commit into
masterfrom
am/am-f17c27-dkl69r15q5up-8de7f2ca
Aug 10, 2026
Merged

fix(#298): add README to bundled notion-cli plugin#376
javimosch merged 1 commit into
masterfrom
am/am-f17c27-dkl69r15q5up-8de7f2ca

Conversation

@javimosch

@javimosch javimosch commented Aug 10, 2026

Copy link
Copy Markdown
Owner

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.

Branch: am/am-f17c27-dkl69r15q5up-8de7f2ca

Diff:

plugins/notion-cli/README.md | 104 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 104 insertions(+)

Summary by CodeRabbit

  • Documentation
    • Added setup and usage guidance for the Notion CLI plugin harness.
    • Documented prerequisites, authentication, installation, supported commands, command passthrough, output behavior, and key features.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The Notion CLI plugin now includes a complete README with setup instructions, authentication, installation, command examples, upstream passthrough, JSON output behavior, and supported features.

Changes

Notion CLI documentation

Layer / File(s) Summary
Document Notion CLI usage
plugins/notion-cli/README.md
Adds prerequisites, token setup, binary installation, dcli examples, raw API requests, passthrough behavior, JSON output details, and supported feature documentation.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the addition of a README file to the bundled notion-cli plugin.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch am/am-f17c27-dkl69r15q5up-8de7f2ca

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between c912b26 and 7e40d3a.

📒 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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 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
fi

Repository: 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]}")
PY

Repository: 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]}")
PY

Repository: 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:


🏁 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
PY

Repository: 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}' || true

Repository: 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:


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.

Suggested change
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.

@javimosch
javimosch merged commit fa79402 into master Aug 10, 2026
0 of 2 checks passed
@javimosch
javimosch deleted the am/am-f17c27-dkl69r15q5up-8de7f2ca branch August 10, 2026 10:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant