A simplified implementation inspired by Cline (https://github.com/cline/cline), the autonomous coding agent. This mini version demonstrates the core concepts of AI-assisted coding through a command-line interface.
This project is a tribute to Cline, the powerful VS Code extension that enables AI-assisted coding. While Cline offers a full-featured IDE integration with capabilities like browser automation and GUI interactions, this mini version focuses on demonstrating the basic concepts through a simple CLI interface.
Check out the original Cline project: https://github.com/cline/cline
Here's how it works:
In this example:
- Run
npm run demo
to start the interactive mode - Type your request in natural language (e.g., "创建一个最简单的html,页面上显示helloword")
- The AI will create the file for you (e.g., helloworld.html was created)
- Type 'exit' to quit
It's that simple! Just tell the AI what you want to do in natural language.
• Node.js (v22) • npm • An API key for either Claude or DeepSeek
-
Install dependencies: $ npm install
-
Create .env file and add your API key: ANTHROPIC_API_KEY=your_claude_api_key_here
DEEPSEEK_API_KEY=your_deepseek_api_key_here
-
Start using it: $ npm run demo
That's it! Now you can start talking to the AI assistant.
-
Interactive Mode (Recommended for beginners): • Run: npm run demo • Type your request • See results • Type 'exit' to quit
-
Direct Command Mode: • Run: npm run demo -- "Create a simple JavaScript file that calculates fibonacci numbers" • See results immediately
-
Shell Script (Optional): • First time: chmod +x demo.sh • Then use: ./demo.sh "your request here"
• "Create a hello world HTML file" • "Write a function to calculate prime numbers" • "Explain how async/await works" • "Create a React component for a todo list"
. ├── .env # API keys ├── package.json # Dependencies and scripts ├── tsconfig.json # TypeScript config ├── demo.sh # Shell script helper └── src/ └── demo.mts # Main application code
• Interactive CLI mode • Command-line argument support • Basic file operations (read/write) • Multiple AI provider support (Claude/DeepSeek) • Natural language code generation • Code explanation and modification
While the original Cline project offers: • Full VS Code integration • Browser automation • GUI interactions • Advanced file management • Terminal integration • MCP server support
This mini version focuses on: • Basic CLI interface • Simple file operations • Core AI interactions • Learning/demonstration purposes
MIT
Note: This is an educational project inspired by Cline. For production use, please check out the original Cline project at https://github.com/cline/cline