Skip to content

RiaanDeWinnaar/qwen-code-tools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

14 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Qwen Coder Tools - LM Studio Plugin

A comprehensive development toolkit plugin for LM Studio, specifically optimized for Qwen models with XML-style tool calling support and autonomous agent capabilities.

Plugin Status LM Studio License image

ALSO WORKS WITH GPT OSS Screenshot 2025-08-10 134742

πŸš€ Features

πŸ› οΈ Development Tools

  • File Management: Create, read, and list files with workspace organization
  • Code Execution: Run Python and JavaScript code with proper output capture
  • Project Scaffolding: Generate complete project structures for various frameworks
  • Package Management: Install dependencies via npm, pip, yarn, and other package managers
  • Git Operations: Initialize repositories, commit changes, and manage version control
  • Web Search: Research latest information and documentation with Brave Search API integration

πŸ€– Autonomous Agent Mode

  • Toggle Mode: Switch between "Edit Mode" (individual tools) and "Agent Mode" (autonomous behavior)
  • Multi-step Execution: Complete complex development tasks without step-by-step confirmation
  • Intelligent Planning: Analyze requirements and execute comprehensive development workflows
  • Research-Driven: Automatically research best practices and implement quality solutions

⚑ Qwen Model Optimization

  • XML Tool Calling: Optimized for Qwen's <function=name><parameter=value> format
  • Simple Parameters: Robust parameter validation with clear error messages
  • Self-Correction: Designed for model error recovery and retry mechanisms

πŸ“‹ Available Tools

Tool Description Use Case
create_file Create files with specified content Code files, documentation, configs
read_file Read existing files to understand codebase Code analysis, debugging
list_files Explore directory structures and find files Project navigation, file discovery
execute_code Run Python/JavaScript with output capture Testing, validation, scripting
git_operation Initialize repos, commit, manage version control Project versioning, collaboration
package_manager Install dependencies (npm, pip, yarn, etc.) Environment setup, dependency management
create_project_structure Scaffold complete project templates Rapid project initialization
web_search Research latest information and APIs Documentation, best practices research
autonomous_agent Execute complex tasks autonomously Complete workflow automation

βš™οΈ Configuration

Per-Chat Settings

  • Workspace Folder: Directory for file operations (default: "qwen_workspace")
  • Max File Size: File size limit in KB (default: 1024)
  • Enable Web Search: Allow internet research capabilities (default: false)
  • Brave Search API Key: Enhanced search with higher rate limits (optional)
  • Agent Mode: Enable autonomous agent behavior (default: false)

Global Settings

  • Default Timeout: Timeout for long operations in seconds (default: 30)

πŸ› οΈ Installation

Auto-Setup Process (Recommended)

Our enhanced startup scripts now provide automatic setup and installation:

  1. Download/Clone the Repository

    git clone https://github.com/RiaanDeWinnaar/qwen-code-tools.git
    cd qwen-code-tools
  2. Start LM Studio (run at least once to create extensions directory)

  3. Run the Startup Script for your platform:

    # Windows Command Prompt
    .\start-plugin.bat
    
    # Windows PowerShell
    .\start-plugin.ps1
    
    # Linux/macOS
    ./start-plugin.sh
  4. That's it! The script will:

    • βœ… Auto-detect LM Studio installation
    • βœ… Create plugin directory structure: ~/.lmstudio/extensions/plugins/lmstudio/qwen-coder-tools/
    • βœ… Copy all plugin files automatically
    • βœ… Validate setup and start the development server
Screenshot 2025-08-09 121338

Manual Installation (Alternative)

If auto-setup doesn't work, follow these manual steps:

  1. Create Plugin Directory:

    # Windows
    mkdir "%USERPROFILE%\.lmstudio\extensions\plugins\lmstudio\qwen-coder-tools"
    
    # Linux/macOS
    mkdir -p ~/.lmstudio/extensions/plugins/lmstudio/qwen-coder-tools
  2. Copy Plugin Files: Copy these files from the repository to the plugin directory:

    • manifest.json
    • package.json
    • src/ directory
    • All compiled .js files (index.js, toolsProvider.js, etc.)
  3. Run Development Server:

    cd ~/.lmstudio/extensions/plugins/lmstudio/qwen-coder-tools
    lms dev

Development Setup

git clone https://github.com/RiaanDeWinnaar/qwen-code-tools.git
cd qwen-code-tools
npm install
npx tsc        # Compile TypeScript
lms dev        # Starts development server

Auto-Startup Configuration

  1. Windows Startup: Copy start-plugin.bat to shell:startup
  2. Desktop Shortcut: Create shortcut to start-plugin.bat
  3. Task Scheduler: Set up advanced scheduling with LM Studio detection

Troubleshooting

"manifest.json not found" Error

This error occurs when the plugin directory structure doesn't exist or files aren't copied correctly.

Solutions:

  1. Use Auto-Setup: Run the startup script from the repository directory
  2. Check LM Studio: Ensure LM Studio has been run at least once
  3. Manual Copy: Follow the manual installation steps above
  4. Check Paths: Verify the plugin directory exists at:
    • Windows: %USERPROFILE%\.lmstudio\extensions\plugins\lmstudio\qwen-coder-tools\
    • Linux/macOS: ~/.lmstudio/extensions/plugins/lmstudio/qwen-coder-tools/

"LM Studio not running" Error

