feat(crush): add installer for Charm's AI coding assistant#1064
feat(crush): add installer for Charm's AI coding assistant#1064ogormans-deptstack wants to merge 7 commits intowebinstall:mainfrom
Conversation
Add installer for charmbracelet/crush - glamorous agentic coding assistant. Features: - Multi-model LLM support (OpenAI, Anthropic, Google, Groq, Ollama) - Session-based workflow with context preservation - LSP integration for code intelligence - MCP extensions for custom tools - Beautiful terminal UI built on Charm ecosystem Files: - crush/releases.js - fetches releases from charmbracelet/crush - crush/install.sh - POSIX shell installer (goreleaser pattern) - crush/install.ps1 - Windows PowerShell installer - crush/README.md - comprehensive cheat sheet Related: webinstall#1062
The github.js helper returns already-normalized releases (one per asset), so filtering must happen at all.releases level, not rel.assets. Additionally, filter to only goreleaser binary archives (with underscores) to exclude the source tarball (crush-VERSION.tar.gz).
|
This is good. Will you also add SKILL.md files for each of these? Depending on how similar it is, I may just transition all README.md's into SKILL.md symlinks. |
Add comprehensive agent-focused documentation including: - When to use crush vs alternatives - LSP integration guide - MCP extension configuration - Session management workflows - Key bindings and troubleshooting - Comparison table with OpenCode and Cursor Addresses maintainer feedback from PR review.
|
✅ Added
Also proactively added The SKILL.md files are designed to help AI agents understand when and how to use these tools effectively. Ready for review! 🎉 |
|
|
||
| # mv ./crush-*/* "$HOME/.local/opt/crush-v0.50.1/bin/" | ||
| # (goreleaser puts binaries in a subdirectory) | ||
| mv ./crush-*/"$pkg_cmd_name" "$pkg_src_cmd" |
There was a problem hiding this comment.
The crush's binary releases are in the format crush_[version]_[os]_[arch]. The point is, it has underscore instead of hyphens between.
Supply the mv command with appropriate structure, so that it installs the binary correctly.
|
|
||
| # Rename from 'crush.exe' to 'crush.exe' (goreleaser pattern) | ||
| # (The extracted archive contains crush_VERSION_Windows_arch/crush.exe) | ||
| Get-ChildItem -Path "." -Filter "crush-*" -Directory | ForEach-Object { |
There was a problem hiding this comment.
The crush's binary releases are in the format crush_[version]_[os]_[arch]. The point is, it has underscore instead of hyphens between.
Use the correct structure, so that the installer navigates the right directory.
detox-24
left a comment
There was a problem hiding this comment.
The installers have a minor path issue, kindly fix it.
- Crush releases use underscore format: crush_VERSION_OS_arch/ - Changed glob pattern from crush-*/ to crush_*/ - Addresses feedback from @detox-24
|
✅ Fixed in commit 21ed585 Thanks @detox-24 for catching this! Changes:
The install.sh now correctly navigates the goreleaser subdirectory structure. Tested locally - mv command finds the binary correctly! 🎉 |
|
Inspecting the release asset, I found this: crush_0.50.1_Linux_x86_64
├── completions
│ ├── crush.bash
│ ├── crush.fish
│ └── crush.zsh
├── crush
├── LICENSE.md
├── manpages
│ └── crush.1.gz
└── README.mdCrush provides completions and a man-page file packed within the releases. But I think extracting this to a standard location and some instructions after finishing installation being displayed might help. Like we do for fish, for example, where the install.sh prints some instructions to set fish as default. We could add such echo statements here too, in install.sh. What do you think? @coolaj86 [Sorry for tagging you so much :) ] |
|
And @ogormans-deptstack, Did you test the windows installer? I tested it and it fails silently. And I also see you've removed the template output messages baked in the Here's the template install.ps1 |
…anpage support - install.ps1: fix silent failure by adding full download/extract/copy template (was missing boilerplate). Fix crush-* glob to crush_* matching goreleaser underscore naming convention. - install.sh: add manpage installation to ~/.local/share/man/man1/, shell completions for bash/zsh/fish from archive, and pkg_done_message() with post-install instructions. - Addresses review feedback from detox-24 on PR webinstall#1064.
- install.sh: add shellcheck pragma, move set -e/-u to top level, trim pkg_done_message to single line - releases.js: simplify filter to 4 conditions (tar.gz/zip + underscore + no nightly + no sbom), remove redundant extension checks - README.md: rewrite to match webi cheat-sheet style (~75 lines), fix tagline from marketing copy to functional description, document new completion/manpage file paths - SKILL.md: include prettier formatting fixes - test/install.sh: add crush to all 3 test manifest lists (P0 per CONTRIBUTING.md) - Tested: shellcheck clean, shfmt compliant, prettier formatted, releases.js returns correct OS/arch/ext for all platforms
|
Pushed two commits addressing all outstanding feedback:
Testing: Validated the install.ps1 end-to-end in a Docker container ( @detox-24 re: your suggestion about printing post-install instructions for completions — I went with a minimal Ready for re-review! |
Summary
Add installer for crush — Charm's terminal-based AI coding assistant.
Changes
crush/releases.js— fetches from charmbracelet/crush, filters goreleaser archives (tar.gz/zip with underscore naming, excludes nightly/sbom/packages/source tarballs)crush/install.sh— POSIX installer with goreleaser subdirectory pattern (crush_VERSION_OS_arch/), shell completions (bash/zsh/fish), manpage installation, andpkg_done_messagecrush/install.ps1— Full Windows PowerShell installer following the_example/install.ps1template (download, extract, move, copy)crush/README.md— Concise cheat sheet following webi conventionscrush/SKILL.md— Agent-focused documentation (per coolaj86's request)test/install.sh— Added crush to all 3 test manifest listsTesting
Shell (
install.sh)shellcheck crush/install.sh— passes (SC2034 pragma for webi framework variables)shfmtformatting — compliant (-i 4 -sr -ci -s)prettier— all markdown and JS files formattedPowerShell (
install.ps1)Tested via Docker container using
mcr.microsoft.com/powershell:7.4-alpine-3.20with the actual Windows x86_64 release zip from GitHub:Test harness available at
crush/test-ps1/— validates the full download→extract→move→copy flow against the real release archive.Releases (
releases.js)node crush/releases.js— returns correct OS/arch/ext for all platforms.tar.gz/.zip+ underscore naming + no nightly + no sbomAddresses Review Feedback
crush-*→crush_*underscore glob in both install.sh and install.ps1 ✅Implementation Notes
crush_VERSION_OS_arch/{crush,completions/,manpages/,LICENSE.md,README.md}~/.local/share/man/man1/Related