claude-code
claude-code copied to clipboard
Installation mechanism besides npm?
For those of us who aren't JS users, and thus don't already have npm on our systems, it'd be great to have an alternative installation mechanism.
For me personally, providing a brew tap (or even better, an upstream brew formula) would be wunderbar!
Thanks
Great idea! this would be really nice since I don't think npm tools are the best-equipped to self-update, as evidenced by the admonition I'm getting every startup :D
as per my comment in #454 i used this for the homebrew formula
require "language/node"
class ClaudeCode < Formula
desc "Command line interface for Claude AI by Anthropic"
homepage "https://www.anthropic.com"
url "https://registry.npmjs.org/@anthropic-ai/claude-code/-/claude-code-0.2.37.tgz"
sha256 "ddf92e983a7bad6875d6436deabc32bfbbdfa75b43655c10777ae9d2a9d9a9da"
license "MIT"
livecheck do
url "https://registry.npmjs.org/@anthropic-ai/claude-code/latest"
regex(/["']version["']:\s*["']([^"']+)["']/i)
end
depends_on "node"
def install
# Install the package globally within the Homebrew prefix
system "npm", "install", "-g", "--prefix", prefix, "@anthropic-ai/claude-code@#{version}"
end
test do
system bin/"claude-code", "--help"
end
end
and run as
brew install --build-from-source ./claude-code.rb
Have you considered submitting that to homebrew itself? (I haven't checked if it complies with the rules)
Any updates on this? I found claude on Homebrew: https://formulae.brew.sh/cask/claude but suspect if its claude-code.
brew install --cask claude-code
This would be great to have.
Working on it here https://github.com/Homebrew/homebrew-core/pull/224619
Not possible in homebrew core unfortunately, It need to be under any of the ~opensource licenses.
You could maintain your own tap so folks would just need to do brew install anthropics/claude-code/claude-code or similar
I'll be happy to write the brew file but someone from Anthropic (@bcherny ?) needs to make the repo, it should be anthropics/homebrew-claude-code or maybe even anthropics/homebrew-claude to cover all in one
We are in the middle of updating our distribution to a single file binary. Please hang tight and then we can come back for the brew cask. I'll be the POC for Claude Code on this one.
Hey @wolffiex , any chance this is available? Would love to use Claude Code without needing to globally install NPM!
@wolffiex any news? Would be great to get this out there 💪🏻
Working on it! This just requires extreme care because makes will strand our users. I'll update this thread first when it is available.
On Wed, Jun 18, 2025 at 9:02 AM Jarvis @.***> wrote:
Jarvvski left a comment (anthropics/claude-code#80) https://github.com/anthropics/claude-code/issues/80#issuecomment-2984844482
@wolffiex https://github.com/wolffiex any news? Would be great to get this out there 💪🏻
— Reply to this email directly, view it on GitHub https://github.com/anthropics/claude-code/issues/80#issuecomment-2984844482, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABUJ7FBJECQQ5BEY6NDRLD3EGER3AVCNFSM6AAAAABX27EY4CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDSOBUHA2DINBYGI . You are receiving this because you were mentioned.Message ID: @.***>
We are in the middle of updating our distribution to a single file binary. Please hang tight and then we can come back for the brew cask. I'll be the POC for Claude Code on this one.
Any updates on this?
Oh yes, we are starting testing of our new native install! If you are brave and you're willing to solve potential problems with alpha software, try this:
curl -fsSL claude.ai/install.sh | bash
let us know how it goes!
Oh yes, we are starting testing of our new native install! If you are brave and you're willing to solve potential problems with alpha software, try this:
curl -fsSL claude.ai/install.sh | bashlet us know how it goes!
@wolffiex Thanks!
Installed, but I can't update Claude to the latest version:
you will have to figure out why you're picking up the wrong claude
could be an alias hanging around, or failed uninstall of the global npm version
the native install is a symlink at ~/.local/bin/claude
please let us know how you resolve and we'll continue to work on our auto-detection
Does the closure mean the brew file is done? Or do you just refer to the binary installation from your website
brew tap is not done but we will work on it
for now, use curl -fsSL claude.ai/install.sh | bash
Are there any plans to support brew?
I've opened a PR for adding a cask that just refers to the installer you're providing @wolffiex
https://github.com/Homebrew/homebrew-cask/pull/219840
IMO, would be better to move the checksum verification and arch detection inside of the ruby formulae, but I didn't want to mess with your current deployments where you're checking all of that inside the install.sh
Checking the installer, we could handle all of the installation in the ruby script. But again, not sure what your other plans are
Am i missing other files for the uninstallation other than the binary over in .local/bin/claude and .claude/? The script doesn't provide any uninstall method, so I had to make some assumptions
@Jarvvski You may want to deconstruct the install.sh and move the logic inside the .rb. Depending on what's available upstream you may be able to do some version/arch parsing logic there.
Wow, this is awesome @Jarvvski thank you. I was worried we were going to have to push my ruby slop to create a homebrew cask. Could this be called claude instead of claude-code? We are slowly consolidating around that naming for the package.
The auto-updater is very important to us and we want that to be the default—that is the main benefit of claude install over handling everything directly in homebrew. We can definitely provide claude uninstall but we also want to be good homebrew citizens and observe the local customs, so happy to take some input if you want to give it.
A Homebrew cask has now been added (https://github.com/Homebrew/homebrew-cask/pull/219994, brew.sh).
A Homebrew cask has now been added (Homebrew/homebrew-cask#219994, brew.sh).
@nihaals Works like a charm! Thank you 💪
Working for me too! Thanks everyone; you guys are awesome 🥳
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.