Solutions:

  1. Start LM Studio application
  2. Wait for LM Studio to fully load
  3. Run the startup script again

Permission Issues

Solutions:

  1. Windows: Run Command Prompt as Administrator
  2. Linux/macOS: Check directory permissions: chmod 755 ~/.lmstudio
  3. Ensure you have write access to the home directory

🎯 Usage Examples

Individual Tool Mode (Default)

User: "Create a Python function to calculate fibonacci numbers"
Plugin: Uses create_file tool to generate fib.py with implementation

Autonomous Agent Mode

User: "Build a REST API for task management with authentication"
Agent: 
1. πŸ” Researches current REST API best practices
2. πŸ—οΈ Creates project structure with proper organization
3. πŸ“¦ Installs required dependencies (Express, JWT, bcrypt, etc.)
4. πŸ’» Implements authentication middleware
5. πŸ›£οΈ Creates CRUD endpoints for tasks
6. πŸ“ Adds comprehensive documentation
7. πŸ§ͺ Creates test cases and validation
8. πŸ“š Commits changes with meaningful messages

Research-Driven Development

User: "Implement OAuth 2.0 authentication using current best practices"
Agent:
1. 🌐 Web searches for latest OAuth 2.0 standards and security practices
2. πŸ“– Researches secure implementation patterns
3. πŸ”§ Creates authentication module with proper security measures
4. πŸ›‘οΈ Implements security middleware and validation
5. πŸ“‹ Adds comprehensive documentation and examples
6. βœ… Tests implementation and provides usage guide

πŸ” Web Search Integration

Brave Search API

  • Free Tier: 5,000 queries/month (no API key required)
  • With API Key: Higher rate limits and enhanced features
  • Setup: Add your Brave API key in plugin configuration

Fallback Services

  • DuckDuckGo: Instant answers and web results
  • Wikipedia: Encyclopedia content for research
  • Automatic Failover: Seamless switching if primary service fails

πŸ“ Project Templates

Supports scaffolding for:

  • Python: Flask, FastAPI, Django projects
  • JavaScript: Node.js, Express, React applications
  • TypeScript: Modern TS projects with proper configuration
  • Web: HTML/CSS/JS static sites
  • API: REST API templates with documentation

πŸ€– Agent vs Edit Modes

Edit Mode (Traditional)

  • βœ… Individual tool usage with explicit calls
  • βœ… Step-by-step confirmation for each action
  • βœ… Precise, controlled development tasks
  • βœ… Suitable for specific, targeted operations

Agent Mode (Autonomous)

  • πŸš€ Multi-step task execution without confirmation
  • 🧠 Intelligent planning and decision making
  • πŸ” Research-driven approach with web search
  • πŸ”„ Complete workflow automation
  • 🎯 Ideal for complex, end-to-end development projects

πŸ’‘ Known Issues

Installation Problem βœ… FIXED

LM Studio currently lacks a documented method for local plugin installation without Hub authentication.

βœ… RESOLVED: Our enhanced startup scripts now provide automatic setup:

  • Auto-detects LM Studio installation
  • Creates plugin directory structure automatically
  • Copies plugin files to the correct location
  • Validates setup before starting
  • Provides clear error messages and troubleshooting guidance

Current Solution: Use the provided auto-setup startup scripts for seamless plugin installation and experience.

πŸ”§ Development

Project Structure

qwen-coder-tools/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ index.ts              # Plugin entry point
β”‚   β”œβ”€β”€ toolsProvider.ts      # Main tools implementation
β”‚   β”œβ”€β”€ agentProvider.ts      # Autonomous agent functionality
β”‚   └── config.ts             # Configuration schemas
β”œβ”€β”€ startup scripts/
β”‚   β”œβ”€β”€ start-plugin.bat      # Windows batch script
β”‚   β”œβ”€β”€ start-plugin.ps1      # PowerShell script
β”‚   └── start-plugin.sh       # Linux/macOS shell script
β”œβ”€β”€ manifest.json             # Plugin metadata
β”œβ”€β”€ package.json              # Dependencies and scripts
└── README.md                 # This file

Building

npm install          # Install dependencies
npx tsc             # Compile TypeScript
lms dev             # Test in development

πŸ§ͺ Testing

Manual Testing

# Start development server
lms dev

# Test individual tools in LM Studio
# Test autonomous agent mode (enable in settings)
# Verify web search functionality

Validation

  • βœ… All 9 tools functional
  • βœ… Qwen XML parsing compatibility
  • βœ… Agent mode autonomous behavior
  • βœ… Web search with fallbacks
  • βœ… Error handling and recovery

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ”’ Security

  • Sandboxed Execution: Code runs in controlled environment
  • Path Validation: File operations restricted to workspace
  • Timeout Protection: Long operations automatically terminated
  • API Key Security: Credentials stored securely in LM Studio
  • Input Validation: All parameters validated with Zod schemas

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • LM Studio Team: For the excellent plugin SDK and development platform
  • Qwen Team: For the powerful language models with tool calling capabilities
  • Community: For feedback and testing during development

πŸ“ž Support


Created by: Riaan De Winnaar
Version: 2.0
Last Updated: August 3, 2025
Compatible with: LM Studio 1.4.0+, Qwen 2.5+ models

About

A comprehensive development toolkit plugin for LM Studio, specifically optimized for Qwen models with XML-style tool calling support and autonomous agent capabilities.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors