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.5-cp312-cp312-win_amd64.whl (1.3 MB view details)

Uploaded CPython 3.12Windows x86-64

ails_cli_tool-1.1.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (9.7 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

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

Uploaded CPython 3.12macOS 11.0+ ARM64

ails_cli_tool-1.1.5-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.5-cp311-cp311-win_amd64.whl (1.3 MB view details)

Uploaded CPython 3.11Windows x86-64

ails_cli_tool-1.1.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (9.8 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

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

Uploaded CPython 3.11macOS 11.0+ ARM64

ails_cli_tool-1.1.5-cp311-cp311-macosx_10_9_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.11macOS 10.9+ x86-64

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

Uploaded CPython 3.10Windows x86-64

ails_cli_tool-1.1.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (9.2 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

ails_cli_tool-1.1.5-cp310-cp310-macosx_11_0_arm64.whl (1.4 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

ails_cli_tool-1.1.5-cp310-cp310-macosx_10_9_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

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

Uploaded CPython 3.9Windows x86-64

ails_cli_tool-1.1.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (9.2 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

ails_cli_tool-1.1.5-cp39-cp39-macosx_11_0_arm64.whl (1.4 MB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

ails_cli_tool-1.1.5-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.5-cp38-cp38-win_amd64.whl (1.3 MB view details)

Uploaded CPython 3.8Windows x86-64

ails_cli_tool-1.1.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (9.4 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

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

Uploaded CPython 3.8macOS 11.0+ ARM64

ails_cli_tool-1.1.5-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.5-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for ails_cli_tool-1.1.5-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 1cf9abba6516cb1c116dcc753ccc7f0db04a98969a80b1acf3340f76ddb2e065
MD5 70a002d2549b43d98a0a42010105ec87
BLAKE2b-256 067d92c088dab8dfeb90b401d0f71e00f2da2c89c569a341d20f8a3de8827d63

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.1.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2ea97819833424f7f153fb7e403637ce7d28891c56324a3ad1d5dc1ecc0263e4
MD5 417b965aad54a0da5fd07a015215b23a
BLAKE2b-256 6d7f762b0aae90e40749cd0ba68d4233cb28fdd3c271b20ad922600837be3492

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.1.5-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 52a6462242e07280b3c717d67106b21611227f6e2515a394a09a40c28d61c3a4
MD5 01cf02f65c6fb8dd306f33965f57adc5
BLAKE2b-256 77f4767046dfdde36ee936cc7489b62f8713ec040b5d291409941cf26e5ed02b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.1.5-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 0a63e794f94e4c3e130a915864ab80f9364f001dcab45122bec8c67af2bdeeca
MD5 02527fccd0268eb7a072f3656367a46a
BLAKE2b-256 ef47ba997b594662773668bf6f427c91a180ab506254501b625a5925c4b429e0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.1.5-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 2f35c90e6f7e67b2ede0c92d40bf147c9bef707898b2f826001681eae78460ac
MD5 0ab7b60381b57c9b4dad72cf72c98fda
BLAKE2b-256 8b2ec6d34a6360d7abd395f76087aadeabbee1bdcf640da80cead99890d3ffbd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.1.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5c8ff9312c00929c0c75ca32322a25a302364e7c3af2e33adef257172aacaf9a
MD5 4988e86bb882bdccabbbb87667050948
BLAKE2b-256 7ef74ce03147240f7a2501a2f8316a843d50ad8d21350bebf664f4b4d59dc526

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.1.5-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 109034f748fae69e4bc47dc8fe80272a9a8ba7576588513ae9327f5bdd33213f
MD5 68ea645ccf06fddcdfd81ce2f0ac1aff
BLAKE2b-256 dfce2bb9e7d3a2c9379b065a7f9d4398ab95e1022cca715843d4d6ae1ecb1e0c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.1.5-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 9722d615f1a79ca906437eed06d08859da6b420beec3453b837134a857cc5618
MD5 e325386b5fac0d06658f04f407161618
BLAKE2b-256 9e30ae55df335b867f860d69c54c9726e0d655fb3ea8bcfbec12c6a036bc5397

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.1.5-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 4d2536cde00949ece38e130f7862a1eafb88fbfe01c5ef7ae1365a3e4c8db4f8
MD5 4e8d81e7cefae1bb0ceba26af3acf55d
BLAKE2b-256 2832836a7e82c7fb559786223e37a76c2ab2aa06763dbcc1ddef31328c2d369e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.1.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d904a058371331d6f4042e9a765e4c50670ddb928dca6620191560f36e00dbbc
MD5 c3304e6d1be181c9b71ac8f27c7ea180
BLAKE2b-256 1db2c52dab46b50ec502ea45b38680082f47004f2708f158dd232f9ee306bf3a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.1.5-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 fa53fc284241b7f290ec37cd20ee77f869c37a6bf152585556737067d7a083c0
MD5 8c2a48c9ada871dd0e891e6ec1d3287e
BLAKE2b-256 b6a2281e52b75f8f907063e131f81666ad97326aa7157edfb6008decc6df9541

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.1.5-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 851dbdd21b7c9f93a65373b8a801160f93f4a4acf3a5c12d0a2d4e86fc2578ae
MD5 31d9d85467dde56e7adb7755fa3d7824
BLAKE2b-256 afa1ff7004cc8b65095afc37e282d2018db42889da9d3b8419347709ae471a9e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.1.5-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 610b457b3e0cd3a954dcd2fcd951ed1750d8f9fe41629911e61b785dbd2136da
MD5 45a04d6bb9a57b9a597d0764ad8cc365
BLAKE2b-256 579ca88f5df1145ca57720b1dee98f21b25c85d84d5acb941f8bd40eca3ffd0f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.1.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5a00e2104e32e97dec2c89bca397d3066076a2465c6cd1ecb7fbcaadade103d8
MD5 9755774b3f49ed3441a155c3b52b3de8
BLAKE2b-256 f98fc78ed72e3922163266ffa36014300312770455d62809cc2abcac3cd99f98

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.1.5-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 94ca995191433ff02044dd8e307f7be818e516d74c7c541a8b60a38a3d21bb7d
MD5 ed5dc8be9b202a750042075fac24b6fd
BLAKE2b-256 605778491cb48f8cb7436ac78e9a2c28a7da0352b1304b7f6ca7edb2b6c794e4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.1.5-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 a5a17978f920cad6341477054775a3dcaa43d5e0fc10f828cfd46a44dc35e59f
MD5 05fdf3190f7faad6e099781a06712a3f
BLAKE2b-256 46666e7199ed83003bdefe86bd274777ff42e724b6721403d12117c5e3ce49ef

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.1.5-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 97afca73c3df1196e1bad660ad97abdbe4fead2854364252f52158d42784bccf
MD5 835e2e3099c48ab87fb66bab6bced920
BLAKE2b-256 27e53547004b9795c1c15c951b78e93ffc62a1fa90abe3c74bb601a9ade404ee

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.1.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ce89de4f9914034e76ebad3af3a54dfcd66c4047c44182d7696a5b8157d6c9cf
MD5 70adc86f33a52f97bc43e589aa0b7fa4
BLAKE2b-256 347087d294d1142f6391beb7e74077f9135cc12ef27699378be35593959e133e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.1.5-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 496fa369f165b2e55990945eb0d65b4b5c3f0d4f7810e4ff32891cf1ad51297d
MD5 4301bc6775f7d71bd5b88e9704f305a2
BLAKE2b-256 3b7599e19df2f838addbc9db3c5423e5c90e1b5aa13ee2bad4a99a502ec412a2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.1.5-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 3a894fc8e84cf79b374ffe086982fceb60493d4e0439fdb249aa6800074b09d5
MD5 d89e199b65321d28ce001e187ad8f11f
BLAKE2b-256 a8c6b08cf1081bac8500c57e6cae5fc1b638493c1433493b36bcdd3db5a83180

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