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
4 changes: 2 additions & 2 deletions plugins/notion-cli/install-guidance.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
"binary": "notion",
"check": "which notion",
"install_steps": [
"brew install 4ier/tap/notion-cli",
"go install github.com/4ier/notion-cli@latest",
"Verify: notion --version",
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 "== candidate files =="
git ls-files | rg '^plugins/notion-cli/(install-guidance\.json|plugin\.json|skills/quickstart/SKILL\.md)$' || true

echo
echo "== file excerpts =="
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"
  sed -n '1,80p' "$f" | cat -n
  if [ "$f" = plugins/notion-cli/plugin.json ]; then
    sed -n '220,240p' "$f" | cat -n
  fi
done

echo
echo "== go install path-related terms in notion plugin =="
rg -n "go install|GOBIN|PATH|GOPATH|bin" plugins/notion-cli -S || true

echo
echo "== public docs for installed path semantics if reachable =="
python3 - <<'PY'
from urllib.request import urlopen
urls = [
    "https://github.com/4ier/notion-cli",
    "https://go.dev/ref/mod#go-build-cache",
]
for url in urls:
    try:
        data = urlopen(url, timeout=10).read().decode("utf-8", "replace")[:2000]
        print(f"--- {url}")
        print(data)
    except Exception as e:
        print(f"--- {url} ERROR: {e}")
PY

Repository: javimosch/supercli

Length of output: 11220


🌐 Web query:

Go go install module command installs binary GOBIN GOPATH PATH documentation

💡 Result:

The go install command is used to compile and install Go packages [1][2]. When you run go install, it compiles the specified packages and, if the package is a main package, installs the resulting binary executable [1][3]. Where binaries are installed: The destination directory for the installed binary is determined by the following priority [3]: 1. GOBIN: If the GOBIN environment variable is set, the binary is installed to the directory it specifies [1][3]. 2. GOPATH: If GOBIN is not set but GOPATH is defined, the binary is installed in the bin subdirectory of the first directory listed in GOPATH [3]. 3. Default: If neither GOBIN nor GOPATH is set, the binary is installed to the default GOPATH bin directory, which is $HOME/go/bin (or %USERPROFILE%\go\bin on Windows) [1][3]. System PATH: To run the installed binaries by name without specifying their full file path, you must add the installation directory (the one containing the binary) to your system's PATH environment variable [4][3]. You can identify the exact installation directory for a package by running the command go list -f '{{.Target}}' [4][3]. Behavioral Notes: - Module-aware mode: When running go install with a version suffix (e.g., @latest or @v1.0.0), it operates in module-aware mode, installing the binary without affecting the dependencies of the current module [1][2][5]. - Non-main packages: In modern module-aware mode, non-main packages are built and cached but not installed [1][2][6]. - Legacy Go: In older GOPATH mode, non-main packages were installed to $GOPATH/pkg/$GOOS_$GOARCH [1][2].

Citations:


Document the installed notion binary location.

go install places the binary in GOBIN, gopath/bin, or the default Go home bin directory, so notion --version can fail even after installation. Add the platform-specific PATH setup, or specify an install destination such as GOBIN/gopath/bin, at each of these locations.

  • plugins/notion-cli/install-guidance.json#L6-L7
  • plugins/notion-cli/plugin.json#L14-L14
  • plugins/notion-cli/plugin.json#L33-L33
  • plugins/notion-cli/plugin.json#L233-L233
  • plugins/notion-cli/skills/quickstart/SKILL.md#L61-L63
📍 Affects 3 files
  • plugins/notion-cli/install-guidance.json#L6-L7 (this comment)
  • plugins/notion-cli/plugin.json#L14-L14
  • plugins/notion-cli/plugin.json#L33-L33
  • plugins/notion-cli/plugin.json#L233-L233
  • plugins/notion-cli/skills/quickstart/SKILL.md#L61-L63
🤖 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, Document the
Go-installed notion binary location by adding platform-specific PATH setup or an
explicit GOBIN/gopath/bin destination before verification at
plugins/notion-cli/install-guidance.json:6-7,
plugins/notion-cli/plugin.json:14-14, plugins/notion-cli/plugin.json:33-33,
plugins/notion-cli/plugin.json:233-233, and
plugins/notion-cli/skills/quickstart/SKILL.md:61-63. Ensure each installation
flow makes notion available to the subsequent notion --version command.

"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. Also available via Homebrew (brew install 4ier/tap/notion-cli), as a Go binary from GitHub Releases (https://github.com/4ier/notion-cli/releases), or via 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."
}
6 changes: 3 additions & 3 deletions plugins/notion-cli/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"binary": "notion",
"check": "which notion",
"install_steps": [
"brew install 4ier/tap/notion-cli",
"go install github.com/4ier/notion-cli@latest",

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 "== file exists and line count =="
wc -l plugins/notion-cli/plugin.json || true

echo "== relevant context =="
sed -n '1,60p' plugins/notion-cli/plugin.json
printf '\n--- around line 233 ---\n'
sed -n '220,240p' plugins/notion-cli/plugin.json

echo "== go install paths in plugin.json =="
python3 - <<'PY'
import json
p='plugins/notion-cli/plugin.json'
with open(p) as f:
    data=json.load(f)
print(json.dumps(data, indent=2))
PY

echo "== search notion binary usage/messages =="
rg -n '"notion"|notion\.go|go install|GOBIN|PATH|GOPATH|GOPATH' plugins/notion-cli plugin.json 2>/dev/null || true

Repository: javimosch/supercli

Length of output: 15932


🌐 Web query:

SuperCLI plugin install_guidance install_steps command PATH binary missing dependency help schema

💡 Result:

SuperCLI is a plugin-based, config-driven CLI tool designed for developers and AI agents [1]. It organizes CLI tools into a plugin system where each plugin includes specific metadata for discovery, installation, and execution [2][3][1]. Plugin Structure and Metadata Each plugin directory contains essential files for integration [4][1]: - plugin.json: The core manifest containing metadata, command definitions, input validation schemas, and dependency requirements [2][1]. - meta.json: Contains descriptions and tags for discoverability [4]. - install-guidance.json: Provides specific installation instructions (install_steps) for the underlying CLI tool [4][5]. - skills/: Contains documentation (e.g., SKILL.md) for agent quickstarts [4][6]. Handling PATH and Dependencies SuperCLI does not strictly manage system-level PATH for underlying tools automatically. Instead, it relies on the install guidance provided within the plugin configuration [4][1]. - If a binary is missing or a dependency is not met, the install_steps defined in install-guidance.json (or via the registry) provide the necessary commands to install the required dependencies (e.g., using brew or npm) [4][7]. - Users can verify installations using commands specified in the guidance, such as checking tool versions (e.g., actionlint --version) [4][7]. - Once the underlying CLI tool is installed on the host system, SuperCLI can execute it as an adapter using the configuration defined in plugin.json [1]. Plugin Management Commands - Explore available plugins: supercli plugins explore [2][3]. - Install a plugin: supercli plugins install [2][1]. - Inspect plugin schema: supercli inspect --json (useful for verifying argument schemas) [3][8]. - Manage conflicts: Use the --on-conflict replace flag when installing if a plugin version or configuration is already present [1][7]. SuperCLI supports multiple runtimes—Node.js (sc) and Zig (sc-zig)—that share the same plugin storage (~/.supercli/plugins/plugins.lock.json), allowing them to co-exist and maintain state regardless of the runtime used [2][3][8]. If a command reports "command not found," it typically indicates the plugin is not installed or the underlying binary required by the plugin is missing from the system PATH [3]. You can resolve this by exploring the registry and following the installation guidance provided for that specific plugin [3].

Citations:


🌐 Web query:

Go module commands go install binary installation directory default GOBIN PATH

💡 Result:

When you run the go install command, Go compiles and installs the resulting executable binary into a specific directory [1][2]. The location of this directory is determined by the following priority rules [3]: 1. GOBIN Environment Variable: If the GOBIN environment variable is explicitly set, Go will install binaries into the directory specified by that path [1][3][4]. GOBIN must be an absolute path [4][5]. 2. Default Location: If GOBIN is not set, Go uses a default location [1][5]. This defaults to $GOPATH/bin [1][3][6]. If the GOPATH environment variable is not set, Go defaults to $HOME/go/bin (or %USERPROFILE%\go\bin on Windows) [1][3][6]. To check the current installation directory, you can run the command go env GOBIN [5]. If it returns nothing, the system is using the default $GOPATH/bin or $HOME/go/bin path [1][5]. You can change the default installation target permanently using the go env -w command [7][3]: go env -w GOBIN=/path/to/your/bin To run your installed binaries easily, it is common practice to add the installation directory to your system's PATH environment variable [7][3]. Note: Executables located in $GOROOT (the directory where Go itself is installed) are handled separately and are installed into $GOROOT/bin or $GOTOOLDIR instead of the GOBIN location [1][2].

Citations:


Document the notion binary location after go install.

go install github.com/4ier/notion-cli@latest does not guarantee notion is on PATH; Go installs it to GOBIN if set, otherwise $GOPATH/bin, or $HOME/go/bin on default setups. Add the expected Go binary path/setup to the install guidance and dependency-help messages at lines 14, 33, and 233.

🤖 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/plugin.json` at line 14, Update the notion installation
guidance and dependency-help messages around the Go install command to document
that the binary is placed in GOBIN, otherwise GOPATH/bin or the default
$HOME/go/bin, and may require adding that directory to PATH. Apply the same
clarification consistently at the install guidance and the references near the
dependency-help logic.

"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 +30,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 (or brew install 4ier/tap/notion-cli)"
},
"args": []
},
Expand Down Expand Up @@ -230,7 +230,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 (or brew install 4ier/tap/notion-cli). Authenticate: echo 'ntn_xxxx' | notion auth login --with-token"
},
"args": []
}
Expand Down
14 changes: 13 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,23 @@ export NOTION_TOKEN=ntn_xxxxx

## Installation

```bash
go install github.com/4ier/notion-cli@latest
```

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