Hey everyone, I'm new to Claude Code and just spent an hour in installation hell. I'm on a Mac
So apparently, there are THREE ways to install this:
npm install:
npm install -gu/anthropic-ai/claude-codeDocs say this is "standard installation"
Gets a permission denied error
Docs then warn "DO NOT use sudo"
curl installer:
curl -fsSLhttps://claude.ai/install.sh| bashCalled "beta" but actually works
Buried in a random troubleshooting article
Installs to
~/.local/bin(need to fix PATH)
sudo npm: sudo npm install -g u/anthropic-ai/claude-code
What actually makes npm work
But docs specifically say DON'T do this
"Security risks" apparently
How did you all install this?
Also, why do they recommend npm when they literally have a note saying "Claude Code has a native installation that doesn't depend on npm" - THEN MAKE THAT THE DEFAULT??
I'm not even mad, this is hilarious. Just want to know if I'm missing something obvious here
Hey everyone,
Since Claude Code has been around for a while now and many of us are already familiar with Claude Sonnet 3.7, I wanted to share a quick step-by-step guide for those who havenโt had time to explore it yet.
This guide sums up everything you need to know about Claude Code, including:
How to install and set it up
The benefits and when to use it
A demo of its capabilities in action
Some Claude Code essential commands
I think Claude Code is a better alternative to coding assistants like Cursor and Bolt, especially for developers who want an AI that really understands the entire codebase instead of just suggesting lines.
https://medium.com/p/how-to-install-and-use-claude-code-the-new-agentic-coding-tool-d03fd7f677bc?source=social.tw
Videos
read it here
have been using it for 10 mins... this will change the world!
I created an NPM package called claude-tools. Currently it is pretty simple but it allows you to setup an environment for claude artifacts code in one command. If anyone wants to help me develop it feel free to leave a pull request on the github. Hoping to make it a simple way to work with code generated by claude.
The github is: https://github.com/DevoidSloth/claude-tools
Its on NPM at: https://www.npmjs.com/package/claude-tools
Thanks, and let me know if there are any features you want me to add.
Edit:
This GitHub was a huge inspiration: https://github.com/Bklieger/Claude-React-Jumpstart
Edit: The recent update to shadcn broke a lot of this. I will fix it eventually.
Step 1: Open cmd
Open cmd as administrator
Step 2: Set NPM configuration, telling npm to ignore executing scripts in packages during installation (e.g., preinstall, postinstall, etc.)
setx NPM_CONFIG_IGNORE_SCRIPTS true
$env:NPM_CONFIG_IGNORE_SCRIPTS = โtrueโ
Step 3: Configure the SHELL environment variable
setx SHELL "C:\Program Files\Git\bin\bash.exe"
Step 4: Install Claude Code
npm install -g @anthropic-ai/claude-code
Step 5: Add to Environment Variables
Add this line to your environment variables:
C:\Users\y.xie\.npm-global
Step 6: Restart the development environment
Restart CMD or your IDE (e.g., VS Code, IntelliJ IDEA), then log in to your Claude Code account or configure the API directly within the application to start using it.
Supplementary Notes
Ensure Git for Windows is installed, with the path being
C:\Program Files\Git\bin\bash.exe.If the Git installation path is different, please adjust the SHELL environment variable path accordingly.
The path
C:\Users\y.xie\.npm-globalshould also be added based on your actual path.It is recommended to set these variables permanently to avoid having to reconfigure after each restart.
Later, if you want to uninstall and revert the changes from Step Two and Step Three, just execute
setx NPM_CONFIG_IGNORE_SCRIPTS falseandsetx SHELL "".
ยป npm install @anthropic-ai/claude-code
I've been trying to set up my development environment on Termux with minimal overhead and effort. Copilot works, but I wanted more advanced AI coders. I failed to use Cursor, Windsurf, and Aider, but Claude Code worked like a charm without proot or anything similar. I used npm to install it.
Edit:
You can just follow the Claude Code official installation guide. I'm sorry for not including the brokendown instruction. I thought "I used npm to install it" was obvious enough.
The Claude Code official instruction says:
npm install -g @anthropic-ai/claude-code
And that's it, if you already have npm. If you don't have it, it (command-not-found) would suggest that you should install nodejs:
pkg install nodejs
You can run Claude Code with:
claude
Thank you, u/EnlightenedMind1488 for the instruction.
Edit2:
You may want to install some other tools like git, ripgrep (rg, very fast grep), and gh (GitHub command line for handling your PRs, etc), etc.
pkg install git ripgrep gh
If you want to work with your Github, you may want to login:
gh auth login
and follow the instruction.
I need to confirm for my sanity the following, because some of these files work but not everywhere:
if you installed Claude Code npm i -g, and
if you are using Claude Code in a *terminal* then the settings for config are ~/.claude.json
if you installed CC another way and you use it in a terminal OR in an IDE Agent chat, then settings are ~/.claude/settings.json
But .claude/settings.json is only project specific settings? And only in a current project directory?
I am trying to evaluate different IDE's and moving between terminal products and I'm struggling to find a global settings. I keep seeing contradictory info.
--> what I want is to use my settings (MCP's, allowed tools, etc.) globally because I use a terminal and I want to use terminals inside IDEs like VS Code. IDE's have their own settings and there's like 3-4 version of CC's?
Ubuntu is my daily driver, I'm thinking about switching to Fedora, but I'm not sure if Claude Code can be installed natively there.
Has anyone tried installing Claude Code on Fedora?
If so, is it straightforward, or did you run into any issues?
Thanks in advance!
Hey everyone, just wanted to share a quick tip that saved me a lot of headaches. I was getting super frustrated with my Claude CLI vesion 1.0.0 constantly throwing "Invalid tool argument" errors and getting stuck in loops. Turns out I was running an outdated version.
After updating to the latest version (1.0.18), it's like night and day - feels way smarter and more responsive.
The Anthropic team seems to be pushing fixes and improvements constantly.
So friendly reminder: take a minute to update your CLI.
npm install -g /claude-code@latest
You can check your current version with:
claude --version
Current version is 1.0.18
So, this subreddit is absolutely smitten with Claude Code. And I'd love to get in on that train - but my level of knowledge in coding is pretty much as low as can be... I've been using LLMs and especially Claude to make things I would have never thought possible (for my daily work as a physician), but I feel like using Claude Code would be a step up from that.
Does anyone have any resources that would explain how to do this step by step?
I'm pretty fluent in prompting and LLM use in general, I've been using every available tool since ChatGPT was still a niche thing, but Claude Code just seems like it's more than "click around and find out through trial and error".
Any help is much appreciated!
Update: I haven't tried the solution yet, but apparently there's something called VSCode "Dev Containers" which is similar to docker-compose, and Claude Code has an official guide on using Dev Containers here https://docs.anthropic.com/en/docs/claude-code/devcontainer . I haven't tried it yet, but if it doesn't work for me, I will update this update.
-------------
I prefer not "installing" most software (due to potential interference between different setups, and due to unforeseen issues that crop up when I uninstall something).
So to the extent possible:
in Linux situations, I try to find docker-compose based solutions (I just learned about VSCode's "Dev Containers", and that would be fine too).
in Windows situations, I try to use portable apps
I come from the Windows world, and am somewhat comfortable with Linux, but by no means as confident with Linux as I am with Windows.
I am on Windows 11 with WSL (Ubuntu).
I am trying to install and use Claude Code in the following way:
install it in Linux (under WSL) using docker-compose (and Node/npm would also be included within that setup)
UPDATE: I just learned about VSCode's "Dev Containers". A solution based on that would also be fine by me.
use it via portable VSCode on Windows (via VSCode's Claude Code extension)
Is it possible to do? If yes, please share a docker-compose script (or a VSCode "Dev Containers" based solution) if you can. (FWIW, I asked Claude and Gemini to help me with this, they said it can't be done. But they've been wrong about stuff before, so I thought I'd check with human intelligence on here).
I signed up for the $200 plan becuase i saw claude code turns out it doesnt work in windows. You dont find out until after have paid and find out from the installer error message. They say oh use wsl, that doesnt work either just gives another errors says click here to fix it which links to page that doesnt even mention the issue. Wasted $200 for absolutely nothing.
"Claude Code is not supported on Windows."
npm error Claude Code requires macOS or Linux to run properly.
After getting an email from Anthropic today I tried to install Claude Code and got this error.
I was also skeptical that is would spend a lot of tokens. Is this true? Does it not run a PC?
Does anyone have a reliable good IDE I can use to vibe code?
I've tried Windsurf and Cursor with very mixed results. I was hopeful that an MCP might help also but they seem very flaky on PCs. All the demos of them that work are on Macs.
Does anyone have any suggestions.
Thank you.
Alright people, i'll be using claude code for the first time. I have a pro plan. What should be my approach and points that I should be aware of while using? And how to also make the most out of it without hitting rate limits?