-
Notifications
You must be signed in to change notification settings - Fork 7
fix(#298): add go install instructions to bundled notion-cli plugin #373
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,11 +3,12 @@ | |
| "binary": "notion", | ||
| "check": "which notion", | ||
| "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. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 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
📍 Affects 3 files
🤖 Prompt for AI Agents |
||
| "Verify: notion --version", | ||
|
Comment on lines
+7
to
8
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 "== 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:
💡 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:
Make the Go binary directory available on
📍 Affects 3 files
🤖 Prompt for AI Agents |
||
| "Authenticate: echo 'ntn_xxxxx' | notion auth login --with-token", | ||
| "Alternative auth: export NOTION_TOKEN=ntn_xxxxx", | ||
| "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": "Primary install is `go install github.com/4ier/notion-cli@latest`, which builds a binary named `notion-cli`. Link or rename it to `notion` before the `Verify` step. Also available via Homebrew (`brew install 4ier/tap/notion-cli`), GitHub Releases (https://github.com/4ier/notion-cli/releases), npm (`npm install -g @4ier/notion-cli`), or Scoop on Windows. Token stored in ~/.config/notion-cli/config.json (mode 0600). Auto-detects JSON output when piped to another command." | ||
| } | ||
There was a problem hiding this comment.
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:
Repository: javimosch/supercli
Length of output: 50375
🏁 Script executed:
Repository: 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 requirednotionexecutable path. Add a PowerShell or Scoop step that installs/copies thenotion-clibinary asnotionininstall-guidance.json,plugin.json, andskills/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