-
Notifications
You must be signed in to change notification settings - Fork 7
fix(#298): add go install instructions to notion-cli plugin #367
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
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,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", | ||
| "Authenticate: echo 'ntn_xxxxx' | notion auth login --with-token", | ||
| "Alternative auth: export NOTION_TOKEN=ntn_xxxxx", | ||
|
Comment on lines
8
to
9
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. 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win Do not place the real token in shell history. When users replace 🤖 Prompt for AI Agents |
||
| "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": "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." | ||
|
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. 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "== file =="
cat -n plugins/notion-cli/install-guidance.json
echo
echo "== notion-cli plugin files =="
git ls-files plugins/notion-cli | sort
echo
echo "== related os.Chmod usages in notion-cli =="
rg -n "0600|os\\.Chmod|config\\.json|notion-cli/config" plugins/notion-cli -S || trueRepository: javimosch/supercli Length of output: 1567 🌐 Web query:
💡 Result: In Go, the os.Chmod and (*File).Chmod functions behave differently on Windows compared to Unix-based systems because Windows does not support standard Unix-style permission bits [1][2]. Official documentation specifies that on Windows, os.Chmod only utilizes the 0o200 bit (the owner writable bit) of the provided mode [1][3]. This specific bit controls whether the file's read-only attribute is set or cleared [1][2]. All other permission bits (such as group or world permissions, or special bits like setuid/setgid) are ignored [1][2]. When using os.Chmod on Windows: - Setting the 0o200 bit (e.g., in 0o600) clears the read-only attribute, making the file writable [1][2]. - Omitting the 0o200 bit (e.g., in 0o400) sets the read-only attribute [1][2]. Important implementation notes: - The behavior is limited to files; Windows does not respect the read-only file attribute on directories in the same way [4][5]. - For backward compatibility with Go 1.12 and earlier, it is recommended to provide a non-zero mode [1][2]. - Historically, (*File).Chmod was not fully supported on Windows, leading to errors in older versions of Go [6][7], but it has since been implemented to align with the behavior of os.Chmod [6]. Always refer to the current documentation for your specific Go version, as subtle differences or error handling may have evolved [3][7]. Citations:
Limit the The 🤖 Prompt for AI Agents |
||
| } | ||
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: 156
🏁 Script executed:
Repository: javimosch/supercli
Length of output: 6974
🌐 Web query:
go install executable GOPATH/bin GOBIN PATH official documentation💡 Result:
When you run the go install command, the Go toolchain compiles and installs executables based on the following precedence for the installation directory [1][2][3]: 1. GOBIN Environment Variable: If the GOBIN environment variable is set, Go installs executables directly into this directory [1][2][4]. 2. Default Location: If GOBIN is not set, Go installs executables into the bin subdirectory of the GOPATH [1][2][4]. If GOPATH is not set, it defaults to $HOME/go/bin (on Unix) or %USERPROFILE%\go\bin (on Windows) [1][2][4]. Note that executables in the Go installation root (GOROOT) are installed into $GOROOT/bin or the GOTOOLDIR, rather than the GOBIN path [1][5]. To discover exactly where your Go binaries are currently being installed, you can use the following command [6]: go list -f '{{.Target}}' If you wish to change this location, you can set the GOBIN variable using the go env command [6][2]: go env -w GOBIN=/path/to/your/bin To run these installed executables without providing a full path, the directory containing them must be included in your system's PATH environment variable [6][2]. You can verify the current bin directory location by running go env GOBIN or by checking your GOPATH configuration [2][4][7].
Citations:
Document the Go binary PATH requirement.
go installputs executables inGOBINorGOPATH/bin;notion --versionand the plugin check require the installed binary to be inPATH. Add a PATH setup step or explicit install-location guidance before the verification/auth commands.Applies to
plugins/notion-cli/install-guidance.json,plugins/notion-cli/plugin.json, andplugins/notion-cli/skills/quickstart/SKILL.md.📍 Affects 3 files
plugins/notion-cli/install-guidance.json#L6-L7(this comment)plugins/notion-cli/skills/quickstart/SKILL.md#L61-L63plugins/notion-cli/plugin.json#L14-L14🤖 Prompt for AI Agents