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
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
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.
read it here
have been using it for 10 mins... this will change the world!
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
Repo: https://github.com/kennyjpowers/claude-config
Includes install script to install claudekit config as well as the custom config from the repo in either a project or user .claude/ directory.
Custom commands are designed for the workflow I've been iterating on:
Feel free to fork or contribute and I'm curious to hear any and all feedback! Let's make the best of #ClaudeCode!
EDIT: added repo link
EDIT2: now available via npm https://www.npmjs.com/package/@33strategies/claudeflow
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?
Introduction
After my previous post discussing my transition to Claude, many of you asked about my specific workflow. This guide outlines how I've set up Claude's desktop application with external tools to enhance its capabilities.
Fittingly, Claude itself helped me write this guide - a perfect demonstration of how these extended capabilities can be put to use. The very document you're reading was created using the workflow it describes.
These tools transform Claude from a simple chat interface into a powerful assistant with filesystem access, web search capabilities, and enhanced reasoning. This guide is intended for anyone looking to get more out of their Claude experience, whether you're a writer, programmer, researcher, or knowledge worker.
Requirements
Claude Pro subscription ($20/month)
Claude desktop application (this won't work with the browser version)
While similar functionality is possible through Claude's API, this guide focuses on the desktop setup
Desktop Application Setup
The Claude desktop application is typically installed in:
Windows:
C:\Users\[USERNAME]\AppData\Roaming\ClaudeMac:
/Users/[USERNAME]/Library/Application Support/Claude
Place your configuration file (claude_desktop_config.json) in this directory. You can copy these configuration examples and update your username and verify file paths.
Accessing Developer Settings
Windows: Access via the hamburger menu (โก) in the Claude desktop app, then click "Settings"
Mac: Access via Claude > Settings in the menu bar or by using โ+, (Command+comma)
Configuration Examples
Windows Configuration
{
"mcpServers": {
"fetch": {
"command": "python",
"args": ["-m", "server_fetch"]
},
"brave-search": {
"command": "C:\\Users\\username\\AppData\\Roaming\\npm\\npx.cmd",
"args": ["-y", "@modelcontextprotocol/server-brave-search"],
"env": {
"BRAVE_API_KEY": "your-brave-api-key-here",
"PATH": "C:\\Program Files\\nodejs;C:\\Users\\username\\AppData\\Roaming\\npm;%PATH%",
"NODE_PATH": "C:\\Users\\username\\AppData\\Roaming\\npm\\node_modules"
}
},
"tavily": {
"command": "C:\\Users\\username\\AppData\\Roaming\\npm\\npx.cmd",
"args": ["-y", "[email protected]"],
"env": {
"TAVILY_API_KEY": "your-tavily-api-key-here",
"PATH": "C:\\Program Files\\nodejs;C:\\Users\\username\\AppData\\Roaming\\npm;%PATH%",
"NODE_PATH": "C:\\Users\\username\\AppData\\Roaming\\npm\\node_modules"
}
},
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "C:\\Users\\username\\Documents"]
},
"sequential-thinking": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-sequential-thinking"]
}
}
}macOS Configuration
{
"mcpServers": {
"fetch": {
"command": "/opt/homebrew/bin/python3",
"args": ["-m", "server_fetch"]
},
"brave-search": {
"command": "/opt/homebrew/bin/npx",
"args": ["-y", "@modelcontextprotocol/server-brave-search"],
"env": {
"BRAVE_API_KEY": "your-brave-api-key-here",
"PATH": "/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin",
"NODE_PATH": "/opt/homebrew/lib/node_modules"
}
},
"tavily": {
"command": "/opt/homebrew/bin/npx",
"args": ["-y", "[email protected]"],
"env": {
"TAVILY_API_KEY": "your-tavily-api-key-here",
"PATH": "/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin",
"NODE_PATH": "/opt/homebrew/lib/node_modules"
}
},
"filesystem": {
"command": "/opt/homebrew/bin/npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/Users/username/Documents"]
},
"sequential-thinking": {
"command": "/opt/homebrew/bin/npx",
"args": ["-y", "@modelcontextprotocol/server-sequential-thinking"]
}
}
}Tools and Their Universal Benefits
I deliberately selected tools that enhance Claude's capabilities across any field or use case, creating a versatile foundation regardless of your specific needs.
Web Search Tools
Brave Search: Broad web results with comprehensive coverage
Tavily: AI-optimized search with better context understanding
These give Claude access to current information from the web - essential for almost any task.
Filesystem Access
Allows Claude to read, analyze, and help organize files - a universal need across all fields of work.
Sequential Thinking
Improves Claude's reasoning by breaking down complex problems into steps - beneficial for any analytical task from programming to business strategy.
Voice Input Integration
To minimize typing, you can use built-in voice-to-text features:
Windows: Use Windows' built-in voice-to-text feature
Windows Key + H: Activates voice dictation in any text field
Mac: Consider using Whisper for voice-to-text functionality
Several Whisper-based applications are available for macOS that provide excellent voice recognition
These voice input options dramatically speed up interaction and reduce fatigue when working with Claude.
Installation Prerequisites
You'll need:
Claude Pro Subscription ($20/month)
Claude Desktop Application
Node.js and npm: From nodejs.org
Python: From python.org
API Keys (I'm using the free tiers for both services):
Brave Search: brave.com/search/api
Tavily: tavily.com
While some users opt for GitHub repositories or Docker containers, I've chosen npx and npm for consistency and simplicity across different systems. This approach requires less configuration and is more approachable for newcomers.
Installation Commands
Windows (PowerShell)
# Option 1: Install Node.js using winget winget install OpenJS.NodeJS # Option 2: Install Node.js using Chocolatey choco install nodejs # Verify installations node -v npm -v npx -v # Find npm location Get-Command npm | Select-Object -ExpandProperty Source Get-Command npx | Select-Object -ExpandProperty Source # Update npm to latest version npm install -g npm@latest # Python installation choco install python # or winget install Python.Python # Verify Python installation python --version
macOS (Terminal)
# Install Node.js and npm using Homebrew brew update brew install node # Verify installations node -v npm -v npx -v # Find npm location which npm which npx # Check npm global installation directory npm config get prefix # Update npm to latest version npm install -g npm@latest # Python installation brew install python # Verify Python installation python3 --version
Linux (Ubuntu/Debian)
# Install Node.js and npm sudo apt update sudo apt install nodejs npm # For more recent Node.js versions curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash - sudo apt-get install -y nodejs # Verify installations node -v npm -v npx -v # Find npm location which npm which npx # Check npm global installation directory npm config get prefix # Update npm to latest version sudo npm install -g npm@latest # Python installation sudo apt install python3 python3-pip # Verify Python installation python3 --version
Troubleshooting Tips
Windows
Finding Path Locations:
For Windows PowerShell:
Find npm location:
Get-Command npm | Select-Object -ExpandProperty SourceFind npx location:
Get-Command npx | Select-Object -ExpandProperty SourceCheck npm global installation directory:
npm config get prefixList all globally installed packages:
npm list -g --depth=0
Path Issues:
If commands aren't recognized after installation, restart your terminal or computer
Verify Node.js is properly installed with
node -vCheck if PATH was updated correctly with
$env:Path -split ';'
Permission Errors:
Run PowerShell as Administrator for system-wide installations
For permission errors during global installs, try
npm cache clean --force
Missing Dependencies:
If npm or npx commands fail, verify Node.js installation with
node -vTry reinstalling Node.js using
winget install OpenJS.NodeJSUpdate npm if needed:
npm install -g npm@latest
Version Conflicts:
Check versions with
node -vandnpm -vFor multiple Node.js versions, ensure the right one is active
API Keys Not Working:
Double-check for typos in your API keys
Verify the API keys are active in your respective accounts
Confirm you haven't exceeded API limits
macOS/Linux
Finding Path Locations:
Find npm location:
which npmFind npx location:
which npxCheck npm global installation directory:
npm config get prefixList all globally installed packages:
npm list -g --depth=0
Path Issues:
If commands aren't recognized after installation, restart your terminal
Verify Node.js is properly installed with
node -vCheck if PATH includes npm by running:
echo $PATHEnsure Homebrew paths are included in your profile (
~/.zshrcor~/.bash_profile)
Permission Errors:
For permission issues:
sudo chown -R $(whoami) $(npm config get prefix)/{lib/node_modules,bin,share}Consider setting up a local npm prefix:
npm config set prefix ~/.npm-globalUpdate your PATH:
export PATH=~/.npm-global/bin:$PATH
Missing Dependencies:
If npm or npx commands fail, verify Node.js installation with
node -vTry reinstalling Node.js:
brew reinstall nodeUpdate npm if needed:
npm install -g npm@latest
Version Conflicts:
Check versions with
node -vandnpm -vFor multiple Node.js versions, consider using nvm:
Install nvm:
brew install nvmInstall specific Node version:
nvm install [version]Use specific version:
nvm use [version]
API Keys Not Working:
Double-check for typos in your API keys
Verify the API keys are active in your respective accounts
Confirm you haven't exceeded API limits
Checking Logs for Troubleshooting
Log files can be found at:
macOS:
~/Library/Logs/ClaudeWindows:
%APPDATA%\Claude\logs
You can check recent logs with:
macOS:
tail -n 20 -f ~/Library/Logs/Claude/mcp*.logWindows: View the log files in
%APPDATA%\Claude\logs
Example Workflows
Research Assistant
Research topics using Brave and Tavily
Save findings to structured documents
Generate summaries with key insights
Content Creation
Collect reference materials using search tools
Use sequential thinking to outline content
Draft and save directly to your filesystem
Data Analysis
Point Claude to data files
Analyze patterns using sequential thinking
Generate insights and reports
Coding and Technical Assistance
Use filesystem access to analyze code files
Reference documentation through web search
Break down complex technical problems with sequential thinking
Personal Knowledge Management
Save important information to your local filesystem
Search the web to expand your knowledge base
Create structured documents for future reference
Verification
To verify that your setup is working correctly:
After completing all installation and configuration steps, completely close the Claude desktop application:
IMPORTANT: Simply closing the window is not enough - the app continues running in the background and won't load the new configuration
Windows: Right-click the Claude icon in the system tray (bottom right corner) and select "Quit"
Mac: Right-click the Claude icon in the menu bar (top right) and select "Quit"
Relaunch the Claude desktop application
Look for the tools icon in the bottom right corner of the input box (the wrench or hammer icon)
Click on the tools icon to see the available tools
You should see a list of available MCP tools in the panel that appears
If all tools appear, your setup is working correctly and ready to use. If you don't see all the tools or encounter errors, review the troubleshooting section and check your configuration file for syntax errors.
Manual Server Testing
If you're having trouble with a particular server, you can test it manually in the terminal:
Windows:
npx -y u/modelcontextprotocol/server-filesystem "C:\path\to\your\directory"
macOS:
/opt/homebrew/bin/npx -y @modelcontextprotocol/server-filesystem "/Users/username/Documents"
This will help diagnose issues before attempting to use the server with Claude.
Additional Notes
Free API Tiers
I'm using the free tier for both Brave Search and Tavily APIs. The free versions provide plenty of functionality for personal use:
Brave Search offers 2,000 queries/month on their free tier
Tavily provides 1,000 searches/month on their free plan
Memory Management
While these tools greatly enhance Claude's capabilities, be aware that they may increase memory usage. If you notice performance issues, try closing other applications or restarting the desktop app.
API Usage Limits
Both Brave Search and Tavily have usage limits on their free tiers. Monitor your usage to avoid unexpected service disruptions or charges.
Alternative Installation Methods
While this guide uses npx for consistency, Docker installations are also available for all these tools if you prefer containerization.
Keeping Tools Updated
Periodically check for updates to these tools using: npm outdated -g
Security Considerations
Only allow file system access to directories you're comfortable with Claude accessing
Consider creating a dedicated directory for Claude's use rather than giving access to sensitive locations
API keys should be treated as sensitive information - never share your configuration file
Regularly check your API usage on both Brave and Tavily dashboards
Set up a dedicated Claude directory to isolate its file access (e.g.,
C:\Users\username\Documents\ClaudeFiles)
Resources
My original post about transitioning from ChatGPT to Claude
Official Model Context Protocol Servers Repository for reference implementations and documentation
Brave Search API: brave.com/search/api
Tavily API: tavily.com
For API implementation, check Claude's API documentation
Start with simpler configurations before implementing this full setup
Conclusion
This configuration has significantly enhanced my productivity with Claude. By choosing universally useful tools rather than specialized ones, this setup provides fundamental improvements that benefit everyone - whether you're a writer, programmer, researcher, or business professional.
While there's a learning curve, the investment pays off in Claude's dramatically expanded capabilities. This guide itself is a testament to what's possible with the right configuration.
Updates and Improvements to This Guide
This guide has been continuously improved with:
Configuration Updates
Replaced placeholder text with actual file paths and clear instructions
Added notes about replacing "username" with your actual system username
Updated all package references to use the current
@modelcontextprotocol/prefix (formerly@server/)Changed configuration structure from
serverstomcpServersto match current requirementsAdded Apple Silicon Mac paths using
/opt/homebrew/instead of/usr/local/
Enhanced Instructions
Added specifics on how to find correct paths using terminal commands
Included detailed notes for M1/M2/M3 Mac users
Added instructions on accessing developer settings in Claude desktop app
Added logging information for troubleshooting server issues
Added manual server testing instructions to diagnose problems
Corrected tools icon location to bottom right of the input box
Improved Formatting
Better code block readability
Enhanced headings and section organization
Added emphasis for important points and key concepts
Additional Content
Expanded example workflows to include coding assistance and knowledge management
Added more security recommendations
Included log file locations and commands for checking logs
These improvements make the guide more approachable for users of all technical levels while maintaining comprehensive coverage of the setup process, and ensure compatibility with the latest version of Claude desktop app.
I have been using claude code as a VS code extension on my linux device for a month with no problems, today I am getting command not found when I click on the extension or try to run it through the terminal.
I tried reinstalling the extension but that didn't fix it.
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'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.