Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions plugins/notion-cli/install-guidance.json
Original file line number Diff line number Diff line change
Expand Up @@ -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\"",
Comment on lines +6 to +7

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

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 || true

Repository: 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]}")
PY

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 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-L15
  • 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 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.

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 | 🟡 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.json
  • plugins/notion-cli/plugin.json
  • plugins/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-L15
  • plugins/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.

"Verify: notion --version",
Comment on lines +7 to 8

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

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 || true

Repository: 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}")
PY

Repository: 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}")
PY

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


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-L15
  • 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, 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.

"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."
}
7 changes: 4 additions & 3 deletions plugins/notion-cli/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"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\"",
"Verify: notion --version",
"Authenticate: echo 'ntn_xxxxx' | notion auth login --with-token",
"supercli plugins install ./plugins/notion-cli --on-conflict replace --json"
Expand All @@ -30,7 +31,7 @@
"adapterConfig": {
"command": "notion",
"baseArgs": ["--version"],
"missingDependencyHelp": "Install notion-cli: brew install 4ier/tap/notion-cli"
"missingDependencyHelp": "Install notion-cli: go install github.com/4ier/notion-cli@latest (the binary will be named notion-cli; symlink or rename it to notion) or brew install 4ier/tap/notion-cli"
},
"args": []
},
Expand Down Expand Up @@ -230,7 +231,7 @@
"adapterConfig": {
"command": "notion",
"passthrough": true,
"missingDependencyHelp": "Install notion-cli: brew install 4ier/tap/notion-cli. Authenticate: echo 'ntn_xxxx' | notion auth login --with-token"
"missingDependencyHelp": "Install notion-cli: go install github.com/4ier/notion-cli@latest (the binary will be named notion-cli; symlink or rename it to notion) or brew install 4ier/tap/notion-cli. Authenticate: echo 'ntn_xxxx' | notion auth login --with-token"
},
"args": []
}
Expand Down
17 changes: 16 additions & 1 deletion plugins/notion-cli/skills/quickstart/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

## Key Features
- **Agent-friendly**: JSON output auto-detected when piped, schema-aware, URL or ID support
Expand Down
Loading