Conversation
mattpodwysocki
left a comment
There was a problem hiding this comment.
Built the branch, ran cargo build/fmt/clippy -D warnings/test (all green), shellcheck on both shell scripts (clean), and test-install.sh/test-install.ps1 against this branch (all cases pass). CI is green across all 8 checks too.
One thing worth flagging before either of us merges: this conflicts with PR #61 (still open), which also touches install.sh and install.ps1 in the Tilesets CLI region. I simulated the merge both ways and the install.ps1 side is a trivial 7-line conflict, but install.sh is a real one: #61's coding agent skill section sits right where this PR's tilesets_step() rewrite lands. Posting a separate comment with details so whoever merges second isn't caught off guard.
|
Heads up on a merge conflict this PR will hit against #61 (still open), since neither is merged yet. I simulated the merge with git merge-tree to see what it actually looks like: install.ps1: small, about 7 lines. Both PRs add a block right before the closing install.sh: a bigger one. #61's coding agent skill section sits right after the shared The good news is this PR actually removes the reason #61's section had to go where it did: with no more Not a defect in this PR, just flagging it so neither of us is surprised by the conflict when we go to merge. |
4f87de1 to
ca7b77f
Compare
install.sh now puts the install dir on PATH through the shell profile (MAPBOX_NO_MODIFY_PATH=1 opts out, as on Windows), shows a progress bar, reports each step on one line, keeps pipx/pip output to a dimmed live line and a log, and ends with what to run next. install.ps1 gets the same layout. Both fix the repository link, which pointed at a 404.
86fe229 to
094f737
Compare
|
@mattpodwysocki ready for another look. Rebased on main after #61 and #69 merged. Your commit is unchanged apart from merging in #61's agent-skills step, and everything since is in one commit: 330da53.
Not checked: install.ps1's MCP question has not been run anywhere, since test-install.ps1 runs |
Follow-up to review, rebased on #61 and #69. - After the skills question, install.sh and install.ps1 ask whether to add the Mapbox MCP servers to the coding agents found, by running `mapbox mcp install --global`. Asked only at a terminal and only when something is not registered yet; the default is no; MAPBOX_CLI_NO_AGENT_SETUP skips it. - Each question names the command a yes runs. Its results are nested under it and grouped per server and outcome, so a server added now reads differently from one already there or one whose sign-in did not finish. - install.sh: long steps show a spinner with the command's latest output under it; a line with a URL is printed in full above it and stays. No spinner under TERM=dumb; cursor and line wrap are restored on interrupt. - install.sh writes a log of each run to ~/.local/state/mapbox-cli/install.log, keeping the previous one as install.log.1. - The profile edit uses an existing .bash_profile, .bash_login or .profile for bash on macOS, and counts the dir as already on PATH only when a non-comment line names it as a whole path. - README documents MAPBOX_INSTALL_TILESETS, a prompt-free install, the MCP question and the log.
094f737 to
330da53
Compare
The installers worked, but a first install ended in a wall of text with no next step, and on a fresh Mac
~/.local/binis not on PATH, so most first runs ended incommand not found. Now thatmapbox mcp(#69) has landed, the installer also offers to add the Mapbox MCP servers, next to the skills question from #61.install.sh
ZDOTDIR, bash, fish, otherwise~/.profile). On macOS, bash uses an existing.bash_profile,.bash_loginor.profilerather than creating a.bash_profilethat would stop a login bash reading.profile. Never writes the line twice, and only a whole-path mention of the dir outside a comment counts as already there.MAPBOX_NO_MODIFY_PATH=1opts out, the same switch install.ps1 already has.NO_COLOR,TERM=dumb), ASCII marks outside a UTF-8 locale.mapbox mcp install) show a spinner with the command's latest output dimmed under it, erased when done. A line with a URL, such as a sign-in page, is printed in full above it and stays. No spinner underTERM=dumb.~/.local/state/mapbox-cli/install.log($XDG_STATE_HOMEwhen set): every step line, and eachmapboxand Tilesets command it ran after installing the binary, with its full output and exit status. The previous run's is kept asinstall.log.1.mapbox auth login, docs, and the telemetry notice.MCP servers (both scripts)
mapbox mcp install --global. Asked only at a terminal and only when something is not registered yet; the default is no.MAPBOX_CLI_NO_AGENT_SETUP=1skips it with the skills question.install.ps1
Write-Host -ForegroundColorso it works on 5.1 and conhost.✓only in Windows Terminal; the file stays ASCII.mapbox mcp install's live output goes straight to the console.Both
REPOpointed atgithub.com/mapbox/cli, which is a 404. Nowmapbox/mapbox-cli.Tested
cargo fmt,clippy -D warningsandcargo testpass.test-install.shpasses locally andshellcheckis clean.test-install.shcases cover the profile edit, idempotency,ZDOTDIR, fish,MAPBOX_NO_MODIFY_PATH, color, a failed pipx install, and the MCP question: no terminal, yes, no, already registered, a failed registration, a row carrying anerrorkey (with braces in it), grouping, nesting, the install log, a log line too wide for the terminal, a sign-in URL,TERM=dumb, a near-miss mention of the dir in a profile, and bash on macOS with an existing.profile. Most were checked by breaking the code they guard and watching them fail.Test on mac
Test on Win
Both screenshots predate the MCP question.
Not checked
test-install.ps1runs-NonInteractive, so it reaches only the no-console path. The Windows VM run above predates them.mapbox mcp, so it stays hidden until a release after 0.3.0.~/.bashrcedit there are covered only by CI's run. The profile check uses awk; this Mac has only BSD awk, so mawk and gawk are exercised only on CI's Linux runner.