mirror of
https://github.com/cline/cline.git
synced 2026-09-21 13:21:23 +08:00
* feat: refactor APPLY_PATCH tool Replace separate file creation and editing tools with unified APPLY_PATCH tool for the native-gpt-5 model variant. This consolidation simplifies file operations through a single patch-based interface. Changes: - Replace FILE_NEW and FILE_EDIT tools with APPLY_PATCH in config for gpt-5 with native tool calling - Disable EDITING_FILES system prompt section (no longer needed) - Remove EDITING_FILES section from base template - Refactor ApplyPatchHandler with improved architecture: - Extract patch parsing logic into PatchParser utility class - Extract file operations into FileProviderOperations utility - Extract path resolution into PathResolver utility - Add comprehensive error handling with DiffError types - Improve type safety with shared Patch types - Add extensive test coverage for PatchParser including: - Edge cases (empty files, large files, unicode) - Error conditions (malformed patches, invalid operations) - Complex scenarios (multiple chunks, context matching) - Export PATCH_MARKERS and BASH_WRAPPERS for reusability This refactoring improves maintainability, testability, and provides a more robust patch application system for the GPT-5 model variant when native tool calling is enabled. * Add diagnostic to result * Update unit tests * add feedback * typo * captureToolUsage * fix test * fix test * Update ClineMessage * update diff editor on stream * revert content partial stream * Disable Apply patch and add native gpt snap shot * Remove delete action and make preserveEscaping conditional * Add delete function to diff provider * Update UI for file deletion
Cline CLI
/_____/\ /_/\ /_______/\/__/\ /__/\ /_____/\
\:::__\/ \:\ \ \__.::._\/\::\_\\ \ \\::::_\/_
\:\ \ __\:\ \ \::\ \ \:. `-\ \ \\:\/___/\
\:\ \/_/\\:\ \____ _\::\ \__\:. _ \ \\::___\/_
\:\_\ \ \\:\/___/\/__\::\__/\\. \`-\ \ \\:\____/\
\_____\/ \_____\/\________\/ \__\/ \__\/ \_____\/
Autonomous coding agent CLI - capable of creating/editing files, running commands, using the browser, and more.
Installation
Install Cline globally using npm:
npm install -g cline
Usage
cline
This will start the Cline CLI interface where you can interact with the autonomous coding agent.
Features
- Autonomous Coding: AI-powered code generation, editing, and refactoring
- File Operations: Create, read, update, and delete files and directories
- Command Execution: Run shell commands and scripts
- Browser Automation: Interact with web pages and applications
- Multi-Model Support: Works with Anthropic Claude, OpenAI GPT, and other AI models
- MCP Integration: Extensible through Model Context Protocol servers
- Project Understanding: Analyzes codebases to provide context-aware assistance
Requirements
- Node.js 18.0.0 or higher
- Supported platforms: macOS, Linux. Windows soon
- Supported architectures: x64, arm64
Configuration
Cline can be configured through:
- Environment variables
- Configuration files
- Command-line arguments
See the main documentation for detailed configuration options.
Links
- Website: https://cline.bot
- Documentation: https://docs.cline.bot
- GitHub: https://github.com/cline/cline
- VSCode Extension: Available in the VSCode Marketplace
- JetBrains Extension: Available in the JetBrains Marketplace
License
Apache-2.0 - see LICENSE for details.
Support
- Report issues: GitHub Issues
- Community: GitHub Discussions
- Documentation: docs.cline.bot