AI coding agent with Morph Fast Apply integration.
https://docs.morphllm.com This repo is based on the opencode repo and its brilliant contributiors!
# Package managers
npm i -g morphcli@latest # or bun/pnpm/yarn
bun install morphcli@latest
yarn global add morphcli@latest
pnpm add -g morphcli@latestSet your API keys and run the Morph integration:
ANTHROPIC_API_KEY="your-claude-key" MORPH_API_KEY="your-morph-key" morphcli runFor faster, more accurate code edits, opencode can integrate with Morph - an AI model specialized for code merging at 4500+ tokens/second with 98.8% accuracy.
# Enable Morph Fast Apply
export MORPH_API_KEY=your_api_keyWhen enabled, opencode's edit tool automatically uses Morph's intelligent code merging instead of search-and-replace, supporting multiple edits and // ... existing code ... syntax.
For more info on how to configure morphcli and Morph Fast Apply head over to the docs.
To run morphcli locally you need:
- Bun
- Node.js/TypeScript
And run:
$ bun install
$ bun devMorph Integration: This CLI integrates with Morph Fast Apply API for intelligent code merging. See agent-instruction.txt for integration details.
- Intelligent Code Merging: Replace full file rewrites with Morph's 4500+ tokens/second merging
- Batch Processing: Non-interactive mode for automation
- File-based Instructions: Read prompts from
agent-instruction.txtby default - Provider Agnostic: Works with Claude, OpenAI, and other providers
- Smart Editing: Uses
// ... existing code ...syntax for precise edits - Error Handling: Robust error collection and reporting
- Flexible Input: Command line args, stdin, or file input
- Terminal Focused: Built for CLI workflows and automation
Learn more Morph Docs | Fast Apply Guide