XandAI - Multi-Provider AI Terminal Assistant with Interactive Code Execution
Project description
XandAI CLI
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 Execution
XandAI can detect and execute code in various languages:
xandai> create a math.py that will receive two args and sum them
# AI generates complete Python script with argument handling
This looks like a complete python file. Save it? (y/N): y
Filename: math.py
File 'math.py' created successfully!
xandai> python math.py 2 2
$ python math.py 2 2
2.0 + 2.0 = 4.0
Command completed successfully
Features:
- Automatic code detection for Python, JavaScript, Bash, and more
- Interactive execution mode for scripts requiring input
- Non-interactive capture mode for automation
- Smart prompts for user choice between modes
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
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file xandai_cli-2.1.9.tar.gz.
File metadata
- Download URL: xandai_cli-2.1.9.tar.gz
- Upload date:
- Size: 333.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8e426501f12cc403e186e4b9994ca86464c2828f7b283d1e4977f6c7299927a4
|
|
| MD5 |
b2d85071367ded18ce0de8a14e4680b4
|
|
| BLAKE2b-256 |
d7716c020135b9af8fe59adff2dcc9c35e7d73de1486089c46f2c95efbc8a800
|
Provenance
The following attestation bundles were made for xandai_cli-2.1.9.tar.gz:
Publisher:
workflow.yml on XandAI-project/Xandai-CLI
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
xandai_cli-2.1.9.tar.gz -
Subject digest:
8e426501f12cc403e186e4b9994ca86464c2828f7b283d1e4977f6c7299927a4 - Sigstore transparency entry: 637838897
- Sigstore integration time:
-
Permalink:
XandAI-project/Xandai-CLI@5ec64d51b5a906f3387739f06957c3249beee756 -
Branch / Tag:
refs/tags/v2.1.9 - Owner: https://github.com/XandAI-project
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yml@5ec64d51b5a906f3387739f06957c3249beee756 -
Trigger Event:
push
-
Statement type:
File details
Details for the file xandai_cli-2.1.9-py3-none-any.whl.
File metadata
- Download URL: xandai_cli-2.1.9-py3-none-any.whl
- Upload date:
- Size: 204.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5d75bbb844b5572e5ae02d88918a7938fce58afd5e16dc37b13aa741c858a194
|
|
| MD5 |
7be6163ad5b80cee441619595c394cae
|
|
| BLAKE2b-256 |
afbfa9c353c0622e144efab43179d313a02946324113e680e76a3c84af39374d
|
Provenance
The following attestation bundles were made for xandai_cli-2.1.9-py3-none-any.whl:
Publisher:
workflow.yml on XandAI-project/Xandai-CLI
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
xandai_cli-2.1.9-py3-none-any.whl -
Subject digest:
5d75bbb844b5572e5ae02d88918a7938fce58afd5e16dc37b13aa741c858a194 - Sigstore transparency entry: 637838929
- Sigstore integration time:
-
Permalink:
XandAI-project/Xandai-CLI@5ec64d51b5a906f3387739f06957c3249beee756 -
Branch / Tag:
refs/tags/v2.1.9 - Owner: https://github.com/XandAI-project
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yml@5ec64d51b5a906f3387739f06957c3249beee756 -
Trigger Event:
push
-
Statement type: