Through a deep shell-integration architecture, AIS achieves multi-dimensional context awareness and intelligent error analysis. It automatically collects execution-environment information and pinpoints issues precisely; inside the terminal it provides context-based solutions and structured learning guidance. This eliminates the usual search hopping and blind trial-and-error in traditional error handling, significantly improving both problem-solving efficiency and the speed of skill accumulation.
ais ask delivers precise answers based on the current system environment# Smart install – automatically detects the environment and chooses the best method
curl -sSL https://raw.githubusercontent.com/kangvcar/ais/main/scripts/install.sh | bash
# Mainland China users can use the Gitee mirror (faster and more stable)
curl -sSL https://gitee.com/kangvcar/ais/raw/main/scripts/install.sh | bash
The install script will automatically:
# Smart uninstall – automatically detects how AIS was installed and cleans it completely
curl -sSL https://raw.githubusercontent.com/kangvcar/ais/main/scripts/uninstall.sh | bash
# Mainland China users can use the Gitee mirror
curl -sSL https://gitee.com/kangvcar/ais/raw/main/scripts/uninstall.sh | bash
The uninstall script will automatically:
# Run the latest version directly
docker run -it --rm kangvcar/ais:latest
# Or use it interactively
docker run -it --rm -v $(pwd):/workspace kangvcar/ais:latest bash
# Use Docker Compose (recommended for persistent configuration)
curl -O https://raw.githubusercontent.com/kangvcar/ais/main/docker-compose.yml
docker-compose up -d ais
docker-compose exec ais bash
Advantages: Zero-config startup, environment isolation, cross-platform consistency, ARM64 supported
# Per-user install (safest)
curl -sSL https://raw.githubusercontent.com/kangvcar/ais/main/scripts/install.sh | bash -s -- --user
# Mainland China users can use the Gitee mirror
curl -sSL https://gitee.com/kangvcar/ais/raw/main/scripts/install.sh | bash -s -- --user
# Or install manually
pipx install ais-terminal
ais setup
# HTML report visualization is now included by default
Advantages: Maximum safety, isolated virtual environment, no sudo required
# System-wide installation (available to all users)
curl -sSL https://raw.githubusercontent.com/kangvcar/ais/main/scripts/install.sh | bash -s -- --system
# Mainland China users can use the Gitee mirror
curl -sSL https://gitee.com/kangvcar/ais/raw/main/scripts/install.sh | bash -s -- --system
Advantages: Available to all users, maintains safety isolation, centralized management and updates
# Dockerized installation
curl -sSL https://raw.githubusercontent.com/kangvcar/ais/main/scripts/docker-install.sh | bash
# Or run directly
docker run -it --rm ais:latest
Advantages: Environment consistency, rapid deployment, easy scaling, full isolation
# Install from source
git clone https://github.com/kangvcar/ais.git
cd ais
pipx install -e .
# Or use a virtual environment
python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev,html]" # Includes dev and HTML visualization dependencies
Advantages: Live edits, complete dev toolchain, easy debugging
# Check version
ais --version
# Test basic functionality
ais ask "Hello, AIS!"
# Test automatic error analysis (enter a command with an intentional typo)
mkdirr /tmp/test
# View current configuration
ais config
# Set context-collection level
ais config --set context_level=detailed
# Environment-aware Q&A based on the current system
ais ask "What is my system configuration like? How is the hardware performance?"
ais ask "Is my network connection normal? Any security suggestions?"
ais ask "Given my current project type, how can I optimize performance?"
# Traditional technical Q&A (still supported)
ais ask "How do I check system memory usage?"
ais ask "How do Docker containers mount directories?"
ais ask "How do I resolve Git merge conflicts?"
# Configure context-collection level
ais config --set context_level=minimal # Basic information
ais config --set context_level=standard # Standard information
ais config --set context_level=detailed # Full information
ais learn git # Learn Git version control
ais learn docker # Learn containerization
ais learn vim # Learn the text editor
ais learn ssh # Learn remote access
# These erroneous commands will automatically trigger AI analysis
pytho --version # Spelling error
ls /not/exist # Path does not exist
git statuss # Command error
ais report # Generate a text-format learning report
ais report --html # Generate an HTML visualization report
ais report --html -o my_report.html --open # Generate and open the HTML report
# History management
ais history # View recent command history
ais history --limit 20 # Show 20 command records
ais history 3 # View detailed analysis of record #3
ais askIntelligent Q&A based on the current system environment, automatically sensing hardware configuration, network status, project type, and more:
# 🖥️ System environment-aware Q&A
ais ask "How is my system performance? Do I need to optimize?"
ais ask "Are my currently open ports secure?"
ais ask "What is the status of my network connection?"
# 🚀 Project environment-aware Q&A
ais ask "What type of project is this? How do I install dependencies?"
ais ask "Given the current Git status, how should I commit?"
ais ask "How do I optimize this Python project in my current environment?"
# 📚 Traditional technical Q&A (still supported)
ais ask "What does Linux file permission 755 mean?"
ais ask "How can I optimize Python script performance?"
ais ask "What are the steps to configure Nginx as a reverse proxy?"
# ⚙️ Context-level configuration
ais config --set context_level=minimal # Basics: system info, Git, project type
ais config --set context_level=standard # Standard: + file list, command history
ais config --set context_level=detailed # Detailed: + network, permissions, services
# 📋 View detailed help
ais ask --help-detail
New highlights:
ais reportGenerate a detailed, personalized learning-growth analysis report in text or visual HTML:
# 📊 Text report (default)
ais report
# 📈 HTML visualization report (recommended)
ais report --html
ais report --html -o custom_report.html
ais report --html --open # Automatically open in the browser after generation
# 📋 View detailed help
ais report --help
6 professional chart types:
Modern UX:
Flexible options:
# Custom output filename
ais report --html -o "2024-Learning-Report.html"
# Open in a browser after generation
ais report --html --open
# Combine options
ais report --html -o weekly_progress.html --open
Data security:
ais learnSystematic learning for command-line tools and concepts:
ais learn # List all available topics
ais learn git # Complete Git tutorial
ais learn docker # In-depth containerization
ais learn linux # Linux system-administration basics
Supports multiple AI providers with easy switching:
# List available providers
ais provider-list
# Add a local Ollama provider
ais provider-add ollama \
--url http://localhost:11434/v1/chat/completions \
--model llama3
# Switch provider
ais provider-use ollama
AIS supports automatic error analysis; shell integration is required:
# Automatic configuration
ais setup
# Test whether the integration works
ais test-integration
Independently control context collection for error analysis and for ask Q&A:
# Context level for error analysis (automatic analysis feature)
ais config --set context_level=minimal # Basic information
ais config --set context_level=standard # Standard information (default)
ais config --set context_level=detailed # Detailed information
# Context level for ask Q&A (new)
ais config --set ask.context_level=minimal # System basics
ais config --set ask.context_level=standard # + project and Git information
ais config --set ask.context_level=detailed # + network, permissions, services
# Control automatic analysis
ais config --set auto_analysis=true # Enable automatic analysis
ais config --set auto_analysis=false # Disable automatic analysis
# View current configuration
ais config
Context-collection details:
| Level | Included in error analysis | Included in ask Q&A |
|---|---|---|
| minimal | Command, exit code, directory, user | System info, CPU/memory, network reachability, listening ports, running services |
| standard | + File list, Git status, command history | + Project type, Git details, file list |
| detailed | + System info, environment variables, full directory | + Permission info, detailed network status, full environment |
AIS takes privacy and data security seriously:
AIS now supports professional HTML visualization reports, turning dry data into clear, attractive charts:
$ ais report --html --open
# Automatically generates an HTML report containing:
📈 Error trend analysis – a clear 30-day learning-progress trajectory
🎯 Skill assessment radar – multi-dimensional skill levels at a glance
⏰ Time-distribution heatmap – discover your best learning hours
📊 Command frequency statistics – identify where to focus
🔍 Error-type analysis – tackle common problems precisely
📈 Learning-progress trend – quantify skill growth
# Quick generate and view
ais report --html --open
# Custom filename
ais report --html -o "My-Skills-Growth-Report.html"
# Use cases
ais report --html -o weekly_report.html # Weekly report
ais report --html -o monthly_review.html # Monthly review
ais report --html -o skill_assessment.html # Skill assessment
AIS can now sense your system environment and provide precise, real-world advice:
$ ais ask "How is my system configured?"
# AI will analyze and answer:
✓ OS: Ubuntu 24.04.2 LTS
✓ CPU: 4-core Intel Xeon Platinum
✓ Memory: 7.1 G total, 3.5 G used, 3.6 G available
✓ Disk: 40 G total, 4.1 G used (11%)
✓ Network: Reachable (ping 8.8.8.8)
$ ais ask "Which ports are open on my system? Are they secure?"
# AI will assess port security and provide suggestions:
✓ SSH (22): Secure; recommend key-based authentication
✓ DNS (53): Beware DNS amplification risk
✓ Other ports: Concrete hardening suggestions provided
$ ais ask "Given my environment, how do I optimize this Python project?"
# AI will combine system configuration with project type to propose optimizations:
✓ Use 4 CPU cores for parallelism (multiprocessing)
✓ Tune data-processing strategy based on memory
✓ Adjust remote API calls according to network status
ais/
├── src/ais/ # Main source code
│ ├── cli/ # CLI modules
│ │ ├── main.py # CLI entry point
│ │ └── interactive.py # Interactive menu
│ ├── core/ # Core modules
│ │ ├── ai.py # AI interaction
│ │ ├── config.py # Configuration management
│ │ ├── context.py # Context collection
│ │ └── database.py # Database operations
│ ├── ui/ # User interface
│ │ └── panels.py # Display panels
│ └── utils/ # Utilities
├── scripts/ # Install and deployment scripts
├── tests/ # Tests
├── docs/ # Documentation
└── pyproject.toml # Project configuration
src/ais/cli/): Command-line interface and interactive UIsrc/ais/core/): AI integration, configuration, context collection, database operationssrc/ais/ui/): Rich-based display panels and formatting# Clone the repository
git clone https://github.com/kangvcar/ais.git
cd ais
# Create a virtual environment
python3 -m venv .venv
source .venv/bin/activate
# Install dev build and dependencies
pip install -e ".[dev]"
# Set up pre-commit
pre-commit install
# Run all tests
python -m pytest tests/ -v
# Coverage
python -m pytest --cov=ais tests/
# Code quality checks
source .venv/bin/activate && black src/ tests/
source .venv/bin/activate && flake8 src/ tests/ --max-line-length=100
We welcome all forms of contribution!
git checkout -b feature/AmazingFeature)git commit -m 'Add some AmazingFeature')git push origin feature/AmazingFeature)Ensure your code meets project standards:
# Auto-format code
source .venv/bin/activate && autopep8 --in-place --aggressive --aggressive --max-line-length=100 src/ tests/ -r
# Run all quality checks
python -m pytest tests/ -v
source .venv/bin/activate && black src/ tests/
source .venv/bin/activate && flake8 src/ tests/ --max-line-length=100
# Test system integration
ais test-integration
# Show version
ais --version
# Show all help
ais help-all
When reporting an issue, please provide:
python3 --version)ais --version)This project is licensed under the MIT License – see the LICENSE file for details.
Thanks to all the developers who contributed to this project!
🎉 Let AI be your terminal companion and make command-line learning simple and fun!
If you find AIS helpful, please give us a ⭐️!
Content type
Image
Digest
sha256:61b1bcc38…
Size
422.1 MB
Last updated
about 1 year ago
docker pull kangvcar/ais