Linux command
interpreter 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Start an interactive session
interpreter
Auto-run code without confirmation
interpreter -y
Use a specific model
interpreter --model [gpt-4o]
Use a local model
interpreter --local
Enable fast mode with a smaller model
interpreter --fast
Set context window and max tokens
interpreter --local --max_tokens [1000] --context_window [3000]
Load a saved profile
interpreter --profile [my_profile.yaml]
Pipe input from stdin
echo "[What OS am I using?]" | interpreter --stdin -y
说明
Open Interpreter provides a natural language interface for computers, allowing language models to execute code (Python, JavaScript, Shell, and more) locally on your machine. It functions like ChatGPT's Code Interpreter but runs in your terminal with full access to your local environment. The tool equips function-calling language models with an exec() function that accepts a programming language and code to run. Since code executes in your local environment, it can interact with files, install packages, browse the web, and control system settings. By default, interpreter asks for confirmation before executing code. Open Interpreter supports multiple model providers including OpenAI, Anthropic, and local models via Ollama, LM Studio, or jan.ai. Configuration can be saved to YAML profiles for easy switching between setups.
参数
- -y, --auto-run
- Run code without manual confirmation at each step
- --model _MODEL_
- Specify which model to use (e.g., gpt-4o, claude-3-sonnet)
- --local
- Use a local model for code interpretation (via Ollama, LM Studio, jan.ai, etc.)
- --fast
- Use a faster, smaller model for quicker responses
- --verbose
- Activate verbose mode for detailed output
- --os
- Enable OS mode for controlling your computer (mouse, keyboard, screen)
- --max_tokens _N_
- Maximum tokens for model output
- --context_window _N_
- Context window size (must be larger than max_tokens)
- --profile _FILE_
- Load configuration from a YAML profile
- --save-profile _NAME_
- Save current configuration as a named profile
- --tools _LIST_
- Enable specific tools (default: interpreter,editor)
- --stdin
- Accept input from stdin for Unix-style piping
- --custom_instructions _TEXT_
- Append custom instructions to the system message (e.g., system info, preferred languages).
- --api_base _URL_
- Custom API base URL for model provider.
- --api_key _KEY_
- API key for authentication.
FAQ
What is the interpreter command used for?
Open Interpreter provides a natural language interface for computers, allowing language models to execute code (Python, JavaScript, Shell, and more) locally on your machine. It functions like ChatGPT's Code Interpreter but runs in your terminal with full access to your local environment. The tool equips function-calling language models with an exec() function that accepts a programming language and code to run. Since code executes in your local environment, it can interact with files, install packages, browse the web, and control system settings. By default, interpreter asks for confirmation before executing code. Open Interpreter supports multiple model providers including OpenAI, Anthropic, and local models via Ollama, LM Studio, or jan.ai. Configuration can be saved to YAML profiles for easy switching between setups.
How do I run a basic interpreter example?
Run `interpreter` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -y, --auto-run do in interpreter?
Run code without manual confirmation at each step