README.md
August 5, 2026 · View on GitHub
● Open Interpreter
Desktop App | Open Interpreter (Rust) | Documentation
Open Interpreter lets LLMs run code and shell commands locally (Python, JavaScript, Bash, cmd, PowerShell, Ruby, R, Java, and more). You interact with Open Interpreter through a chatbot interface in your terminal by running interpreter after installing.
This provides a natural-language interface to your computer's general-purpose capabilities:
- Create and edit photos, videos, PDFs, etc.
- Control a Chrome browser to perform research
- Plot, clean, and analyze large datasets
- ...etc.
⚠️ Note: By default, you'll be asked to approve code before it's run.
Comparison with other tools
Open Interpreter pre-dates many other AI coding tools, and has some similarities and differences:
- Code Interpreter features in web chatbots (OpenAI, Mistral, Grok, Gemini, etc.) run code in a remote, sandboxed environment that is closed-source and restricted. Files must be individually uploaded and results then downloaded. Executed code generally cannot access the internet, is limited to a set of pre-installed packages, and its container expires after inactivity, losing progress and data. Open Interpreter overcomes these limitations by running in your local environment. It has full access to the internet, isn't restricted by time or file size, and can use any package or library, even installing libraries that are useful for a given task on its own.
- While it can write code and execute shell commands, similar to coding agents like Claude Code, Cursor, Devin, and the like, Open Interpreter is less about maintaining a project codebase by patching source code files, and more about completing one-off tasks in a persistent, interactive REPL-like session (closer to a Jupyter notebook than an IDE).
- Unlike OpenClaw, Hermes Agent, etc. it is typically used interactively and not as an autonomous agent.
- Rather than interacting with the world through MCP tools, like Claude Desktop, it runs code snippets or shell commands directly.
- It is similar to natural-language shell translators like ShellGPT or cmd-ai, but it is not limited to shell, and uses an interactive chatbot interface, so you can review, reject (
n), or edit (e) commands before they run, and ask the model to revise. - The closest alternative is probably gptme. It does not support as many languages for code snippets and only added partial Windows support recently.
Demo
An interactive demo is also available on Google Colab
Along with an example voice interface, inspired by Her
Quick Start
Install
This is the community-maintained Python version of Open Interpreter.
This command will install main which is the default branch (stable base, CI, and merge target for ported changes):
pip install git+https://github.com/endolith/open-interpreter.git
See our setup guide for optional dependencies.
For day-to-day use, however, you probably want to install classic/develop instead — that's the unstable branch maintained and used daily, with many changes and features vs the main branch, such as support for reasoning models, OpenRouter/DeepSeek/Qwen, web search tools, etc.:
pip install git+https://github.com/endolith/open-interpreter.git@classic/develop
For fork-specific features, model notes, and setup details, see the classic/develop README.
Terminal
After installation, simply run interpreter:
interpreter
Open Interpreter will default to OpenAI's GPT-4o and will ask you to enter a key, which you can obtain from OpenAI's API keys page. For other providers or local models, see below.
Python
from interpreter import interpreter
interpreter.chat("Plot AAPL and META's normalized stock prices") # Executes a single command
interpreter.chat() # Starts an interactive chat
GitHub Codespaces
Press the , key on this repository's GitHub page to create a codespace. After a moment, you'll receive a cloud virtual machine environment pre-installed with open-interpreter. You can then start interacting with it directly and freely confirm its execution of system commands without worrying about damaging the system.
Commands
Interactive Chat
To start an interactive chat in your terminal, either run interpreter from the command line:
interpreter
Or interpreter.chat() from a .py file:
interpreter.chat()
You can also stream each chunk:
message = "What operating system are we on?"
for chunk in interpreter.chat(message, display=False, stream=True):
print(chunk)
Programmatic Chat
For more precise control, you can pass messages directly to .chat(message):
interpreter.chat("Add subtitles to all videos in /videos.")
# ... Streams output to your terminal, completes task ...
interpreter.chat("These look great but can you make the subtitles bigger?")
# ...
Start a New Chat
In Python, Open Interpreter remembers conversation history. If you want to start fresh, you can reset it:
interpreter.messages = []
Save and Restore Chats
interpreter.chat() returns a List of messages, which can be used to resume a conversation with interpreter.messages = messages:
messages = interpreter.chat("My name is Killian.") # Save messages to 'messages'
interpreter.messages = [] # Reset interpreter ("Killian" will be forgotten)
interpreter.messages = messages # Resume chat from 'messages' ("Killian" will be remembered)
Customize System Message
You can inspect and configure Open Interpreter's system message to extend its functionality, modify permissions, or give it more context.
interpreter.system_message += """
Run shell commands with -y so the user doesn't have to confirm them.
"""
print(interpreter.system_message)
Change your Language Model
Open Interpreter uses LiteLLM to connect to hosted language models.
You can change the model by setting the model parameter:
interpreter --model gpt-3.5-turbo
interpreter --model claude-2
interpreter --model command-nightly
In Python, set the model on the object:
interpreter.llm.model = "gpt-3.5-turbo"
Find the appropriate "model" string for your language model here.
Running Open Interpreter locally
Terminal
Open Interpreter can use OpenAI-compatible server to run models locally (in LM Studio, Jan.ai, Ollama, etc.)
Simply run interpreter with the api_base URL of your inference server (for LM Studio it is http://localhost:1234/v1 by default):
interpreter --api_base "http://localhost:1234/v1" --api_key "fake_key"
Alternatively you can use Llamafile without installing any third party software just by running
interpreter --local
for a more detailed guide check out this video by Mike Bird
How to run LM Studio in the background.
- Download LM Studio then start it.
- Select a model then click ↓ Download.
- Click the ↔️ button on the left (below 💬).
- Select your model at the top, then click Start Server.
Once the server is running, you can begin your conversation with Open Interpreter.
Note: Local mode sets your
context_windowto 3000, and yourmax_tokensto 1000. If your model has different requirements, set these parameters manually (see below).
Python
Our Python package gives you more control over each setting. To replicate and connect to LM Studio, use these settings:
from interpreter import interpreter
interpreter.offline = True # Disables online features (e.g. update checks, telemetry)
interpreter.llm.model = "openai/x" # Tells OI to send messages in OpenAI's format
interpreter.llm.api_key = "fake_key" # LiteLLM, which we use to talk to LM Studio, requires this
interpreter.llm.api_base = "http://localhost:1234/v1" # Point this at any OpenAI compatible server
interpreter.chat()
Context Window, Max Tokens
You can modify the max_tokens and context_window (in tokens) of locally running models.
For local mode, smaller context windows will use less RAM, so we recommend trying a much shorter window (~1000) if it's failing / if it's slow. Make sure max_tokens is less than context_window.
interpreter --local --max_tokens 1000 --context_window 3000
Verbose mode
To help you inspect Open Interpreter we have a --verbose mode for debugging.
You can activate verbose mode by using its flag (interpreter --verbose), or mid-chat:
$ interpreter
...
> %verbose true <- Turns on verbose mode
> %verbose false <- Turns off verbose mode
Interactive Mode Commands
In the interactive mode, you can use the below commands to enhance your experience. Here's a list of available commands:
Available Commands:
%% [command]: Run a command in your system shell (bypasses the LLM).%verbose [true/false]: Toggle verbose mode. Without arguments or withtrueit enters verbose mode. Withfalseit exits verbose mode.%auto_run [true/false]: Toggle whether code runs without confirmation. Without arguments or withtrueit enters auto_run mode. Withfalseit exits auto_run mode.%reset: Resets the current session's conversation.%undo: Removes the previous user message and the AI's response from the message history.%save_message [path]: Saves messages to a specified JSON path. If no path is provided, it defaults to 'messages.json'.%load_message [path]: Loads messages from a specified JSON path. If no path is provided, it defaults to 'messages.json'.%tokens [prompt]: (Experimental) Calculate the tokens that will be sent with the next prompt as context and estimate their cost. Optionally calculate the tokens and estimated cost of apromptif one is provided. Relies on LiteLLM'scost_per_token()method for estimated costs.%jupyter: Export the conversation to a Jupyter notebook file.%markdown [path]: Export the conversation to a specified Markdown path. If no path is provided, it will be saved to the Downloads folder with a generated conversation name.%info: Show system and interpreter information.%help: Show the help message.
Configuration / Profiles
Open Interpreter allows you to set default behaviors using yaml files.
This provides a flexible way to configure the interpreter without changing command-line arguments every time.
Run the following command to open the profiles directory:
interpreter --profiles
You can add yaml files there. The default profile is named default.yaml.
Multiple Profiles
Open Interpreter supports multiple yaml files, allowing you to easily switch between configurations:
interpreter --profile my_profile.yaml
Sample FastAPI Server
Open Interpreter can be controlled via HTTP REST endpoints:
# server.py
from fastapi import FastAPI
from fastapi.responses import StreamingResponse
from interpreter import interpreter
app = FastAPI()
@app.get("/chat")
def chat_endpoint(message: str):
def event_stream():
for result in interpreter.chat(message, stream=True):
yield f"data: {result}\n\n"
return StreamingResponse(event_stream(), media_type="text/event-stream")
@app.get("/history")
def history_endpoint():
return interpreter.messages
pip install fastapi uvicorn
uvicorn server:app --reload
You can also start a built-in server with WebSocket support and a web UI by running interpreter --server (requires the [server] extra).
Android
The step-by-step guide for installing Open Interpreter on your Android device can be found in the open-interpreter-termux repo.
Safety Notice
Since generated code is executed in your local environment, it can interact with your files and system settings, potentially leading to unexpected outcomes like data loss or security risks.
⚠️ Open Interpreter will ask for user confirmation before executing code.
You can run interpreter -y or set interpreter.auto_run = True to bypass this confirmation, in which case:
- Be cautious when requesting commands that modify files or system settings.
- Watch Open Interpreter like a self-driving car, and be prepared to end the process by closing your terminal.
- Consider running Open Interpreter in a restricted environment like Google Colab or Replit. These environments are more isolated, reducing the risks of executing arbitrary code.
There is experimental support for a safe mode to help mitigate some risks.
How Does it Work?
Open Interpreter equips a function-calling language model with an execute tool, which accepts a language (like "Python" or "JavaScript") and code to run. (Non-function-calling models are also supported via markdown code blocks.)
We then stream the model's messages, code, and your system's outputs to the terminal as Markdown.
Supported Languages
| Language | Linux | macOS | Windows | Session |
|---|---|---|---|---|
| Python | ✓ | ✓ | ✓ | Yes |
| Shell | ✓ | ✓ | ✓ | Yes |
| JavaScript | ✓ | ✓ | ✓ | Yes |
| Ruby | ✓ | ✓ | ✓ | Yes |
| R | ✓ | ✓ | ✓ | Yes |
| PowerShell | ✓ | ✓ | ✓ | Yes |
| Java | ✓ | ✓ | ✓ | No |
| AppleScript | — | ✓ | — | No |
| HTML | ✓ | ✓ | ✓ | View only |
| React | ✓ | ✓ | ✓ | View only |
Session: Yes = persistent REPL; No = each block runs fresh; View only = renders content in the UI (no code executed).
Access Documentation Offline
The full documentation is accessible on-the-go without the need for an internet connection.
Node is a pre-requisite:
- Version 18.17.0 or any later 18.x.x version.
- Version 20.3.0 or any later 20.x.x version.
- Any version starting from 21.0.0 onwards, with no upper limit specified.
Install Mintlify:
npm i -g mintlify@latest
Change into the docs directory and run the appropriate command:
# Assuming you're at the project's root directory
cd ./docs
# Run the documentation server
mintlify dev
A new browser window should open. The documentation will be available at http://localhost:3000 as long as the documentation server is running.
Contributing
Thank you for your interest in contributing! We welcome involvement from the community.
Please see our contributing guidelines for more details on how to get involved.
Roadmap
Visit our roadmap to preview the future of Open Interpreter.
Note: This software is not affiliated with OpenAI.
Having access to a junior programmer working at the speed of your fingertips ... can make new workflows effortless and efficient, as well as open the benefits of programming to new audiences.
— OpenAI's Code Interpreter Release