Open Interpreter: ChatGPT That Runs Code on Your Machine
Open Interpreter lets LLMs run code locally. Python, JavaScript, shell commands — the AI writes and executes code on your computer. Like ChatGPT Code Interpreter, but local and unlimited.
Why Open Interpreter
- No file size limits (unlike ChatGPT)
- Internet access from code
- Any package/library available
- Runs locally — your data stays private
- Supports multiple LLMs
The Free API
from interpreter import interpreter
# Configure
interpreter.llm.model = "gpt-4o"
# Or use local model:
# interpreter.llm.model = "ollama/llama3"
# Chat
interpreter.chat("Create a bar chart of top 10 programming languages")
# AI writes matplotlib code, executes it, shows the chart
interpreter.chat("Download Bitcoin price data and find the best week to buy")
# AI writes requests + pandas code, runs it, gives analysis
interpreter.chat("Compress all PNG files in ~/Desktop to WebP")
# AI writes a shell script and runs it
Python API
from interpreter import interpreter
interpreter.llm.model = "gpt-4o"
interpreter.auto_run = True # No confirmation prompts
# Stream responses
for chunk in interpreter.chat("Find large files over 100MB", stream=True):
if chunk.get("type") == "message":
print(chunk["content"], end="")
elif chunk.get("type") == "code":
print(f"Running: {chunk[content]}")
HTTP Server
# Start as HTTP server
interpreter --server
# Call via API
curl -X POST http://localhost:8000/chat \
-H "Content-Type: application/json" \
-d "{\"message\": \"What is my disk usage?\"}"
Real-World Use Case
A data analyst needed to process 500 Excel files with different formats. ChatGPT Code Interpreter: 100MB limit. Open Interpreter: processed all 500 files locally, merged them, created pivot tables, exported to one master spreadsheet. Total: 15 minutes.
Quick Start
pip install open-interpreter
interpreter
Resources
Need automated data processing? Check out my tools on Apify or email spinov001@gmail.com.
Top comments (0)