# XandAI CLI - Intelligent Terminal Assistant
[](https://github.com/XandAI-project/Xandai-CLI/actions/workflows/test.yml)
[](https://github.com/XandAI-project/Xandai-CLI/actions/workflows/workflow.yml)
[](https://pypi.org/project/xandai-cli/)
[](https://opensource.org/licenses/MIT)
[](https://www.python.org/downloads/)
**XandAI CLI** is a powerful terminal assistant that seamlessly blends AI conversation with local command execution. Built with Ollama integration, it provides intelligent code assistance, project planning, and command-line automation - all within a beautiful, interactive terminal interface.
## 📸 See It In Action

*XandAI seamlessly switches between AI chat and terminal commands - ask questions, get code help, and execute commands all in one interface*
## ⚡ Quick Start
```bash
# Install XandAI
pip install xandai-cli
# Start the CLI
xandai
# That's it! Start chatting or running commands
xandai> python --version
xandai> How do I optimize this Flask route?
xandai> /task create a REST API with authentication
```
## 🎯 What Makes XandAI Special
### 🧠 **Smart Command Recognition**
XandAI automatically detects whether you're asking an AI question or running a terminal command:
```bash
xandai> ls -la # Executes terminal command
xandai> git status # Executes git command
xandai> How do I use git rebase? # Asks AI for help
xandai> python app.py # Runs your Python script
```
### 💬 **Intelligent Conversations**
- **Context-Aware**: Remembers your conversation and project context
- **Code Analysis**: Understands your codebase and provides relevant suggestions
- **Real-time Help**: Get explanations while you work
### 🛠️ **Project Planning**
Use `/task` mode for structured project planning:
```bash
xandai> /task create a Flask API with JWT authentication
# XandAI responds with:
# 1. Create project structure
# 2. Set up Flask app with blueprints
# 3. Implement JWT authentication
# 4. Create user registration/login endpoints
# [Complete implementation details follow]
```
### 🎨 **Beautiful Interface**
- **Syntax Highlighting**: Code blocks with proper language detection
- **Smart Autocomplete**: Context-aware command and file suggestions
- **Rich Formatting**: Clean, readable output with colors and structure
- **Command History**: Navigate through previous commands and conversations
## 🔧 Installation & Setup
```bash
# Install from PyPI
pip install xandai-cli
# Make sure Ollama is running (install from https://ollama.ai)
ollama serve
# Start XandAI with custom options
xandai --model llama3.2 --endpoint http://localhost:11434
```
## 💡 Real-World Examples
### Daily Development Workflow
```bash
# Navigate and explore your project
xandai> cd my-project && ls -la
xandai> git status
xandai> cat app.py
# Get AI help while coding
xandai> This Flask route is slow, how can I optimize it?
[AI analyzes your code and suggests specific improvements]
# Continue working with AI suggestions
xandai> git add . && git commit -m "Optimize Flask routes"
```
### Project Planning & Learning
```bash
# Plan complex projects
xandai> /task create a microservices architecture with Docker
[Detailed project structure with implementation steps]
# Learn new concepts
xandai> Explain async/await vs Promises in JavaScript with examples
[Comprehensive explanation with code samples]
# Get implementation help
xandai> Show me how to implement JWT authentication in Express.js
[Complete implementation with best practices]
```
## 🧠 How XandAI Works
XandAI intelligently combines AI conversation with terminal command execution:
- **Smart Detection**: Automatically recognizes if your input is a command or question
- **Context Memory**: Remembers your conversation, current directory, and project state
- **Ollama Integration**: Uses local Ollama models for privacy and performance
- **Rich Interface**: Beautiful terminal UI with syntax highlighting and autocompletion
## 🔧 Advanced Features
### Command Integration
Any terminal command works seamlessly:
```bash
xandai> python --version && pip list | grep flask
xandai> find . -name "*.py" | grep -v __pycache__
xandai> docker ps && docker images
```
### Intelligent Autocompletion
XandAI provides smart suggestions based on context:
- **File commands** (`cat`, `vim`) → Shows only files
- **Directory commands** (`cd`, `mkdir`) → Shows only directories
- **Mixed commands** (`ls`, `cp`) → Shows both files and directories
- **Slash commands** → `/task`, `/help`, `/clear`, `/status`
### Project Awareness
- Tracks file changes to avoid duplicates
- Maintains coding patterns and framework conventions
- Provides context-aware suggestions based on your project type
- Remembers previous conversations for better assistance
## 🎨 Task Planning Example
When you use `/task` mode, XandAI creates detailed project structures:
```bash
xandai> /task create a Flask API with JWT authentication
# XandAI responds with complete project structure:
Flask API Project:
├── app.py # Main Flask application
├── models/user.py # User model with authentication
├── routes/auth.py # Login/register endpoints
├── config.py # App configuration
└── requirements.txt # Dependencies
# Plus complete implementation for each file with:
# - All necessary functions and classes
# - Proper error handling
# - Security best practices
# - Ready-to-run code
```
## 🛠️ Available Commands
**Slash Commands:**
- `/task <description>` - Generate structured project plans
- `/help` - Show available commands
- `/clear` - Clear conversation history
- `/status` - Show system status
- `/history` - View conversation history
**Any Terminal Command:**
```bash
# Development commands
xandai> python app.py
xandai> npm start
xandai> docker-compose up
# File operations
xandai> ls -la && cat package.json
xandai> git status && git log --oneline
# System commands
xandai> ps aux | grep python
xandai> df -h && free -m
```
## 🤝 Contributing
We welcome contributions! XandAI is built with Python 3.8+ and uses modern development practices.
```bash
# Get started
git clone https://github.com/XandAI-project/Xandai-CLI.git
cd Xandai-CLI
pip install -e .
# Run XandAI locally
xandai
```
**📦 PyPI Package:** [xandai-cli on PyPI](https://pypi.org/project/xandai-cli/)
**Found a bug?** [Create an issue](https://github.com/XandAI-project/Xandai-CLI/issues)
**Have a feature idea?** [Start a discussion](https://github.com/XandAI-project/Xandai-CLI/discussions)
---
**Made with ❤️ by the XandAI team** • Built for developers who love powerful, intelligent tools
Raw data
{
"_id": null,
"home_page": "https://github.com/XandAI-project/Xandai-CLI",
"name": "xandai-cli",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "cli, assistant, ollama, ai, chatbot, terminal, automation",
"author": "XandAI-project",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/f6/a0/766254e89c4b79c5b9ebf9b84ab591a88bceec2b82f843fdf313227df31c/xandai_cli-2.1.2.tar.gz",
"platform": null,
"description": "# XandAI CLI - Intelligent Terminal Assistant\n\n[](https://github.com/XandAI-project/Xandai-CLI/actions/workflows/test.yml)\n[](https://github.com/XandAI-project/Xandai-CLI/actions/workflows/workflow.yml)\n[](https://pypi.org/project/xandai-cli/)\n[](https://opensource.org/licenses/MIT)\n[](https://www.python.org/downloads/)\n\n**XandAI CLI** is a powerful terminal assistant that seamlessly blends AI conversation with local command execution. Built with Ollama integration, it provides intelligent code assistance, project planning, and command-line automation - all within a beautiful, interactive terminal interface.\n\n## \ud83d\udcf8 See It In Action\n\n\n\n*XandAI seamlessly switches between AI chat and terminal commands - ask questions, get code help, and execute commands all in one interface*\n\n## \u26a1 Quick Start\n\n```bash\n# Install XandAI\npip install xandai-cli\n\n# Start the CLI\nxandai\n\n# That's it! Start chatting or running commands\nxandai> python --version\nxandai> How do I optimize this Flask route?\nxandai> /task create a REST API with authentication\n```\n\n## \ud83c\udfaf What Makes XandAI Special\n\n### \ud83e\udde0 **Smart Command Recognition**\nXandAI automatically detects whether you're asking an AI question or running a terminal command:\n```bash\nxandai> ls -la # Executes terminal command\nxandai> git status # Executes git command \nxandai> How do I use git rebase? # Asks AI for help\nxandai> python app.py # Runs your Python script\n```\n\n### \ud83d\udcac **Intelligent Conversations**\n- **Context-Aware**: Remembers your conversation and project context\n- **Code Analysis**: Understands your codebase and provides relevant suggestions\n- **Real-time Help**: Get explanations while you work\n\n### \ud83d\udee0\ufe0f **Project Planning**\nUse `/task` mode for structured project planning:\n```bash\nxandai> /task create a Flask API with JWT authentication\n\n# XandAI responds with:\n# 1. Create project structure\n# 2. Set up Flask app with blueprints \n# 3. Implement JWT authentication\n# 4. Create user registration/login endpoints\n# [Complete implementation details follow]\n```\n\n### \ud83c\udfa8 **Beautiful Interface**\n- **Syntax Highlighting**: Code blocks with proper language detection\n- **Smart Autocomplete**: Context-aware command and file suggestions \n- **Rich Formatting**: Clean, readable output with colors and structure\n- **Command History**: Navigate through previous commands and conversations\n\n## \ud83d\udd27 Installation & Setup\n\n```bash\n# Install from PyPI\npip install xandai-cli\n\n# Make sure Ollama is running (install from https://ollama.ai)\nollama serve\n\n# Start XandAI with custom options\nxandai --model llama3.2 --endpoint http://localhost:11434\n```\n\n## \ud83d\udca1 Real-World Examples\n\n### Daily Development Workflow\n```bash\n# Navigate and explore your project\nxandai> cd my-project && ls -la\nxandai> git status\nxandai> cat app.py\n\n# Get AI help while coding\nxandai> This Flask route is slow, how can I optimize it?\n[AI analyzes your code and suggests specific improvements]\n\n# Continue working with AI suggestions\nxandai> git add . && git commit -m \"Optimize Flask routes\"\n```\n\n### Project Planning & Learning\n```bash\n# Plan complex projects\nxandai> /task create a microservices architecture with Docker\n[Detailed project structure with implementation steps]\n\n# Learn new concepts\nxandai> Explain async/await vs Promises in JavaScript with examples\n[Comprehensive explanation with code samples]\n\n# Get implementation help\nxandai> Show me how to implement JWT authentication in Express.js\n[Complete implementation with best practices]\n```\n\n## \ud83e\udde0 How XandAI Works\n\nXandAI intelligently combines AI conversation with terminal command execution:\n\n- **Smart Detection**: Automatically recognizes if your input is a command or question\n- **Context Memory**: Remembers your conversation, current directory, and project state \n- **Ollama Integration**: Uses local Ollama models for privacy and performance\n- **Rich Interface**: Beautiful terminal UI with syntax highlighting and autocompletion\n\n## \ud83d\udd27 Advanced Features\n\n### Command Integration\nAny terminal command works seamlessly:\n```bash\nxandai> python --version && pip list | grep flask\nxandai> find . -name \"*.py\" | grep -v __pycache__\nxandai> docker ps && docker images\n```\n\n### Intelligent Autocompletion\nXandAI provides smart suggestions based on context:\n- **File commands** (`cat`, `vim`) \u2192 Shows only files\n- **Directory commands** (`cd`, `mkdir`) \u2192 Shows only directories \n- **Mixed commands** (`ls`, `cp`) \u2192 Shows both files and directories\n- **Slash commands** \u2192 `/task`, `/help`, `/clear`, `/status`\n\n### Project Awareness\n- Tracks file changes to avoid duplicates\n- Maintains coding patterns and framework conventions\n- Provides context-aware suggestions based on your project type\n- Remembers previous conversations for better assistance\n\n## \ud83c\udfa8 Task Planning Example\n\nWhen you use `/task` mode, XandAI creates detailed project structures:\n\n```bash\nxandai> /task create a Flask API with JWT authentication\n\n# XandAI responds with complete project structure:\nFlask API Project:\n\u251c\u2500\u2500 app.py # Main Flask application\n\u251c\u2500\u2500 models/user.py # User model with authentication\n\u251c\u2500\u2500 routes/auth.py # Login/register endpoints \n\u251c\u2500\u2500 config.py # App configuration\n\u2514\u2500\u2500 requirements.txt # Dependencies\n\n# Plus complete implementation for each file with:\n# - All necessary functions and classes\n# - Proper error handling \n# - Security best practices\n# - Ready-to-run code\n```\n\n## \ud83d\udee0\ufe0f Available Commands\n\n**Slash Commands:**\n- `/task <description>` - Generate structured project plans\n- `/help` - Show available commands\n- `/clear` - Clear conversation history\n- `/status` - Show system status\n- `/history` - View conversation history\n\n**Any Terminal Command:**\n```bash\n# Development commands\nxandai> python app.py\nxandai> npm start \nxandai> docker-compose up\n\n# File operations\nxandai> ls -la && cat package.json\nxandai> git status && git log --oneline\n\n# System commands \nxandai> ps aux | grep python\nxandai> df -h && free -m\n```\n\n## \ud83e\udd1d Contributing\n\nWe welcome contributions! XandAI is built with Python 3.8+ and uses modern development practices.\n\n```bash\n# Get started\ngit clone https://github.com/XandAI-project/Xandai-CLI.git\ncd Xandai-CLI\npip install -e .\n\n# Run XandAI locally\nxandai\n```\n\n**\ud83d\udce6 PyPI Package:** [xandai-cli on PyPI](https://pypi.org/project/xandai-cli/) \n**Found a bug?** [Create an issue](https://github.com/XandAI-project/Xandai-CLI/issues) \n**Have a feature idea?** [Start a discussion](https://github.com/XandAI-project/Xandai-CLI/discussions)\n\n---\n\n**Made with \u2764\ufe0f by the XandAI team** \u2022 Built for developers who love powerful, intelligent tools\n",
"bugtrack_url": null,
"license": null,
"summary": "CLI Assistant with Ollama Integration and Context-Aware Interactions",
"version": "2.1.2",
"project_urls": {
"Bug Tracker": "https://github.com/XandAI-project/XandAI-CLI/issues",
"Changelog": "https://github.com/XandAI-project/XandAI-CLI/releases",
"Documentation": "https://github.com/XandAI-project/XandAI-CLI#readme",
"Homepage": "https://github.com/XandAI-project/Xandai-CLI",
"Source Code": "https://github.com/XandAI-project/XandAI-CLI"
},
"split_keywords": [
"cli",
" assistant",
" ollama",
" ai",
" chatbot",
" terminal",
" automation"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "623636a75735a346c409c69ff5d6865f8f88ca50ebf864506cba5c310c2d74f1",
"md5": "2b5caf72a428c01565a9d0e2b55847df",
"sha256": "4d3d1e2722cbb31e5e48185398ea0bf16cad488bc2075820a76ba94ddb43364a"
},
"downloads": -1,
"filename": "xandai_cli-2.1.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "2b5caf72a428c01565a9d0e2b55847df",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 91320,
"upload_time": "2025-09-05T22:36:37",
"upload_time_iso_8601": "2025-09-05T22:36:37.338594Z",
"url": "https://files.pythonhosted.org/packages/62/36/36a75735a346c409c69ff5d6865f8f88ca50ebf864506cba5c310c2d74f1/xandai_cli-2.1.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "f6a0766254e89c4b79c5b9ebf9b84ab591a88bceec2b82f843fdf313227df31c",
"md5": "15a2a548bc1d181846f47b4782b2eaeb",
"sha256": "87f5a9107430e4fad3e6686da82b986642040eeeeefdd3d063da355ddfd715a9"
},
"downloads": -1,
"filename": "xandai_cli-2.1.2.tar.gz",
"has_sig": false,
"md5_digest": "15a2a548bc1d181846f47b4782b2eaeb",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 199485,
"upload_time": "2025-09-05T22:36:39",
"upload_time_iso_8601": "2025-09-05T22:36:39.253616Z",
"url": "https://files.pythonhosted.org/packages/f6/a0/766254e89c4b79c5b9ebf9b84ab591a88bceec2b82f843fdf313227df31c/xandai_cli-2.1.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-09-05 22:36:39",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "XandAI-project",
"github_project": "Xandai-CLI",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "requests",
"specs": [
[
">=",
"2.31.0"
]
]
},
{
"name": "prompt-toolkit",
"specs": [
[
">=",
"3.0.47"
]
]
},
{
"name": "rich",
"specs": [
[
">=",
"13.0.0"
]
]
},
{
"name": "colorama",
"specs": [
[
">=",
"0.4.6"
]
]
},
{
"name": "pydantic",
"specs": [
[
">=",
"2.0.0"
]
]
}
],
"lcname": "xandai-cli"
}