Skip to content

fix(#298): add go install instructions to notion-cli plugin - #367

Closed
javimosch wants to merge 1 commit into
masterfrom
am/am-f17c27-dkf5c0j0zay2-eb4e39b6
Closed

fix(#298): add go install instructions to notion-cli plugin#367
javimosch wants to merge 1 commit into
masterfrom
am/am-f17c27-dkf5c0j0zay2-eb4e39b6

Conversation

@javimosch

@javimosch javimosch commented Aug 3, 2026

Copy link
Copy Markdown
Owner

Automated maintenance run by automaintainer.

Focus: ISSUE FIX OBJECTIVE (GitHub Issue #298: "Add 4ier/notion-cli as bundled plugin")

ISSUE DESCRIPTION:

Feature Request: Add Notion CLI Plugin

Plugin: 4ier/notion-cli

Why this plugin?

  • Full-featured Notion CLI with 39 commands
  • Complete Notion API coverage (pages, databases, blocks, comments, users, files)
  • Single binary (Go), cross-platform (Linux, macOS, Windows)
  • MIT licensed, actively maintained (222 stars, 8 releases)
  • "Like gh for GitHub, but for Notion" - familiar CLI pattern
  • AI-friendly with JSON output and schema-aware operations

Key Features

  • Auth: Internal integration token support
  • Pages: view, list, create, delete, restore, move, open, set properties, edit
  • Databases: list, view, query, create, update, add, export
  • Blocks: full block lifecycle management
  • Search: workspace-wide search
  • Users: workspace member management
  • Files: upload and manage files
  • Templates: apply consistent page structures

Installation

go install github.com/4ier/notion-cli@latest

Use Cases

  • Developer workflow automation
  • AI agent integration for knowledge base operations
  • Scripted Notion workspace management
  • Bulk data operations on databases
  • Content management and publishing workflows

Comparison

Provides more comprehensive API coverage than alternatives like the official ntn CLI, with better cross-platform support (including Windows).

Generated with Devin

APPROACH: Minimal fix — implement the described change with the smallest safe diff. Stay as close to the issue description as possible.

PROCEDURE (follow in order, do not deviate):

  1. Read the issue and orient to the affected code (at most ~4 commands, then stop).
  2. Implement the fix described above — stay close to the issue description.
  3. If a test suite exists, verify the fix passes it.
  4. COMMIT referencing the issue: fix(Add 4ier/notion-cli as bundled plugin #298):
  5. The PR body MUST include 'Fixes Add 4ier/notion-cli as bundled plugin #298' so GitHub auto-closes the issue on merge.
  6. One focused fix is a complete win. Do not scope-creep.

Branch: am/am-f17c27-dkf5c0j0zay2-eb4e39b6

Diff:

plugins/notion-cli/install-guidance.json      | 4 ++--
 plugins/notion-cli/plugin.json                | 6 +++---
 plugins/notion-cli/skills/quickstart/SKILL.md | 8 +++++++-
 3 files changed, 12 insertions(+), 6 deletions(-)

Summary by CodeRabbit

  • Documentation
    • Updated Notion CLI installation guidance to recommend Go installation, with Homebrew and GitHub Releases as alternatives.
    • Added npm installation information and clarified that GitHub Releases provide downloadable binaries.
    • Expanded guidance on token storage and piped JSON output behavior.
    • Updated installation and authentication help messages across setup and command usage instructions.

Adds the official `go install github.com/4ier/notion-cli@latest`
installation method to the notion-cli plugin manifest, install
guidance, and quickstart skill. Homebrew and GitHub releases remain
as alternatives.

Fixes #298

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@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 3, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The Notion CLI documentation and plugin messages now recommend Go installation, retain Homebrew as an alternative, and document GitHub Releases, npm, token storage, and piped JSON behavior.

Changes

Notion CLI installation guidance

Layer / File(s) Summary
Installation documentation
plugins/notion-cli/install-guidance.json, plugins/notion-cli/skills/quickstart/SKILL.md
Installation guidance now uses go install github.com/4ier/notion-cli@latest, documents alternative installation methods, and clarifies binary downloads and token handling.
Plugin dependency messages
plugins/notion-cli/plugin.json
Plugin setup, version checks, and passthrough messages now recommend Go installation while retaining Homebrew instructions.

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

Possibly related PRs

  • javimosch/supercli#198: Updates plugin installation guidance and related documentation with Go-based installation commands.
🚥 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 identifies the main change: adding Go installation instructions to the notion-cli plugin.
Linked Issues check ✅ Passed The changes add the requested Go installation command and update all relevant notion-cli installation guidance in line with issue #298.
Out of Scope Changes check ✅ Passed All changes update notion-cli installation documentation and remain within the scope of issue #298.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch am/am-f17c27-dkf5c0j0zay2-eb4e39b6

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

🤖 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/install-guidance.json`:
- Around line 8-9: Update the authentication guidance strings to avoid embedding
the token directly in command text or shell history: use a hidden prompt or
external secret source and pipe its value into `notion auth login --with-token`.
Revise or remove the `NOTION_TOKEN` alternative so it likewise does not expose
the real token in shell history.
- Line 12: Update the note string in install-guidance.json to scope the mode
0600 file-permission guarantee explicitly to Unix-like systems, and add separate
wording describing the Windows read-only file-attribute protection. Keep the
existing installation sources and token path unchanged.
- Around line 6-7: Document the Go binary PATH requirement before verification
or authentication: in plugins/notion-cli/install-guidance.json lines 6-7,
plugins/notion-cli/skills/quickstart/SKILL.md lines 61-63, and
plugins/notion-cli/plugin.json line 14, add a PATH setup step or explicit
GOBIN/GOPATH/bin install-location guidance so the installed notion binary is
discoverable by notion --version and plugin checks.
🪄 Autofix (Beta)

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: 39f8ba7d-7039-4642-b850-c86edcb6e3ea

📥 Commits

Reviewing files that changed from the base of the PR and between 6df5369 and 289617e.

📒 Files selected for processing (3)
  • plugins/notion-cli/install-guidance.json
  • plugins/notion-cli/plugin.json
  • plugins/notion-cli/skills/quickstart/SKILL.md

Comment on lines +6 to 7
"go install github.com/4ier/notion-cli@latest",
"Verify: notion --version",

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:

#!/usr/bin/env sh
set -eu

gobin="$(go env GOBIN)"
if [ -z "$gobin" ]; then
  gobin="$(go env GOPATH)/bin"
fi

test -x "$gobin/notion"
case ":${PATH:-}:" in
  *":$gobin:"*) ;;
  *) echo "$gobin is not in PATH" >&2; exit 1 ;;
esac

command -v notion >/dev/null

Repository: javimosch/supercli

Length of output: 156


🏁 Script executed:

#!/usr/bin/env sh
set -eu

echo "Go environment:"
gop="$(go env GOPATH)"
gob=$(go env GOBIN)
if [ -z "$gob" ]; then
  gob="$gop/bin"
fi
printf "GOPATH=%s\nGOBIN=%s\nDEFAULT_BIN=%s\nPATH=%s\n" "$gop" "$(go env GOBIN)" "$gob" "$PATH"
printf "default binary exists executable? "
[ -x "$gob/notion" ] && echo yes || echo no
printf "default binary in PATH? "
case ":${PATH:-}:" in
  *":$gob:") echo yes ;;
  *) echo no ;;
esac
printf "notion available? "
command -v notion >/dev/null && echo yes || echo no

echo
echo "Relevant files:"
for f in plugins/notion-cli/install-guidance.json plugins/notion-cli/plugin.json plugins/notion-cli/skills/quickstart/SKILL.md; do
  if [ -f "$f" ]; then
    echo "--- $f ---"
    sed -n '1,90p' "$f"
  fi
done

Repository: javimosch/supercli

Length of output: 6974


🌐 Web query:

go install executable GOPATH/bin GOBIN PATH official documentation

💡 Result:

When you run the go install command, the Go toolchain compiles and installs executables based on the following precedence for the installation directory [1][2][3]: 1. GOBIN Environment Variable: If the GOBIN environment variable is set, Go installs executables directly into this directory [1][2][4]. 2. Default Location: If GOBIN is not set, Go installs executables into the bin subdirectory of the GOPATH [1][2][4]. If GOPATH is not set, it defaults to $HOME/go/bin (on Unix) or %USERPROFILE%\go\bin (on Windows) [1][2][4]. Note that executables in the Go installation root (GOROOT) are installed into $GOROOT/bin or the GOTOOLDIR, rather than the GOBIN path [1][5]. To discover exactly where your Go binaries are currently being installed, you can use the following command [6]: go list -f '{{.Target}}' If you wish to change this location, you can set the GOBIN variable using the go env command [6][2]: go env -w GOBIN=/path/to/your/bin To run these installed executables without providing a full path, the directory containing them must be included in your system's PATH environment variable [6][2]. You can verify the current bin directory location by running go env GOBIN or by checking your GOPATH configuration [2][4][7].

Citations:


Document the Go binary PATH requirement.

go install puts executables in GOBIN or GOPATH/bin; notion --version and the plugin check require the installed binary to be in PATH. Add a PATH setup step or explicit install-location guidance before the verification/auth commands.

Applies to plugins/notion-cli/install-guidance.json, plugins/notion-cli/plugin.json, and plugins/notion-cli/skills/quickstart/SKILL.md.

📍 Affects 3 files
  • plugins/notion-cli/install-guidance.json#L6-L7 (this comment)
  • plugins/notion-cli/skills/quickstart/SKILL.md#L61-L63
  • plugins/notion-cli/plugin.json#L14-L14
🤖 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/install-guidance.json` around lines 6 - 7, Document the Go
binary PATH requirement before verification or authentication: in
plugins/notion-cli/install-guidance.json lines 6-7,
plugins/notion-cli/skills/quickstart/SKILL.md lines 61-63, and
plugins/notion-cli/plugin.json line 14, add a PATH setup step or explicit
GOBIN/GOPATH/bin install-location guidance so the installed notion binary is
discoverable by notion --version and plugin checks.

Comment on lines 8 to 9
"Authenticate: echo 'ntn_xxxxx' | notion auth login --with-token",
"Alternative auth: export NOTION_TOKEN=ntn_xxxxx",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Do not place the real token in shell history.

When users replace ntn_xxxxx, both commands can record the token in shell history. Use a hidden prompt or an external secret source, then pipe the value to notion auth login --with-token.

🤖 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/install-guidance.json` around lines 8 - 9, Update the
authentication guidance strings to avoid embedding the token directly in command
text or shell history: use a hidden prompt or external secret source and pipe
its value into `notion auth login --with-token`. Revise or remove the
`NOTION_TOKEN` alternative so it likewise does not expose the real token in
shell history.

"supercli plugins install ./plugins/notion-cli --on-conflict replace --json"
],
"note": "Also available as Go binary from GitHub Releases: https://github.com/4ier/notion-cli/releases. npm: npm install -g @4ier/notion-cli. Token stored in ~/.config/notion-cli/config.json (mode 0600). Auto-detects JSON output when piped to another command."
"note": "Also available via Homebrew (brew install 4ier/tap/notion-cli), as a Go binary from GitHub Releases (https://github.com/4ier/notion-cli/releases), or via npm (npm install -g @4ier/notion-cli). Token stored in ~/.config/notion-cli/config.json (mode 0600). Auto-detects JSON output when piped to another command."

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== file =="
cat -n plugins/notion-cli/install-guidance.json

echo
echo "== notion-cli plugin files =="
git ls-files plugins/notion-cli | sort

echo
echo "== related os.Chmod usages in notion-cli =="
rg -n "0600|os\\.Chmod|config\\.json|notion-cli/config" plugins/notion-cli -S || true

Repository: javimosch/supercli

Length of output: 1567


🌐 Web query:

Go os.Chmod Windows Unix mode bits ignore permissions official documentation

💡 Result:

In Go, the os.Chmod and (*File).Chmod functions behave differently on Windows compared to Unix-based systems because Windows does not support standard Unix-style permission bits [1][2]. Official documentation specifies that on Windows, os.Chmod only utilizes the 0o200 bit (the owner writable bit) of the provided mode [1][3]. This specific bit controls whether the file's read-only attribute is set or cleared [1][2]. All other permission bits (such as group or world permissions, or special bits like setuid/setgid) are ignored [1][2]. When using os.Chmod on Windows: - Setting the 0o200 bit (e.g., in 0o600) clears the read-only attribute, making the file writable [1][2]. - Omitting the 0o200 bit (e.g., in 0o400) sets the read-only attribute [1][2]. Important implementation notes: - The behavior is limited to files; Windows does not respect the read-only file attribute on directories in the same way [4][5]. - For backward compatibility with Go 1.12 and earlier, it is recommended to provide a non-zero mode [1][2]. - Historically, (*File).Chmod was not fully supported on Windows, leading to errors in older versions of Go [6][7], but it has since been implemented to align with the behavior of os.Chmod [6]. Always refer to the current documentation for your specific Go version, as subtle differences or error handling may have evolved [3][7].

Citations:


Limit the 0600 protection note to Unix-like systems.

The mode 0600 guarantee does not carry across to Windows in the same way; on Windows, Unix-style chmod bits are handled by the read-only file attribute, not owner-only ACLs. State that 0600 applies on Unix-like systems and document the Windows-only protection separately.

🤖 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/install-guidance.json` at line 12, Update the note string
in install-guidance.json to scope the mode 0600 file-permission guarantee
explicitly to Unix-like systems, and add separate wording describing the Windows
read-only file-attribute protection. Keep the existing installation sources and
token path unchanged.

@javimosch

Copy link
Copy Markdown
Owner Author

Closing as duplicate of #369 (most recent attempt for issue #298). Reducing PR cap pressure.

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.

Add 4ier/notion-cli as bundled plugin

1 participant