How to Install OpenClaude in 10 Minutes (Open Source Claude Code with ANY AI Model)

How to Install OpenClaude in 10 Minutes (Open Source Claude Code with ANY AI Model)

OpenCloud Installation and Configuration Guide

Overview of OpenCloud and Claude Code

  • The source code for Claude has been leaked, leading developers on GitHub to create open-source replicas.
  • OpenCloud allows integration with any model provider through the Open Router API, enhancing functionality beyond the original Claude Code.
  • A new installation process is introduced due to potential copyright takedowns by Anthropic on previous repositories.

Installation Prerequisites

  • Users must install Node.js and Bun; instructions are provided for Mac, Linux, and Windows systems.
  • The installation begins by downloading Node.js from its official site, selecting the appropriate version for the operating system.

Setting Up OpenCloud

  • After installing Node.js and Bun, users need to download the source code from a specified repository as a zip file.
  • It is recommended to store the unzipped source code in a stable location (e.g., Applications folder on Mac or Program Files on Windows).

Configuring OpenCloud in VS Code

  • Users should open the downloaded folder in VS Code and run specific commands (npm install, npm run build, npm link) in the terminal to set up dependencies.
  • A test folder can be created where users will configure their exports necessary for running OpenCloud.

API Key Setup with Open Router

  • To use OpenRouter, an API key must be generated after funding an account; this platform aggregates various LLM model providers.
  • Users need to select a model from OpenRouter; examples include Gemini Flash 3 Preview or Miniax.

Open Cloud Agent Setup and Usage

Choosing the Right Model

  • The speaker suggests using affordable, open-source models like Miniax M 2.7 or GLM5 for decent performance without high costs.
  • For this demonstration, the speaker opts for Gemini Flash 3 Preview as the model to be used.

Running Open Cloud Command

  • After setting up, the speaker copies commands into the terminal within a designated test folder to run an Open Cloud command.
  • Confirmation of successful setup is indicated by seeing "open router" and "Gemini 3 PL" in the output.

Creating a Simple Web Page

  • The agent is instructed to create a simple index.html web page displaying "Hello World" without CSS.
  • The agent successfully creates the webpage, confirming that it is operational and connected properly.

Configuration Variables Management

  • Important configuration variables must be input each time a new instance is started since they are not saved as local environment variables.
  • The speaker notes that making these configurations permanent can be complex and may not be necessary for most users.

Switching Model Providers

  • To switch model providers, one must exit the current OpenCloud session and select a new model from Open Router.
  • After copying the new model name, it should replace the existing model name in environment variables before restarting OpenCloud.
Video description

EDIT - Repo Link : You must now search for the repo yourself on the web due to copyright concerns. EDIT - Preserved Source Code Link: Removed due to DMCA concerns. See above note. NodeJS: https://nodejs.org/en/download Bun: https://bun.com/docs/installation#installation OpenRouter: https://openrouter.ai/ --- Heads Up: Some people have asked me about security or safety. I am not the author of this code, and open source projects are always use-at-your-own-risk. If you wish to audit the code with an LLM first, you might use Cursor, Claude Code itself, or Codex to review the source code before you do any installs. It's also recommended to use a fresh API key only for this application in OpenRouter, and set billing limits or expirations on it if you wish. If you wish to attempt to patch dependency vulnerabilities (such as Lodash, seen in the video) as those appear over time, you can run "npm audit fix", but be aware that in the worst case, this could break the application. If you are deeply concerned about security, I would recommend sticking with Claude Code, Antigravity, or Codex and not running a project like this. That said, this tutorial is for those who want to proceed anyway. You are ultimately responsible for what you install. --- Mac Installation Commands: 1. Download zip for OpenClaude Source Code 2. Determine where you want this application to be permanently installed. Don’t change or move it afterward. Applications folder on mac is good. 3. Unzip and add all the OpenClaude files to this destination folder. 4. Install nodeJS Get command for your operating system here: https://nodejs.org/en/download Install Bun: Get command for your operating system here: https://bun.com/docs/installation#installation 5. Open the source code folder in VS Code, Antigravity, or Cursor, and open a terminal. Run (you can copy these three all at once and paste in): npm install npm run build npm link This will install the dependencies, then build the application with bun. npm link creates a symlink that will let you run the OpenClaude run command in any folder. 6. Create a test folder and open it up in your IDE. 7. Open your terminal and paste in your exports, configured with the openrouter model you want. export CLAUDE_CODE_USE_OPENAI=1 export OPENAI_BASE_URL="https://openrouter.ai/api/v1" export OPENAI_API_KEY="openrouter-api-key-here-dont-remove-quotation-marks" export OPENAI_MODEL="google/gemini-3-flash-preview" 8. Run openclaude with openclaude 9. Test it to see if it works. 10. Switch models by using /exit, modifiying your exports, pasting them back in, and hitting enter and then running openclaude again. export CLAUDE_CODE_USE_OPENAI=1 export OPENAI_BASE_URL="https://openrouter.ai/api/v1" export OPENAI_API_KEY=“openrouter-api-key-here-dont-remove-quotation-marks” export OPENAI_MODEL=“openrouter-modelname-here” Windows: 1. Download zip for OpenClaude Source Code 2. Determine where you want this application to be permanently installed. Don’t change or move it afterward. Applications folder on mac is good. 3. Unzip and add all the OpenClaude files to this destination folder. 4. Install nodeJS Get command for your operating system here: https://nodejs.org/en/download Install Bun: Get command for your operating system here: https://bun.com/docs/installation#installation 5. Windows Specific: Open PowerShell *as Administrator* and run this to ensure npm link is allowed to execute: Set-ExecutionPolicy RemoteSigned -Scope CurrentUser 6. Open the source code folder in VS Code, Antigravity, or Cursor, and open a terminal. Ensure you run everything as administrator. Run (you can copy these three all at once and paste in): npm install npm run build npm link This will install the dependencies, then build the application with bun. npm link creates a symlink that will let you run the OpenClaude run command in any folder. 7. Create a test folder and open it up in your IDE. 8. Open your terminal and paste these in, configured with the OpenRouter model you want and your openrouter API key. $env:CLAUDE_CODE_USE_OPENAI="1" $env:OPENAI_BASE_URL="https://openrouter.ai/api/v1" $env:OPENAI_API_KEY="YOUR_OPENROUTER_KEY_HERE" $env:OPENAI_MODEL="openrouter-model-here" 9. In a terminal, run: openclaude If you encounter any errors on windows that I couldn't have foreseen since I"m on Mac, paste your errors into ChatGPT or Gemini for assistance in correcting those.