Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

XandAI-project/Xandai-CLI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

109 Commits

Repository files navigation

XandAI CLI

Tests PyPI version License: MIT

Terminal assistant that combines AI chat with command execution. Supports Ollama and LM Studio.

Installation

pip install xandai-cli
xandai --auto-detect

Usage

# Terminal commands
xandai> ls -la
xandai> git status
# AI questions 
xandai> How do I optimize this code?
# Project planning
xandai> /task create a REST API

Providers

  • Ollama - Local models
  • LM Studio - GUI-based model management
xandai --provider ollama
xandai --provider lm_studio --endpoint http://localhost:1234

Commands

/task <description> # Project planning
/review # AI-powered code review
/web on # Enable web content integration
/help # Show all commands
/clear # Clear history
/status # System status

File Operations

XandAI can intelligently create and edit files with AI assistance:

Creating Files

Simply ask to create a file with a specific name:

xandai> create tokens.py with authentication functions
# AI generates complete code
# System detects filename automatically
πŸ’Ύ This looks like a complete python file. Save it? (y/N): y
πŸ“ Filename: tokens.py
βœ… File 'tokens.py' created successfully!

Editing Files

Edit existing files by name:

xandai> edit index.py adding a health endpoint
# AI reads current file content
# Generates complete updated version
✏️ Edit file 'index.py'? (y/N): y
βœ… File 'index.py' updated successfully!

Smart Detection

The AI automatically:

  • βœ… Reads files when editing (preserves existing code)
  • βœ… Extracts filenames from your request
  • βœ… Provides complete file content (never placeholders)
  • βœ… Only prompts when you explicitly request file operations

Supported Formats

Works with any programming language:

xandai> create app.js with Express server
xandai> edit styles.css adding dark mode
xandai> create config.json with API settings

Code Review

AI-powered code review with Git integration. Analyzes your code changes and provides detailed feedback on security, quality, and best practices.

xandai> /review
# Automatically detects Git changes and provides comprehensive analysis

Code Review Example

Web Integration

Automatically fetches and analyzes web content when you paste links:

xandai> /web on
xandai> How does this work? https://docs.python.org/tutorial
# Content is automatically fetched and analyzed

Development

git clone https://github.com/XandAI-project/Xandai-CLI.git
cd Xandai-CLI
pip install -e .
xandai

License

MIT

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /