Linux command
forge 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Start an interactive session
forge
Run a direct prompt without interactive mode
forge -p "[fix the bug in main.rs]"
Execute commands from a file
forge -c [commands.txt]
Run a workflow
forge -w [workflow.yaml]
Start in a sandboxed git worktree
forge --sandbox
Configure AI provider credentials
forge provider login
List configured MCP servers
forge mcp list
说明
Forge is an open-source AI coding assistant that works natively inside your terminal. Written in Rust, it integrates seamlessly with your existing shell (bash, zsh, fish) and provides AI-powered code assistance without requiring a separate IDE or GUI. Forge supports over 300 AI models including Claude, GPT, Gemini, Grok, and DeepSeek. It uses a multi-agent architecture with specialized agents: Forge for implementation, Muse for planning, Prime for documentation review, Parker for technical writing, and Sage for codebase exploration. The tool analyzes project files, dependencies, and Git history to provide context-aware suggestions with sub-50ms startup time. All operations run locally, keeping your code on your machine for privacy and security.
参数
- -p, --prompt _PROMPT_
- Direct prompt to process without entering interactive mode
- -c, --command _FILE_
- Path to a file containing initial commands to execute
- -w, --workflow _FILE_
- Path to a file containing the workflow to execute
- -e, --event _EVENT_
- Dispatch an event to the workflow
- --conversation-id _ID_
- Resume an existing conversation by its identifier
- -C, --directory _DIR_
- Set working directory before starting
- --sandbox
- Create an isolated git worktree for safe experimentation
- --agent _AGENT_
- Specify which agent to use for the session
- -r, --restricted
- Use restricted shell (rbash) for enhanced security
- --verbose
- Enable verbose output mode
- -h, --help
- Print help information
- -V, --version
- Print version
FAQ
What is the forge command used for?
Forge is an open-source AI coding assistant that works natively inside your terminal. Written in Rust, it integrates seamlessly with your existing shell (bash, zsh, fish) and provides AI-powered code assistance without requiring a separate IDE or GUI. Forge supports over 300 AI models including Claude, GPT, Gemini, Grok, and DeepSeek. It uses a multi-agent architecture with specialized agents: Forge for implementation, Muse for planning, Prime for documentation review, Parker for technical writing, and Sage for codebase exploration. The tool analyzes project files, dependencies, and Git history to provide context-aware suggestions with sub-50ms startup time. All operations run locally, keeping your code on your machine for privacy and security.
How do I run a basic forge example?
Run `forge` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -p, --prompt _PROMPT_ do in forge?
Direct prompt to process without entering interactive mode