-
Notifications
You must be signed in to change notification settings - Fork 7
fix(#298): add go install instructions to bundled notion-cli plugin #370
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 |
|---|---|---|
|
|
@@ -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", | ||
|
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 "== 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 || trueRepository: javimosch/supercli Length of output: 15932 🌐 Web query:
💡 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 ( Citations:
🌐 Web query:
💡 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
🤖 Prompt for AI Agents |
||
| "Verify: notion --version", | ||
| "Authenticate: echo 'ntn_xxxxx' | notion auth login --with-token", | ||
| "supercli plugins install ./plugins/notion-cli --on-conflict replace --json" | ||
|
|
@@ -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": [] | ||
| }, | ||
|
|
@@ -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": [] | ||
| } | ||
|
|
||
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: 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.,
@latestor@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
notionbinary location.go installplaces the binary inGOBIN,gopath/bin, or the default Go homebindirectory, sonotion --versioncan fail even after installation. Add the platform-specificPATHsetup, or specify an install destination such asGOBIN/gopath/bin, at each of these locations.plugins/notion-cli/install-guidance.json#L6-L7plugins/notion-cli/plugin.json#L14-L14plugins/notion-cli/plugin.json#L33-L33plugins/notion-cli/plugin.json#L233-L233plugins/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-L14plugins/notion-cli/plugin.json#L33-L33plugins/notion-cli/plugin.json#L233-L233plugins/notion-cli/skills/quickstart/SKILL.md#L61-L63🤖 Prompt for AI Agents