Skip to content

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

Open
javimosch wants to merge 1 commit into
masterfrom
am/am-f17c27-dkg1g7311cne-ca767030
Open

fix(#298): add go install instructions to bundled notion-cli plugin#371
javimosch wants to merge 1 commit into
masterfrom
am/am-f17c27-dkg1g7311cne-ca767030

Conversation

@javimosch

@javimosch javimosch commented Aug 4, 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-dkg1g7311cne-ca767030

Diff:

plugins/notion-cli/install-guidance.json      |  5 +++--
 plugins/notion-cli/plugin.json                |  7 ++++---
 plugins/notion-cli/skills/quickstart/SKILL.md | 17 ++++++++++++++++-
 3 files changed, 23 insertions(+), 6 deletions(-)

Summary by CodeRabbit

  • Documentation
    • Updated installation guidance to include multiple methods: Go installation with binary linking, npm, Homebrew, and GitHub Releases downloads.
    • Expanded setup documentation with clearer instructions, including binary naming conventions and configuration details.

Add `go install github.com/4ier/notion-cli@latest` as the primary
installation method. The Go build produces a `notion-cli` binary, so
include a GOBIN/GOPATH-aware `ln -sf` step to expose it as `notion`
for the existing plugin commands. Also update install-guidance.json,
plugin.json missingDependencyHelp, and the quickstart SKILL.md.

Fixes #298

Generated with Devin
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 4, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

This PR updates Notion CLI plugin files to add go install as an installation method. It updates install-guidance.json and plugin.json with new install steps, binary linking commands, and updated dependency help text. It also updates SKILL.md with the same options.

Changes

Notion CLI Go install guidance

Layer / File(s) Summary
Install guidance and plugin config updates
plugins/notion-cli/install-guidance.json, plugins/notion-cli/plugin.json
Installation steps now use go install github.com/4ier/notion-cli@latest followed by a command that links the binary as notion. The missingDependencyHelp text for the version and passthrough commands states the Go method first and keeps the Homebrew option as an alternative. The install-guidance note explains binary naming, token storage, permissions, and piped JSON behavior.
Quickstart skill documentation update
plugins/notion-cli/skills/quickstart/SKILL.md
The quickstart doc lists Go, npm, and GitHub Releases installation options in addition to Homebrew, and explains how to link the installed notion-cli binary as notion.

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 accurately describes the main change: adding Go installation instructions to the Notion CLI plugin to address issue #298.
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-dkg1g7311cne-ca767030

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/install-guidance.json`:
- Around line 7-8: Make the Go binary directory discoverable by adding
`${GOBIN:-$GOPATH/bin}` to PATH and persisting that change before any notion
commands run. Update the install guidance and every affected setup,
verification, and quickstart instruction in
plugins/notion-cli/install-guidance.json (lines 7-8),
plugins/notion-cli/plugin.json (lines 14-16, 34, and 234), and
plugins/notion-cli/skills/quickstart/SKILL.md (lines 61-66); preserve the
existing symlink and notion --version/help steps.
🪄 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: a544d344-c1c9-42b6-ad2c-aa8ab30df907

📥 Commits

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

📒 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 +7 to 8
"Link the binary: GOBIN=$(go env GOBIN); GOPATH=$(go env GOPATH); ln -sf \"${GOBIN:-$GOPATH/bin}/notion-cli\" \"${GOBIN:-$GOPATH/bin}/notion\"",
"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:

#!/bin/bash
set -euo pipefail

printf 'Repo files matching notion-cli:\n'
git ls-files | rg '(^|/)notion-cli/|notion-cli' || true

printf '\nInspect notion-cli plugin files:\n'
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 ($(wc -l < "$f") lines) ---"
    sed -n '1,260p' "$f" | nl -ba
  fi
done

printf '\nSearch for mention of `notion` and go install in repository:\n'
rg -n '"notion"|notion-cli|go install|PATH|PATH' plugins/notion-cli README.md 2>/dev/null || true

Repository: javimosch/supercli

Length of output: 506


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf 'notion-cli plugin files:\n'
git ls-files plugins/notion-cli | sort

for f in plugins/notion-cli/install-guidance.json plugins/notion-cli/meta.json plugins/notion-cli/plugin.json plugins/notion-cli/skills/quickstart/SKILL.md; do
  if [ -f "$f" ]; then
    echo "--- $f ---"
    sed -n '1,280p' "$f" | awk '{print NR": "$0}'
  else
    echo "missing $f"
  fi
done

printf '\nRelevant notion references in repository docs/files:\n'
rg -n '"notion"|notion-cli|go install|PATH' . --glob '!node_modules/**' --glob '!dist/**' --glob '!build/**' 2>/dev/null || true

Repository: javimosch/supercli

Length of output: 50377


🌐 Web query:

Go environment variables GOPATH default $HOME/go pkg/bin path installation document

💡 Result:

The GOPATH environment variable defines the location of your Go workspace. If it is not explicitly set, Go defaults it to $HOME/go on Unix systems and %USERPROFILE%\go on Windows [1][2][3]. The GOPATH directory structure is primarily used for the following purposes: 1. bin directory: This directory contains compiled binary executables [4][5][6]. When you run go install, the resulting binary is placed here by default, unless the GOBIN environment variable is set (in which case GOBIN takes precedence) [3][7]. 2. pkg directory: This directory holds cached data and dependencies. Specifically: - Module cache: When using Go modules, downloaded dependencies are stored in $GOPATH/pkg/mod [1][3][5]. - Build cache: Historically, compiled package objects were stored in subdirectories of pkg/ (e.g., pkg/GOOS_GOARCH/), though modern Go module-aware builds handle caching differently [4][5][7]. - Sum database: Go stores checksum database state in $GOPATH/pkg/sumdb [1]. You can view your current Go environment settings, including the effective GOPATH, by running the command: go env If you wish to change the default GOPATH location, you can set it permanently using: go env -w GOPATH=/your/custom/path Note that GOPATH should not be set to the same directory as your Go installation (GOROOT) [2][8]. Although modern Go development primarily relies on Go modules rather than the traditional GOPATH workspace mode for resolving source imports, the GOPATH variable remains essential for determining these default binary and cache installation paths [1][5][6].

Citations:


🌐 Web query:

Go language specification command search PATH no GOPATH/bin unless GOBIN set

💡 Result:

The Go command does not search the PATH to determine where to install binaries; rather, it uses a specific directory priority to determine the installation location [1][2]. When you run 'go install', the destination directory for the resulting executable is determined by the following precedence rules [2][3]: 1. GOBIN: If the GOBIN environment variable is set, the 'go' command installs executables to that directory [1][2]. 2. GOPATH: If GOBIN is not set and GOPATH is set, the command installs executables to the 'bin' subdirectory of the first entry in the GOPATH list [2][4]. 3. Default: If neither GOBIN nor GOPATH is set, the command defaults to the 'bin' subdirectory of the default GOPATH, which is '$HOME/go/bin' (or '%USERPROFILE%\go\bin' on Windows) [1][2]. Note that these rules apply to the installation of binaries by the 'go' command, not to the system's PATH search mechanism for locating executable commands to run [2][5]. After installing a binary, it is standard practice to add the installation directory (e.g., '$GOPATH/bin') to your system PATH so that the installed tools can be executed easily [2][6].

Citations:


🌐 Web query:

node.js child_process exec PATH inherited environment process.env.PATH

💡 Result:

In Node.js, the child_process.exec function uses the environment variables specified in the options.env object to execute the command [1][2]. By default, the environment is inherited from the parent process (process.env) [1][3]. If you provide an options.env object, it replaces the entire environment for the child process [1][2]. This means that if you define a custom env object but do not include the original PATH variable, the child process will not have access to the parent's PATH [1][2]. Key behaviors regarding PATH and environment inheritance include: 1. Inheritance: If no env option is provided, the child process automatically inherits the complete process.env from the parent [1][3]. 2. Overriding: If you pass an env object, you must explicitly include all environment variables you wish to preserve, including PATH [4]. A common practice is to spread the existing environment: { env: {...process.env, MY_VAR: 'value' } } [4]. 3. PATH Lookup: The command lookup for the child process uses the PATH variable present in the provided options.env object [1][2]. If options.env is provided but does not contain PATH, the system defaults to a limited search path (/usr/bin:/bin on Unix) or the current process's environment PATH (on Windows) [1][2]. 4. Windows Caveat: On Windows, environment variables are case-insensitive. Node.js sorts keys lexicographically and uses the first match, which can cause issues if your env object contains both PATH and Path [5][3]. For complex environments, it is recommended to explicitly construct the environment object rather than relying on implicit inheritance when modifying specific variables [4].

Citations:


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf 'notion-cli files with line numbers:\n'
for f in plugins/notion-cli/install-guidance.json plugins/notion-cli/meta.json plugins/notion-cli/plugin.json plugins/notion-cli/skills/quickstart/SKILL.md; do
  if [ -f "$f" ]; then
    wc -l "$f"
    sed -n '1,280p' "$f"
  fi
done

printf '\nTests for notion-cli:\n'
sed -n '1,260p' __tests__/notion-cli-plugin.test.js

printf '\nSearch adapter command and check binary usage:\n'
rg -n '"check".*"notion"|"command".*"notion"|which notion' plugins/notion-cli plugin tests __tests__ --glob '!node_modules/**' || true

Repository: javimosch/supercli

Length of output: 18075


Make the Go-installed notion binary discoverable.

Go installs notion-cli to ${GOBIN:-$GOPATH/bin}, and the OS only finds it when that directory is in PATH. The symlink is placed in the same target directory, so add the appropriate Go binary directory to PATH and persist it before the notion --version check/helps.

Update these locations:

  • plugins/notion-cli/install-guidance.json
  • plugins/notion-cli/plugin.json
  • plugins/notion-cli/skills/quickstart/SKILL.md
📍 Affects 3 files
  • plugins/notion-cli/install-guidance.json#L7-L8 (this comment)
  • plugins/notion-cli/plugin.json#L14-L16
  • plugins/notion-cli/plugin.json#L34-L34
  • plugins/notion-cli/plugin.json#L234-L234
  • plugins/notion-cli/skills/quickstart/SKILL.md#L61-L66
🤖 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 7 - 8, Make the Go
binary directory discoverable by adding `${GOBIN:-$GOPATH/bin}` to PATH and
persisting that change before any notion commands run. Update the install
guidance and every affected setup, verification, and quickstart instruction in
plugins/notion-cli/install-guidance.json (lines 7-8),
plugins/notion-cli/plugin.json (lines 14-16, 34, and 234), and
plugins/notion-cli/skills/quickstart/SKILL.md (lines 61-66); preserve the
existing symlink and notion --version/help steps.

@javimosch

Copy link
Copy Markdown
Owner Author

🤖 Escalated to CEO: https://github.com/javimosch/am-fleet/issues/46

The rebaser could not resolve conflicts automatically. Reply on the issue above to unblock this PR.

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