-
Notifications
You must be signed in to change notification settings - Fork 7
fix(#298): add go install instructions to bundled notion-cli plugin #374
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 | 🟠 Major | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "== candidate files =="
git ls-files | rg '(^|/)plugins/notion-cli/(plugin\.json|install-guidance\.json)$|meta\.json|schema' || true
echo
echo "== notion-cli files =="
for f in plugins/notion-cli/plugin.json plugins/notion-cli/install-guidance.json; do
if [ -f "$f" ]; then
echo "--- $f ($(wc -l < "$f") lines) ---"
cat -n "$f"
fi
done
echo
echo "== search for platform-conditioned guidance fields =="
rg -n '"installGuidance"|"instructions"|"install_guidance"|"platform|windows|powershell|scoop|ln -sf' plugins/notion-cli .github . -g 'plugins/*/**' || trueRepository: javimosch/supercli Length of output: 50375 🏁 Script executed: #!/bin/bash
set -euo pipefail
python3 - <<'PY'
import json
from pathlib import Path
for fp in ["plugins/notion-cli/plugin.json", "plugins/notion-cli/install-guidance.json"]:
p = Path(fp)
print(f"== {fp} ==")
data = json.loads(p.read_text())
def walk(x, path=""):
if isinstance(x, dict):
for k, v in x.items():
walk(v, f"{path}.{k}" if path else k)
walk(data)
print(json.dumps(data, indent=2))
PY
echo
echo "== schema references for install guidance keys =="
git ls-files | rg '(^|/)(meta|plugin|install-guidance).*\.json$|install' || trueRepository: javimosch/supercli Length of output: 50374 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "== focused notion-cli files =="
for f in plugins/notion-cli/plugin.json plugins/notion-cli/install-guidance.json; do
echo "--- $f ---"
cat -n "$f"
done
echo
echo "== focused search in notion-cli =="
rg -n '"install_guidance"|"installGuidance"|"ln -sf"|platform|windows|powershell|scoop|note' plugins/notion-cli || true
echo
echo "== focused search for platform keys in plugin install guidance =="
python3 - <<'PY'
import json, pathlib
for p in pathlib.Path("plugins").glob("*"):
if not p.is_dir() or p.name.startswith("."):
continue
for f in p.glob("plugin.json"):
try:
data = json.loads(f.read_text())
except Exception:
continue
ig = data.get("install_guidance", {})
meta = data.get("meta", {})
if isinstance(ig, dict) and any(k in ig for k in ["platforms","platform","windows","powershell","scoop","command","install_steps","windows_steps","pwsh","note"]):
print(f)
print(json.dumps({"install_guidance": ig, "meta": meta}, indent=2))
PYRepository: javimosch/supercli Length of output: 50374 Separate Unix and Windows installation instructions. Both guidance entries expose only POSIX install steps, including 📍 Affects 2 files
🤖 Prompt for AI Agents |
||
| "Verify: notion --version", | ||
| "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`), npm (`npm install -g @4ier/notion-cli`), GitHub Releases (https://github.com/4ier/notion-cli/releases), or Scoop on Windows. Token stored in ~/.config/notion-cli/config.json (mode 0600). Auto-detects JSON output when piped to another command." | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -58,11 +58,26 @@ export NOTION_TOKEN=ntn_xxxxx | |
|
|
||
| ## Installation | ||
|
|
||
| `go install` builds the binary as `notion-cli`; symlink it as `notion` so the plugin commands work: | ||
|
|
||
| ```bash | ||
| 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" | ||
| ``` | ||
|
|
||
| Or install with Homebrew: | ||
|
|
||
| ```bash | ||
| brew install 4ier/tap/notion-cli | ||
| ``` | ||
|
|
||
| Or download binary from [GitHub Releases](https://github.com/4ier/notion-cli/releases). | ||
| Or install with npm: | ||
|
|
||
| ```bash | ||
| npm install -g @4ier/notion-cli | ||
| ``` | ||
|
|
||
| Or download a binary from [GitHub Releases](https://github.com/4ier/notion-cli/releases). | ||
|
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 "Tracked file:"
git ls-files | rg '(^|/)plugins/notion-cli/skills/quickstart/SKILL\.md$' || true
echo
echo "Relevant SKILL.md excerpt:"
if [ -f plugins/notion-cli/skills/quickstart/SKILL.md ]; then
nl -ba plugins/notion-cli/skills/quickstart/SKILL.md | sed -n '1,130p'
fi
echo
echo "Search for 'GitHub Releases' and installation guidance in notion-cli:"
rg -n "Release|releases|DOWNLOAD|download|make \\+a|chmod \\+x|notion|PATH|brew|Linux|macOS|Windows" plugins/notion-cli || trueRepository: javimosch/supercli Length of output: 285 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "File:"
printf '%s\n' plugins/notion-cli/skills/quickstart/SKILL.md > /tmp/skill_markdown.txt
wc -l /tmp/skill_markdown.txt
echo
echo "Lines 1-140:"
python3 - <<'PY'
from pathlib import Path
p=Path('plugins/notion-cli/skills/quickstart/SKILL.md')
for i,line in enumerate(p.read_text().splitlines(),1):
if i <= 140:
print(f'{i:4d}\t{line}')
PY
echo
echo "Installation-related terms:"
python3 - <<'PY'
from pathlib import Path
p=Path('plugins/notion-cli/skills/quickstart/SKILL.md')
terms=['Release','release','DOWNLOAD','download','chmod','notion','PATH','brew','Linux','macOS','Windows']
for i,line in enumerate(p.read_text().splitlines(),1):
if any(t in line for t in terms):
print(f'{i}\t{line}')
PY
echo
echo "Related files under plugins/notion-cli:"
python3 - <<'PY'
from pathlib import Path
root=Path('plugins/notion-cli')
for p in sorted(root.rglob('*')):
if p.is_file() and not ('node_modules' in str(p) or '.git' in str(p)):
print(p)
PYRepository: javimosch/supercli Length of output: 5134 Complete the GitHub Releases installation path. Line 80 gives a release list link but does not say which platform asset to download, make executable, name 🤖 Prompt for AI Agents |
||
|
|
||
| ## Key Features | ||
| - **Agent-friendly**: JSON output auto-detected when piped, schema-aware, URL or ID support | ||
|
|
||
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: 31679
🌐 Web query:
Go command go install default GOBIN GO111MODULE documentation GOPATH/bin💡 Result:
The go install command compiles and installs Go programs (executables) [1][2]. Its installation behavior is governed by environment variables and Go's module-aware mode [1][3]. Installation Directory and GOBIN The location where go install places compiled binaries is determined by the GOBIN environment variable [3][4]. 1. If GOBIN is set, binaries are installed to that absolute path [5][6]. 2. If GOBIN is not set, binaries are installed to the bin subdirectory of the default GOPATH [1][3]. The default GOPATH is $HOME/go on Unix-like systems and %USERPROFILE%\go on Windows [3][4]. 3. Executables in GOROOT are installed to GOROOT/bin or GOTOOLDIR, rather than GOBIN [1][2]. GO111MODULE and Module-Aware Mode The GO111MODULE environment variable controls whether the go command runs in module-aware mode or GOPATH mode [7][8]. - When GO111MODULE=on (or unset in modern Go versions), the go command runs in module-aware mode [7]. - When GO111MODULE=off, the go command runs in GOPATH mode, relying on the GOPATH structure [7]. - When arguments to go install include version suffixes (e.g.,
@latest), the command automatically runs in module-aware mode and ignores any go.mod file in the current directory [1][9]. In summary, for most modern Go development, module-aware mode is the standard [7]. When you execute go install, the resulting binary is placed in $GOBIN if set, or $GOPATH/bin by default [1][4]. Adding this directory to your PATH environment variable allows you to run the installed commands directly [3][5].Citations:
Ensure the Go install path creates a discoverable
notioncommand.go installwritesnotion-clito$GOBINor$GOPATH/bin, and the manifest/checks expectnotion, but the Go install steps only link the binary and do not make that directory searchable. Add a persistentPATHaddition after creating thenotionsymlink/link, and keep the inline guidance and recovery messages consistent with the dedicated install guidance.plugins/notion-cli/install-guidance.json#L6-L7plugins/notion-cli/plugin.json#L13-L15plugins/notion-cli/plugin.json#L34plugins/notion-cli/plugin.json#L234plugins/notion-cli/skills/quickstart/SKILL.md#L61-L66📍 Affects 3 files
plugins/notion-cli/install-guidance.json#L6-L7(this comment)plugins/notion-cli/plugin.json#L13-L15plugins/notion-cli/plugin.json#L34-L34plugins/notion-cli/plugin.json#L234-L234plugins/notion-cli/skills/quickstart/SKILL.md#L61-L66🤖 Prompt for AI Agents