fix(#298): add go install instructions to bundled notion-cli plugin - #373
fix(#298): add go install instructions to bundled notion-cli plugin#373javimosch wants to merge 1 commit into
Conversation
Adds the primary `go install github.com/4ier/notion-cli@latest` installation path and explains how to symlink/rename the resulting `notion-cli` binary as `notion` so the plugin's `which notion` check and all commands work. Fixes #298 Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
📝 WalkthroughWalkthroughThe Notion CLI installation guidance now uses ChangesNotion CLI installation
Estimated code review effort: 1 (Trivial) | ~5 minutes Possibly related issues
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: 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`:
- Line 7: Update the Go bin path resolution to use only the first
colon-separated GOPATH entry before appending /bin. Apply this change to the
symlink command in plugins/notion-cli/install-guidance.json at lines 7-7, and
the corresponding occurrences in plugins/notion-cli/plugin.json at lines 15-15
and plugins/notion-cli/skills/quickstart/SKILL.md at lines 65-65.
- Around line 6-7: Update the Windows installation guidance so it explicitly
installs or copies the go-installed notion-cli binary to a notion executable
using PowerShell or Scoop, rather than relying on POSIX syntax or an incomplete
Scoop mention. Apply the same guidance consistently in
plugins/notion-cli/install-guidance.json lines 6-7,
plugins/notion-cli/plugin.json lines 14-15, and
plugins/notion-cli/skills/quickstart/SKILL.md lines 61-66.
- Around line 7-8: Add a PATH update using the Go binary directory before the
notion --version check in plugins/notion-cli/install-guidance.json (lines 7-8),
plugins/notion-cli/plugin.json (lines 14-15), and
plugins/notion-cli/skills/quickstart/SKILL.md (lines 61-66). Ensure each
installation flow includes GOBIN or GOPATH/bin on PATH before verification.
🪄 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: 0607d502-f2e7-4e6d-949d-5c97b5909876
📒 Files selected for processing (3)
plugins/notion-cli/install-guidance.jsonplugins/notion-cli/plugin.jsonplugins/notion-cli/skills/quickstart/SKILL.md
| "go install github.com/4ier/notion-cli@latest", | ||
| "GOBIN=$(go env GOBIN); GOPATH=$(go env GOPATH); ln -sf \"${GOBIN:-$GOPATH/bin}/notion-cli\" \"${GOBIN:-$GOPATH/bin}/notion\"", |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "Files:"
fd -a '^(install-guidance|plugin\.json|SKILL\.md)$' . | sed 's#^\./##' | sort
echo
echo "Relevant notional 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"
wc -l "$f"
cat -n "$f"
else
echo "MISSING: $f"
fi
done
echo
echo "Search for notion plugin metadata/files:"
rg -n '"notion"|go install|ln -sf|scoop|powershell|winget|install-guidance|runtime' plugins/notion-cli plugins 2>/dev/null | head -200 || trueRepository: javimosch/supercli
Length of output: 50375
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "notion plugin 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"
cat -n "$f"
else
echo "MISSING: $f"
fi
done
echo "--- notion command matches "---
rg -n '"command"|notion|go install|ln -sf|scoop|powershell|winget' \
plugins/notion-cli/install-guidance.json \
plugins/notion-cli/plugin.json \
plugins/notion-cli/skills/quickstart/SKILL.md \
2>/dev/null || true
echo
echo "Relevant meta/plugin fields in notion plugin:"
python3 - <<'PY'
import json, pathlib
for p in [
pathlib.Path('plugins/notion-cli/plugin.json'),
pathlib.Path('plugins/notion-cli/install-guidance.json'),
]:
if not p.exists():
continue
data=json.loads(p.read_text())
print(p)
for key in ['name','runtime','binary','commands','install-guidance','guidance']:
if key in data:
v=data[key]
print(f" {key}: {json.dumps(v, ensure_ascii=False, indent=2)[:600]}")
PYRepository: javimosch/supercli
Length of output: 24301
Provide explicit Windows installation steps.
The go install → symlink flow uses POSIX shell syntax ($(...), ln -sf), and the Windows option only says Scoop without creating the required notion executable path. Add a PowerShell or Scoop step that installs/copies the notion-cli binary as notion in install-guidance.json, plugin.json, and skills/quickstart/SKILL.md.
📍 Affects 3 files
plugins/notion-cli/install-guidance.json#L6-L7(this comment)plugins/notion-cli/plugin.json#L14-L15plugins/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 6 - 7, Update the
Windows installation guidance so it explicitly installs or copies the
go-installed notion-cli binary to a notion executable using PowerShell or Scoop,
rather than relying on POSIX syntax or an incomplete Scoop mention. Apply the
same guidance consistently in plugins/notion-cli/install-guidance.json lines
6-7, plugins/notion-cli/plugin.json lines 14-15, and
plugins/notion-cli/skills/quickstart/SKILL.md lines 61-66.
| "install_steps": [ | ||
| "brew install 4ier/tap/notion-cli", | ||
| "go install github.com/4ier/notion-cli@latest", | ||
| "GOBIN=$(go env GOBIN); GOPATH=$(go env GOPATH); ln -sf \"${GOBIN:-$GOPATH/bin}/notion-cli\" \"${GOBIN:-$GOPATH/bin}/notion\"", |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== 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 ---"
nl -ba "$f" | sed -n '1,120p'
else
echo "missing $f"
fi
done
echo "== related notion installs =="
rg -n "GOPATH|GOBIN|notion-cli|notion\"" plugins/notion-cli -S || true
echo "== go bin behavior probe =="
bash -c '
tmp="$(mktemp -d)"
mkdir -p "$tmp/a/bin"
export GOPATH="$tmp/a:$tmp/b"
GOBIN=""
link="${GOBIN:-$GOPATH/bin}/notion-cli"
target="${GOBIN:-$GOPATH/bin}/notion"
printf "link=%s\ntarget=%s\n" "$link" "$target"
[ -d "$link" ] && ls -l "$link" || echo "no link"
'Repository: javimosch/supercli
Length of output: 257
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== 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 ---"
awk '{ printf "%5d\t%s\n", NR, $0 }' "$f" | sed -n '1,120p'
else
echo "missing $f"
fi
done
echo "== related notion installs =="
rg -n "GOPATH|GOBIN|notion-cli|notion\"" plugins/notion-cli -S || true
echo "== go bin behavior probe =="
bash -c '
tmp="$(mktemp -d)"
mkdir -p "$tmp/a/bin"
export GOPATH="$tmp/a:$tmp/b"
GOBIN=""
link="${GOBIN:-$GOPATH/bin}/notion-cli"
target="${GOBIN:-$GOPATH/bin}/notion"
printf "link=%s\ntarget=%s\n" "$link" "$target"
[ -d "$link" ] && ls -l "$link" || echo "no link"
'Repository: javimosch/supercli
Length of output: 16223
Use the first GOPATH entry for the Go bin path.
GOPATH can contain colon-separated entries, and ${GOPATH/bin} appends /bin to the whole list, so the symlink command points to an invalid source. Select the first GOPATH entry in all occurrences:
plugins/notion-cli/install-guidance.jsonplugins/notion-cli/plugin.jsonplugins/notion-cli/skills/quickstart/SKILL.md
📍 Affects 3 files
plugins/notion-cli/install-guidance.json#L7-L7(this comment)plugins/notion-cli/plugin.json#L15-L15plugins/notion-cli/skills/quickstart/SKILL.md#L65-L65
🤖 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 7, Update the Go bin path
resolution to use only the first colon-separated GOPATH entry before appending
/bin. Apply this change to the symlink command in
plugins/notion-cli/install-guidance.json at lines 7-7, and the corresponding
occurrences in plugins/notion-cli/plugin.json at lines 15-15 and
plugins/notion-cli/skills/quickstart/SKILL.md at lines 65-65.
| "GOBIN=$(go env GOBIN); GOPATH=$(go env GOPATH); ln -sf \"${GOBIN:-$GOPATH/bin}/notion-cli\" \"${GOBIN:-$GOPATH/bin}/notion\"", | ||
| "Verify: notion --version", |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== files =="
for f in plugins/notion-cli/install-guidance.json plugins/notion-cli/plugin.json plugins/notion-cli/skills/quickstart/SKILL.md; do
echo "--- $f ---"
wc -l "$f"
done
echo
echo "== relevant install-guidance =="
cat -n plugins/notion-cli/install-guidance.json | sed -n '1,30p'
echo
echo "== relevant plugin manifest install section =="
cat -n plugins/notion-cli/plugin.json | sed -n '1,25p'
echo
echo "== relevant quickstart command section =="
cat -n plugins/notion-cli/skills/quickstart/SKILL.md | sed -n '55,75p'
echo
echo "== references to PATH/gopath/gobin in notion plugin files =="
rg -n "PATH|GOBIN|GOPATH|ln -sf|go install" plugins/notion-cli || trueRepository: javimosch/supercli
Length of output: 5651
🏁 Script executed:
#!/bin/bash
set -euo pipefail
python3 - <<'PY'
import json
from pathlib import Path
files = [
Path("plugins/notion-cli/install-guidance.json"),
Path("plugins/notion-cli/plugin.json"),
Path("plugins/notion-cli/skills/quickstart/SKILL.md"),
]
paths = {}
for p in files:
text = p.read_text()
paths[str(p)] = {"content": text, "paths": [line for line in text.splitlines() if "PATH" in line or "PATH " in line]}
for p, data in paths.items():
print(f"== {p} ==")
if data["paths"]:
for line in data["paths"]:
print(line)
else:
print("no PATH instruction found")
print("== structured installs == ")
for p in [Path("plugins/notion-cli/install-guidance.json"), Path("plugins/notion-cli/plugin.json")]:
print(f"-- {p} --")
data = json.loads(p.read_text())
if isinstance(data, dict) and "install" in data and isinstance(data["install"], list):
for i, step in enumerate(data["install"], 1):
print(f"{i}: {step!r}")
PYRepository: javimosch/supercli
Length of output: 790
🏁 Script executed:
#!/bin/bash
set -euo pipefail
python3 - <<'PY'
import json, os, sys
sys.path.insert(0, ".")
path = "plugins/notion-cli/plugin.json"
data = json.loads(Path(path).read_text())
json_str = json.dumps(data, ensure_ascii=False)
for i, line in enumerate(json_str.strip().splitlines(), 1):
print(f"{i:4d}: {line}")
print("--- parsed install array ---")
for i, step in enumerate(data["install"], 1):
print(f"{i}: {step!r}")
PYRepository: javimosch/supercli
Length of output: 267
🌐 Web query:
Go command environment GOPATH default $HOME/go/bin go install PATH
💡 Result:
When you run the go install command, Go determines the installation directory for binaries based on the following hierarchy [1][2]: 1. If the GOBIN environment variable is set, Go installs binaries to that directory [1][3]. 2. If GOBIN is not set, Go uses the bin subdirectory of the current GOPATH [1][2]. 3. If GOPATH is not explicitly set, it defaults to $HOME/go on Unix-like systems (or %USERPROFILE%\go on Windows), and the binary is installed to $HOME/go/bin [4][1][5]. To ensure you can run the installed binaries without specifying their full path, you should add the relevant bin directory to your system's PATH environment variable [1][6]. Summary of Environment Variables: - GOPATH: Specifies your Go workspace [7]. If unset, it defaults to $HOME/go [8][5]. - GOBIN: An optional override [9]. If set, all binaries are installed to this directory, regardless of the GOPATH setting [1][10]. It must be an absolute path [9][10]. You can check your current configuration by running the command: go env [5][10]. This will display the effective values for GOPATH, GOBIN, and the final installation target for your environment [1][6].
Citations:
- 1: https://go.dev/doc/code
- 2: https://pkg.go.dev/cmd/go
- 3: https://manpages.debian.org/unstable/golang-go/go-install.1.en.html
- 4: https://go.dev/wiki/GOPATH
- 5: https://manpages.debian.org/bookworm/golang-go/go-path.7.en.html
- 6: https://go.dev/doc/tutorial/compile-install
- 7: https://go.dev/wiki/SettingGOPATH
- 8: https://go.dev/doc/articles/go_command
- 9: https://stackoverflow.com/questions/25216765/gobin-not-set-cannot-run-go-install
- 10: https://manpages.debian.org/trixie/gccgo-go/go-path.7.en.html
Make the Go binary directory available on PATH in every installation flow.
go install places binaries in GOBIN or GOPATH/bin, but these files do not add that directory to PATH. Add a PATH update before the notion --version check in install-guidance.json, plugin.json, and quickstart/SKILL.md.
📍 Affects 3 files
plugins/notion-cli/install-guidance.json#L7-L8(this comment)plugins/notion-cli/plugin.json#L14-L15plugins/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, Add a PATH
update using the Go binary directory before the notion --version check in
plugins/notion-cli/install-guidance.json (lines 7-8),
plugins/notion-cli/plugin.json (lines 14-15), and
plugins/notion-cli/skills/quickstart/SKILL.md (lines 61-66). Ensure each
installation flow includes GOBIN or GOPATH/bin on PATH before verification.
|
🤖 Escalated to CEO: https://github.com/javimosch/am-fleet/issues/44 The rebaser could not resolve conflicts automatically. Reply on the issue above to unblock this PR. |
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
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
touches: .github/workflows/sc-machin-release.yml, README.md, supercli-machin-cli/README.md, supercli-machin-cli/install.sh
Branch:
am/am-f17c27-dkgvzomn2u44-23e3c40bDiff:
Summary by CodeRabbit
go install.notion-clibinary asnotion.