You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Reacted by Carlos Castillo, Elena Loonstra, Andrzej Kaszkowiak, Erik Lindberg, mtrbls, Florian Stutzky, Savvy Raghuvanshi, peko, Alon Gat, Ian Neubert and 26 more
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"classClaudeCode<Formuladesc"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"livecheckdourl "https://registry.npmjs.org/@anthropic-ai/claude-code/latest"regex(/["']version["']:\s*["']([^"']+)["']/i)enddepends_on"node"definstall
# InstallthepackagegloballywithintheHomebrewprefixsystem"npm","install","-g","--prefix",prefix,"@anthropic-ai/claude-code@#{version}"endtestdosystembin/"claude-code","--help"endend
and run as brew install --build-from-source ./claude-code.rb
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
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:
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:
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
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.
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.
Activity
djsavvy commentedon Mar 7, 2025
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
marafa-sugarcrm commentedon Apr 8, 2025
as per my comment in #454 i used this for the homebrew formula
and run as
brew install --build-from-source ./claude-code.rbalex commentedon Apr 8, 2025
Have you considered submitting that to homebrew itself? (I haven't checked if it complies with the rules)
Add Claude Code
Dentrax commentedon May 24, 2025
Any updates on this? I found
claudeon Homebrew: https://formulae.brew.sh/cask/claude but suspect if itsclaude-code.This would be great to have.
Moulick commentedon May 24, 2025
Working on it here Homebrew/homebrew-core#224619
Moulick commentedon May 26, 2025
Not possible in homebrew core unfortunately, It need to be under any of the ~opensource licenses.
RichardoC commentedon May 26, 2025
You could maintain your own tap so folks would just need to do
brew install anthropics/claude-code/claude-codeor similarMoulick commentedon May 27, 2025
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-codeor maybe evenanthropics/homebrew-claudeto cover all in one5 remaining items
wolffiex commentedon Jul 7, 2025
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:
let us know how it goes!
xshapira commentedon Jul 7, 2025
@wolffiex Thanks!
Installed, but I can't update Claude to the latest version:
wolffiex commentedon Jul 7, 2025
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/claudeplease let us know how you resolve and we'll continue to work on our auto-detection
Jarvvski commentedon Jul 11, 2025
Does the closure mean the brew file is done? Or do you just refer to the binary installation from your website
wolffiex commentedon Jul 11, 2025
brew tap is not done but we will work on it
for now, use
curl -fsSL claude.ai/install.sh | bashazat-io commentedon Jul 13, 2025
Are there any plans to support brew?
Jarvvski commentedon Jul 13, 2025
I've opened a PR for adding a cask that just refers to the installer you're providing @wolffiex
Homebrew/homebrew-cask#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.shChecking 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/claudeand.claude/? The script doesn't provide anyuninstallmethod, so I had to make some assumptionstimfallmk commentedon Jul 14, 2025
@Jarvvski You may want to deconstruct the
install.shand move the logic inside the.rb. Depending on what's available upstream you may be able to do some version/arch parsing logic there.wolffiex commentedon Jul 15, 2025
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
claudeinstead ofclaude-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 installover handling everything directly in homebrew. We can definitely provideclaude uninstallbut 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.nihaals commentedon Jul 19, 2025
A Homebrew cask has now been added (Homebrew/homebrew-cask#219994, brew.sh).
xshapira commentedon Jul 19, 2025
@nihaals Works like a charm! Thank you 💪
mieubrisse commentedon Jul 21, 2025
Working for me too! Thanks everyone; you guys are awesome 🥳
github-actions commentedon Jul 29, 2025
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.