Skip to main content

AI-powered directory scanner and project analyzer

Project description

AILS - AI-Powered Directory Scanner & Project Analyzer

PyPI version Python Support License: MIT

🌐 Language

English | 中文


A powerful command-line tool that intelligently scans directories, analyzes project structures, and leverages AI to provide deep insights about your codebase. Perfect for developers who want to understand complex projects quickly or document their code automatically.

Features

  • AI-Powered Analysis - Leverages advanced language models to understand and describe your project structure
  • Smart Directory Scanning - Efficiently scans and categorizes files with intelligent .gitignore support
  • Vector Search & Embeddings - Advanced semantic search capabilities with SQLite vector database integration
  • Comment Extraction & Injection - Extract and manage code comments across multiple programming languages
  • Git Operations - AI automated commit message generation, git workflow integration, and smart diff copying:
    • Copy staged/unstaged changes diff to clipboard
    • Copy diff from any commit (with interactive history selection)
    • Copy all changes (staged + unstaged) with one click
  • Advanced Prompt Enhancement - Multi-mode prompt optimization with context-aware file selection:
    • Detailed Mode: Generate comprehensive prompts with implementation suggestions
    • Concise Mode: Create minimal prompts letting AI decide implementation details
    • Question Mode: Answer user questions based on project context
    • Concise Question Mode: Get brief, direct answers with minimal explanation
    • Diff Review Mode: Professional code review for git changes with detailed analysis
    • Concise Diff Review: Quick review of git changes focusing on key issues
    • Code Search Mode: Find relevant code snippets based on user queries

Quick Start

Installation

Install AILS directly from PyPI:

uvx ails-cli-tool

Update to latest version

uvx --force-reinstall ails-cli-tool

First Run

  1. Start analyzing your projects:
    ails
    

That's it! AILS will guide you through the rest.

Detailed Installation

PyPI (Recommended)

For stable releases:

uvx ails-cli-tool

System Requirements

  • Python 3.8 or higher
  • uvx (included with uv)
  • Internet connection for AI API calls

Configuration

Initial Setup

Run the configuration wizard to set up your AI API credentials:

ails-config

The wizard will guide you through:

  1. Choosing between recommended configuration or manual setup
  2. Entering your API credentials
  3. Testing the connection
  4. Saving the configuration securely

Configuration Options

AILS requires three main settings:

Setting Description Example
AI_API_KEY Your API key for the AI service sk-xxxxxxxxxxxxxxxx
AI_API_URL Base URL for the API endpoint https://api.openai.com/v1
AI_MODEL Model name to use gpt-4, gpt-3.5-turbo

Recommended Configuration

AILS offers a one-click recommended configuration that:

  • Uses pre-configured, tested API settings
  • Automatically validates the connection
  • Gets you up and running in seconds

Simply select "Yes" when prompted during ails-config.

Manual Configuration

For custom API providers or specific requirements:

  1. Run ails-config
  2. Choose manual configuration
  3. Enter your specific:
    • API Key
    • API URL (must end in /v1)
    • Model name

Configuration Storage

Configurations are stored securely in:

  • Windows: %APPDATA%\AILS\config
  • macOS/Linux: ~/.config/ails/config

This ensures your credentials are:

  • Separated from project files
  • Accessible across all projects
  • Easy to update or remove

Usage

Basic Usage

Scan and analyze your current directory:

ails

Language Settings

Switch interface language using environment variables:

English (default):

export AILS_LANG=en
ails

Chinese:

export AILS_LANG=zh
ails

Windows users:

$env:AILS_LANG="zh"
ails

Error Recovery

If AILS encounters an authentication error (401), it will:

  1. Detect the issue automatically
  2. Ask if you want to use recommended configuration
  3. Retry immediately after successful configuration

No need to restart the program!

Advanced Features

Vector Search Integration

AILS includes semantic search capabilities using sqlite-vec:

  • Find related code segments
  • Discover similar functionality
  • Navigate large codebases efficiently

Smart File Filtering

Automatically respects:

  • .gitignore patterns
  • .kilocodeignore custom patterns
  • Standard exclusion rules for common build artifacts

Enhanced Prompts

AILS intelligently enhances prompts to:

  • Add relevant context
  • Include file metadata
  • Optimize token usage

Troubleshooting

Invalid Token Error (401)

Symptom: Error code: 401 - invalid token

Solution:

  1. Select "Yes" when prompted to use recommended configuration
  2. Or run ails-config manually
  3. Verify your API key is correct and active

Connection Timeout

Symptom: API request timeout

Solution:

  • Check your internet connection
  • Verify the API URL is accessible
  • Try using a different network or VPN if blocked

Configuration Not Loading

Symptom: Program keeps asking for configuration

Solution:

# Verify configuration file exists
# Windows:
type %APPDATA%\AILS\config

# macOS/Linux:
cat ~/.config/ails/config

# Re-run configuration wizard
ails-config

Import Errors

Symptom: ModuleNotFoundError

Solution:

# Reinstall with all dependencies
uvx --force-reinstall ails-cli-tool

Dependencies

AILS requires the following packages (automatically installed):

  • openai>=1.0.0 - AI API client
  • python-dotenv>=1.0.0 - Environment configuration
  • requests>=2.25.0 - HTTP requests
  • sqlite-vec>=0.1.0 - Vector search
  • pathspec>=0.11.0 - Pattern matching
  • pyperclip>=1.8.0 - Clipboard operations

Acknowledgments

  • Built with ❤️ by the AILS team
  • Powered by OpenAI and compatible AI services
  • Thanks to all contributors and users

Links


Made with ❤️ for developers who want to understand their code better.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

ails_cli_tool-1.0.5-cp312-cp312-win_amd64.whl (896.9 kB view details)

Uploaded CPython 3.12Windows x86-64

ails_cli_tool-1.0.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.8 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

ails_cli_tool-1.0.5-cp312-cp312-macosx_11_0_arm64.whl (915.7 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

ails_cli_tool-1.0.5-cp312-cp312-macosx_10_9_x86_64.whl (977.2 kB view details)

Uploaded CPython 3.12macOS 10.9+ x86-64

ails_cli_tool-1.0.5-cp311-cp311-win_amd64.whl (934.1 kB view details)

Uploaded CPython 3.11Windows x86-64

ails_cli_tool-1.0.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.9 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

ails_cli_tool-1.0.5-cp311-cp311-macosx_11_0_arm64.whl (950.4 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

ails_cli_tool-1.0.5-cp311-cp311-macosx_10_9_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.11macOS 10.9+ x86-64

ails_cli_tool-1.0.5-cp310-cp310-win_amd64.whl (931.1 kB view details)

Uploaded CPython 3.10Windows x86-64

ails_cli_tool-1.0.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.5 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

ails_cli_tool-1.0.5-cp310-cp310-macosx_11_0_arm64.whl (957.2 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

ails_cli_tool-1.0.5-cp310-cp310-macosx_10_9_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

ails_cli_tool-1.0.5-cp39-cp39-win_amd64.whl (934.6 kB view details)

Uploaded CPython 3.9Windows x86-64

ails_cli_tool-1.0.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.5 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

ails_cli_tool-1.0.5-cp39-cp39-macosx_11_0_arm64.whl (962.3 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

ails_cli_tool-1.0.5-cp39-cp39-macosx_10_9_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.9macOS 10.9+ x86-64

ails_cli_tool-1.0.5-cp38-cp38-win_amd64.whl (959.5 kB view details)

Uploaded CPython 3.8Windows x86-64

ails_cli_tool-1.0.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.7 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

ails_cli_tool-1.0.5-cp38-cp38-macosx_11_0_arm64.whl (996.5 kB view details)

Uploaded CPython 3.8macOS 11.0+ ARM64

ails_cli_tool-1.0.5-cp38-cp38-macosx_10_9_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.8macOS 10.9+ x86-64

File details

Details for the file ails_cli_tool-1.0.5-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for ails_cli_tool-1.0.5-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 ceeca977305661feb0826d1bc2e00ca8f169ce31c4207df2853d33c8c1b4e7ff
MD5 88c6f68a5d82dc1e80d0f67c59b24996
BLAKE2b-256 5d103002d2de8229cd289729b37c8d4d605d35d1eeb926054b2a5b74ce555db5

See more details on using hashes here.

File details

Details for the file ails_cli_tool-1.0.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ails_cli_tool-1.0.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0de7e9cda9819411d4414bd0b7770d1e7f6f96d83c14ecb49a020fdc26dac958
MD5 6d22d31abbfbc788f64c98ae85d49963
BLAKE2b-256 f5ec3e02fe06c0e635a4a84ab5bf09edfaeddba438be0d47aa521796bea20bfa

See more details on using hashes here.

File details

Details for the file ails_cli_tool-1.0.5-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for ails_cli_tool-1.0.5-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3602516d754ccc6ea2c4fe46fa62cf189c0854698424f1a615c3a89daecbc40a
MD5 71b81afbca41dd220a131600cb7f729b
BLAKE2b-256 a2add20239f1cfafe6cd38768e2fc0b0844c8948aa240d48bcca5fed486f84fc

See more details on using hashes here.

File details

Details for the file ails_cli_tool-1.0.5-cp312-cp312-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for ails_cli_tool-1.0.5-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 ef2c2b46e12516e13be0431b6cbab05cefbecb3dbef1ea0a9b785be72834c9ce
MD5 0521a1b75b7a75e64d18d9e9288c9d77
BLAKE2b-256 f353190954e6804008c65482dccf8d022bd7fd1ec8efc7e0b0c14aebd99bd2f1

See more details on using hashes here.

File details

Details for the file ails_cli_tool-1.0.5-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for ails_cli_tool-1.0.5-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 eeaa1d61d0e5d477b9f69c4d668bd8157c8b4f68b597683ccbacf501c8f1c6f0
MD5 d4686adb10c2de54252e4890c1d4cf5a
BLAKE2b-256 2fcecea46b2a8ab64364d737028b3ad1f80e6b277f93220fc2a0839fdbde6317

See more details on using hashes here.

File details

Details for the file ails_cli_tool-1.0.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ails_cli_tool-1.0.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0e29f8273f4561b006d88c070a26e1f892d4af6639a7fff9b08fc5bbce33816f
MD5 432fdc702d7aadc444a5a5b662206d98
BLAKE2b-256 a4e45f7cdb0d3f485ba58f5089e8bf80617a227a6a6d9abaa664ae7a5a6ee506

See more details on using hashes here.

File details

Details for the file ails_cli_tool-1.0.5-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for ails_cli_tool-1.0.5-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 753ee6b0889f23529b573325188de4b10f5e34f64d488927dae743f40fa90757
MD5 86a84fbb3d1316bee985848501c69166
BLAKE2b-256 0c31002fd944d9808b11581d44dab8f77222d1af1ef6428ac347109449eafc09

See more details on using hashes here.

File details

Details for the file ails_cli_tool-1.0.5-cp311-cp311-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for ails_cli_tool-1.0.5-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 bb595bb7f8d5dc1e74f3e89de05dac50b50592579bac7dd92e960c84f02c711e
MD5 d5939409bc55e529dac55dc31488dfdc
BLAKE2b-256 955d56f9384e57710170866b06794bbc8053445364d5ce5e4b52387d15e93819

See more details on using hashes here.

File details

Details for the file ails_cli_tool-1.0.5-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for ails_cli_tool-1.0.5-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 8d7ee24f53ba2570ae26afc2972336830c82d9a8dde71d91fdc8e2f776826c1c
MD5 216ba4887016de939752de397a1163ca
BLAKE2b-256 791f2ce70d0976961f0af3f0dcdf7dbbcc49d40ce34be25d9caccd5badc941be

See more details on using hashes here.

File details

Details for the file ails_cli_tool-1.0.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ails_cli_tool-1.0.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2d2e5d37508a9c845b2e978998e2ad9fc9dd10155738ee062a0fec104dd59e70
MD5 46d9d30339cd4a7016c33cbe42d57b3a
BLAKE2b-256 238fdad29f3d3d41b3ee1ab8bfb786875c39b99845b095a460c07f59c5cd751b

See more details on using hashes here.

File details

Details for the file ails_cli_tool-1.0.5-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for ails_cli_tool-1.0.5-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6754b8d658cf6ba97242afab18a982aea49a23e7beae549fdbf81a97c9555f6e
MD5 c728b0fe16aa2fa7ff8630774cd9b830
BLAKE2b-256 38bcad6298126894bc5955d008e84c0419c6ca23498948135f4c03d53a7b462d

See more details on using hashes here.

File details

Details for the file ails_cli_tool-1.0.5-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for ails_cli_tool-1.0.5-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 25aae20cf9cc94033908a536c9da5d3b666fcfb310d527169818bd21ead376a0
MD5 568c36e11cae96ee109fa94d9524506f
BLAKE2b-256 0861fdaae41c2a3015fa9191ea84b3086e2a44953d75e917d5889d8a0ddda7d9

See more details on using hashes here.

File details

Details for the file ails_cli_tool-1.0.5-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for ails_cli_tool-1.0.5-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 9b62943c1d850cc37d52ec9468414d881bcf11e3eb162ebaf294d52821bdcc54
MD5 04bdbbbb74753599cf25bca462f5ef85
BLAKE2b-256 11232102041059137fa914e569e37dea17f4c0f047be04eca739cf554e5df496

See more details on using hashes here.

File details

Details for the file ails_cli_tool-1.0.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ails_cli_tool-1.0.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1d177153abb99b7efbdd1c731e4da6439819e8fde0a5fff1cc80868e659d6a95
MD5 cb1e71bb4f20b8c5563647e574976e84
BLAKE2b-256 d127b9b6496c7405202f3bd62511773a645da9fe50a6721a888191b720775a3e

See more details on using hashes here.

File details

Details for the file ails_cli_tool-1.0.5-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for ails_cli_tool-1.0.5-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 63ed989b91613881b37d900cbfc031c555a9b51537b0ef5c7f57a40db47b5dd1
MD5 ad122403dab4debaa2b6c9218b07f84e
BLAKE2b-256 6bd82099bc59841d5899cf8949442137a41ca9b125ff63bcbc735ea733cb58af

See more details on using hashes here.

File details

Details for the file ails_cli_tool-1.0.5-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for ails_cli_tool-1.0.5-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 3067dbd9e69784a01cd362cfaba35325896f1bbea98a6c035024bcbd6829ebb2
MD5 3604967462e21cf4aee7228bf4e10a9c
BLAKE2b-256 edb88965c326d58b5fdba1bfcb621fc7d295650f3e44ef9c775b60c1da875656

See more details on using hashes here.

File details

Details for the file ails_cli_tool-1.0.5-cp38-cp38-win_amd64.whl.

File metadata

File hashes

Hashes for ails_cli_tool-1.0.5-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 c3e8ac0fd510887395ce7591d7a7e0447e71756114623b19fc6295af6c851114
MD5 663c0849a233e6565299a875b66ddfd4
BLAKE2b-256 46800a4c12a84d2eb22316e589c9c6f0d4e01553382c47070f3c6d14011f9ae8

See more details on using hashes here.

File details

Details for the file ails_cli_tool-1.0.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ails_cli_tool-1.0.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3a16c82ee4719e311ea6105f3649bea7e6eb82fb097ce4334d60433a4f2e8b5c
MD5 50ee6a3aabd737d95e68df1fb8c6ccd7
BLAKE2b-256 d56df94bdc8d71e71265426df849c7d4967613897b81ae370c7cd9d0cbb5803b

See more details on using hashes here.

File details

Details for the file ails_cli_tool-1.0.5-cp38-cp38-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for ails_cli_tool-1.0.5-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 51821f5a705253fbb8c4b756ec7484420a16be1763fc6768c75a8a1d8fc724ce
MD5 dcb94065e3ccb3cd9dc849211d6f86c8
BLAKE2b-256 3f700e87dd60b7f7f4d062953a5b15b8446a2875de33a72702e8f5e5c53147e4

See more details on using hashes here.

File details

Details for the file ails_cli_tool-1.0.5-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for ails_cli_tool-1.0.5-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 9bf7c158c813f38076059df903100c8c63ed12c6616e67d395092eed77bb9662
MD5 e9370007bc230be8fe5966138086d42a
BLAKE2b-256 15e1486e8b243ebe05e4e67894dac4614348ca4833be703f10758de9fef0c52a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page