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 | ChangeLog

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. uv install tool
uv tool install ails-cli-tool
  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.1.4-cp312-cp312-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.12Windows x86-64

ails_cli_tool-1.1.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (9.5 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

ails_cli_tool-1.1.4-cp312-cp312-macosx_11_0_arm64.whl (1.3 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

ails_cli_tool-1.1.4-cp312-cp312-macosx_10_9_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.12macOS 10.9+ x86-64

ails_cli_tool-1.1.4-cp311-cp311-win_amd64.whl (1.3 MB view details)

Uploaded CPython 3.11Windows x86-64

ails_cli_tool-1.1.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (9.6 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

ails_cli_tool-1.1.4-cp311-cp311-macosx_11_0_arm64.whl (1.3 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

ails_cli_tool-1.1.4-cp311-cp311-macosx_10_9_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.11macOS 10.9+ x86-64

ails_cli_tool-1.1.4-cp310-cp310-win_amd64.whl (1.3 MB view details)

Uploaded CPython 3.10Windows x86-64

ails_cli_tool-1.1.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (9.0 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

ails_cli_tool-1.1.4-cp310-cp310-macosx_11_0_arm64.whl (1.3 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

ails_cli_tool-1.1.4-cp310-cp310-macosx_10_9_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

ails_cli_tool-1.1.4-cp39-cp39-win_amd64.whl (1.3 MB view details)

Uploaded CPython 3.9Windows x86-64

ails_cli_tool-1.1.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (9.0 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

ails_cli_tool-1.1.4-cp39-cp39-macosx_11_0_arm64.whl (1.3 MB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

ails_cli_tool-1.1.4-cp39-cp39-macosx_10_9_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.9macOS 10.9+ x86-64

ails_cli_tool-1.1.4-cp38-cp38-win_amd64.whl (1.3 MB view details)

Uploaded CPython 3.8Windows x86-64

ails_cli_tool-1.1.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (9.2 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

ails_cli_tool-1.1.4-cp38-cp38-macosx_11_0_arm64.whl (1.4 MB view details)

Uploaded CPython 3.8macOS 11.0+ ARM64

ails_cli_tool-1.1.4-cp38-cp38-macosx_10_9_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.8macOS 10.9+ x86-64

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.1.4-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 8a62d17f1ca580c5a8798ec13b500302bf607bd2781b5ebcd234828493706419
MD5 8189e36b905648682f5149d7dda2c160
BLAKE2b-256 4b124a1b4059f2df90e69ac20e77528bd1347a48d33a42ecde86463d0081cc87

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.1.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b6f739fd20e1bf91b809b039e37481d529ca466375095d7a9d26396a53c91a7c
MD5 8583ac067f0ad6e2d9fbef869bee34bc
BLAKE2b-256 a60abaf11598fc3832aba6d66c64c72440385d5bbbfa02aaf99538a8949b3519

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.1.4-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d31a10d5ad41d4722b2808d2fcdfbd65bc921d66c20a48407e8cc17b0b0168c6
MD5 b933fce9c11c0c6cef105c4873440868
BLAKE2b-256 467dc6998e4fcdafcff79e30f15d5ffe4c7afe771dd0a41ef1109fe404c64f65

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.1.4-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 98ca4a14780265bdba1860c9e496f091d888d8171055e8a15ce7d7d0e66159a4
MD5 bd0c7646bdae4ba8e244ee2d13cc8da2
BLAKE2b-256 a31e5a336cb59cd971c3444744070628c7cd83db35eceb84a5171823eb2374ac

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.1.4-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 f3fc7c4c26cf90fdbbfc456cb96c02312422b298ac7ca805fab91c9bf25c3cee
MD5 a0857bbe7a8a96974633d9ce1400c623
BLAKE2b-256 2f5e065797493f45159ddee02dcfb3cf2e83ff808d7a31e7c97bcb2177a3f6d4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.1.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e71d2cacb4b5eea396e507c1397da447a6a08aac1e0f2bd1e72fbf45bf25a265
MD5 527718645152c12e6ffb5e8b5db5332d
BLAKE2b-256 afc4e94838909cf7ae04d640959bc6ba0eabe84b55a858d7c65280754b550e3a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.1.4-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f210a8d554aa176a8986eaa035057eba2aed511d09f4271b25d40fe68e99194d
MD5 55961d0eb8f541a7da9988e22d4800a4
BLAKE2b-256 4626507d866ff1832bb85193cc59bea546450c18b9e3c0aee8aeca1545041d80

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.1.4-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 807f87e1126135074c6a6331da0c215aca883e775dcc7143bd15421cc39283b8
MD5 9a71db7012858fb15d60d0d54ff67737
BLAKE2b-256 94fb86672ebb68822963a1b07dd39040e5a0f35a00a8571c189be99f49a148b8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.1.4-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 70442681851e60c01cfa6ab9e8bad7e1d03459b62243219e7cad0f4b11d39fc4
MD5 3cf19274a1ad079109fc600edfa824d2
BLAKE2b-256 4828198539e873561b47164a5f3a8a506ab45bb798b71e29ca7595955f925012

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.1.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bd92f9d56e2ad096ceec5c028ef3dfc86359004a6cbfc077fe7beaf400e09e7e
MD5 dd96e641e36e2841ac90876d74535d5d
BLAKE2b-256 60da5d20dba03911cf039b6284cfea863d8eccdb68bd33c4846426ad90b0647c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.1.4-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c0e71ca12db53726ba7bbef101be2f798a9af4c635a83b0e37b1e7785bbc7320
MD5 aa8af49fb1746a3514682a54b022e8a4
BLAKE2b-256 5ca150742957be16c991cc11119fb17ff6e68f4bd9a603034a1aaaaaf3b7fd6c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.1.4-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 d735f9b0658c41189d1286856601634e11c5b3e8fb6b6f99ea9700e2a76f3668
MD5 db848ae34d732a630b75c3995d003893
BLAKE2b-256 aaf5870c90dc32017f0aa7f4f86cc67478e6597d83d175e0b7a59cb848b07357

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.1.4-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 66a44643fb6cf7ffea91d9b819bc3cc3b184110ecf830b7dfc063e07b3eefaf9
MD5 4e6ff1b3236f1d378bca5e8dc5b52fb4
BLAKE2b-256 79b437790368ddb43821ba33eccee335ce7b203f0ac7eb9b1e1661fd4e8cdf10

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.1.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 507914b3b7b58eb9025cc6d62dca53c05a97d1d3c86212057da4d75708b1cb80
MD5 6208146000e55ab7afdb93dc05903872
BLAKE2b-256 528c185903072f96d4380d357a76c18459194f948d714fb2ed948ad896b9c290

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.1.4-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3bfa885ddb2569e4ca7c462fb02694b3ddd8751df34a06d73da0e108f2238615
MD5 7f8241809ef6ca8df54cfd297ee42630
BLAKE2b-256 07c6909e43d6abad6c0c5452c9a113a380eef4bef49819675b28a0102bf8a499

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.1.4-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 6aff7cf219be3d96d5da54c457dc20bbedc7c80b7a6626bb4f1db497df5c60fa
MD5 acb0c59b9cb355d839ed74e002e4dec2
BLAKE2b-256 6b7d435452b3fcb2e720dcb3810cea5507c0adc0f1b38491ac5195fc037d39da

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.1.4-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 a181825912d24964b4e83cc7e223ead809c6675a902f280b278e8866f8247932
MD5 4b551ad69d7b58eb1126a0872ecafd72
BLAKE2b-256 c49996cd953a272bc741c23718ee5599460ff2d4d3b8cbe091b1837319d888a5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.1.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4c876a8236bc3862f17e893589002b21013242641b273f0f614b2665f89f54bd
MD5 15c8638144eb2bc8b5c40e7f3faea7d8
BLAKE2b-256 f44fa985e245e6f3ec73c1fdd08333fb3c778c44caa1922333d210502e0a6a6c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.1.4-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 dcd44917577588656e29e6d84304625ee091db61e13351cfd37b21f224806949
MD5 25b0e1eb4e4ca4115171a655c4dc700f
BLAKE2b-256 ba88650c847b16966c48e1c8019dc307727b01d77e50ab9c1f8b64842f600c96

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.1.4-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 511180927dfb516e798c776a118887af0c2e758322ed3b48f18a0a3470083e18
MD5 0c395966108eaa6d856efc5c8010ded1
BLAKE2b-256 45a8fbc84fdac9e4955f37f59dccbcd10982a04e37206a93a3bc7b5bf2335302

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