Claude Code is a really awesome and extremely versatile generative AI based tool for agentic coding support. It ships as a Node.js based command-line interface, but has built-in integration support for both IDEs like Visual Studio Code and supports custom commands, hooks, agents and MCP servers for maximum extensibility.
This is Dr. Ralf S. Engelschall's opinionated setup for Claude Code on the Unix platforms Linux and macOS. If you disagree on any aspect, please just don't use it. The main purpose of this repository is to help Dr. Ralf S. Engelschall and his friends and colleagues to quickly setup Claude Code in the same pre-armed configuration on multiple computers.
A simple sneak preview of some of the configured features is:
This particular Claude Code setup has the following features:
-
The
claude updatecommand allows a convenient update of the installation, because companion tools have to be also updated and theclaudetool has to be re-tweaked/re-patched after every update. -
The
claudecommand now always picks up user and non-project specific system prompt from~/claude/prompt.md, because certain instructions are always reasonable to give. -
The
claudecommand now always picks up and assembles non-standard context filesetc/claude.mdor.claude/CLAUDE.mdfrom projects into the central (temporary)~/.claude/CLAUDE.md, as the default ofCLAUDE.md(in a project top-level) clutters projects. -
The MCP servers, the
LLMagent and/llmcommand allows convenient access to foreign LLMs like OpenAI ChatGPT, Google Gemini, DeepSeek, and xAI Grok. -
The Claude Code status line displays essential LLM and Git information, which are useful during AI assistance sessions.
-
The Claude Code colors follow the usual discreet blue/brown color scheme of Dr. Ralf S. Engelschall, as the default coloring is too colorful.
-
The following custom commands provide standard reusable functionalities, and are the heart of this Claude Code setup:
- prime: Prime the session context by reading project key files.
- changes: Complete ChangeLog entries based on Git commit messages.
- craft: Craft new source code.
- refactor: Refactor existing code.
- explain: Explain existing source code.
- lint:
Lint (analyze) existing source code.
- complete: The change is incomplete: Force a complete code change set at once.
- explain: The explanation is confusing: Request a better explanation of the change.
- recheck: The code you have updated in parallel: Request a rechecking of the code.
- refine: The code should be changed: Request a code refinement of a change.
- reassess: The change is obscure: Request a re-assessment of the change.
- nope: The change is not acceptable: Reject the code change and continue processing.
- hint: Give essential hints on certain questions.
- llm: Query foreign Large Language Model (LLM).
- quorum: Query multiple foreign Large Language Model (LLM) for a quorum answer.
- why: Use the "Five-Why" method to analyze the root-cause of a problem.
- exa: Use the Exa MCP server to search the Web.
- ref: Use the Ref MCP server to read Web information into context.
To setup Claude Code, just follow the following few steps:
-
PREREQUISITE:
Install Node.js globally into your system and ensure that the
node,npmandnpxcommands are in your$PATH. -
INSTALL SCRIPT AND CONFIG:
Install the content of this repository into your home directory:
$ git clone https://github.com/rse/claude-code-setup $ cd claude-code-setup $ ./setup install [<prefix>]
This installs the
claudewrapper script into<prefix>/bin/claudeand the configuration files into<prefix>/.claude/. -
INSTALL CLAUDE CODE:
Install Claude Code and the companion tools TweakCC, CCStatusLine, CCUsage, Any-Chat-Completions-MCP, and Brave Search MCP with the help of the
claudewrapper:$ sudo claude install
Notice: do not forget to regularly run
sudo claude updatelater! -
[Optional] SETUP LLM MCP:
Optionally, and only for the custom
/quorumand/llmcommands:Get API access keys for:
- OpenAI ChatGPT (directly)
- Google Gemini (directly)
- Deepseek (directly)
- xAI Grok (via OpenRouter)
Store those access keys in the following temporary environment variables:
CLAUDE_CODE_KEY_OPENAI_CHATGPT="..." CLAUDE_CODE_KEY_GOOGLE_GEMINI="..." CLAUDE_CODE_KEY_DEEPSEEK="..." CLAUDE_CODE_KEY_OPENROUTER="..."Then instantiate the corresponding MCP servers (adds entries to
~/.claude.json):claude mcp add --scope user --transport stdio \ -e AI_CHAT_KEY="$CLAUDE_CODE_KEY_OPENAI_CHATGPT" \ -e AI_CHAT_NAME="OpenAI ChatGPT" \ -e AI_CHAT_MODEL="gpt-5" \ -e AI_CHAT_BASE_URL="https://api.openai.com/v1" \ -- chat-openai-chatgpt npx -y any-chat-completions-mcp claude mcp add --scope user --transport stdio \ -e AI_CHAT_KEY="$CLAUDE_CODE_KEY_GOOGLE_GEMINI" \ -e AI_CHAT_NAME="Google Gemini" \ -e AI_CHAT_MODEL="gemini-2.5-flash" \ -e AI_CHAT_BASE_URL="https://generativelanguage.googleapis.com/v1beta/openai/" \ -- chat-google-gemini npx -y any-chat-completions-mcp claude mcp add --scope user --transport stdio \ -e AI_CHAT_KEY="$CLAUDE_CODE_KEY_DEEPSEEK" \ -e AI_CHAT_NAME="DeepSeek" \ -e AI_CHAT_MODEL="deepseek-chat" \ -e AI_CHAT_BASE_URL="https://api.deepseek.com/v1" \ -- chat-google-gemini npx -y any-chat-completions-mcp claude mcp add --scope user --transport stdio \ -e AI_CHAT_KEY="$CLAUDE_CODE_KEY_OPENROUTER" \ -e AI_CHAT_NAME="xAI Grok" \ -e AI_CHAT_MODEL="x-ai/grok-code-fast-1" \ -e AI_CHAT_BASE_URL="https://openrouter.ai/api/v1" \ -- chat-xai-grok npx -y any-chat-completions-mcp -
[Optional] SETUP BRAVE SEARCH MCP:
Optionally, and only for the custom
/bravecommand:Get a your Brave Search Access Token for API access and store it in a temporary environment variable:
CLAUDE_CODE_KEY_BRAVE="..."Then add the corresponding MCP server (adds entry to
~/.claude.json):claude mcp add --scope user --transport stdio \ -e BRAVE_API_KEY="$CLAUDE_CODE_KEY_BRAVE" \ -e BRAVE_MCP_ENABLED_TOOLS="brave_web_search" \ -- brave npx -y @brave/brave-search-mcp-server -
[Optional] SETUP GITHUB MCP:
Optionally, and only for the custom
/githubcommand:Get a your Github Private Access Token for API access and store it in a temporary environment variable:
CLAUDE_CODE_KEY_GITHUB="..."Then add the corresponding MCP server (adds entry to
~/.claude.json):claude mcp add --scope user --transport http \ github https://api.githubcopilot.com/mcp \ -H "Authorization: Bearer $CLAUDE_CODE_KEY_GITHUB" -
[Optional] SETUP REF AND EXA MCP:
Optionally, and only for the custom
/refand/exacommands:Get a your Ref and Exa accounts for API access and store it in a temporary environment variable:
CLAUDE_CODE_KEY_REF="..." CLAUDE_CODE_KEY_EXA="..."Then add the corresponding MCP servers (adds entry to
~/.claude.json):claude mcp add --scope user --transport http \ -- exa "https://mcp.exa.ai/mcp?exaApiKey=$CLAUDE_CODE_KEY_EXA" claude mcp add --scope user --transport http \ -- ref "https://api.ref.tools/mcp?apiKey=$CLAUDE_CODE_KEY_REF" -
GET ACCESS TO CLAUDE CODE:
Access to Claude Code: Here you have two options:
- Claude Code Free/Pro/Max-5x/Max-20x subscription (recommended)
- Anthropic API subscription (alternatively)
Using the Claude Code subscription is highly recommended.
Notice: the first option provides access to Anthropic Claude only via Web interfaces and to the API only indirectly via Claude Code, while only the second option also allows direct access to the Anthropic Claude API.
Notice: the first option is best for Claude Code because it has less limits and is more cost effective. The second option is more versatile, as you can use this subscription for more than just Claude Code.
-
LOGIN TO CLAUDE CODE:
Login to Claude Code:
$ claude /login
Copyright © 2025 Dr. Ralf S. Engelschall
Licensed under MIT
