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

Uploaded CPython 3.12Windows x86-64

ails_cli_tool-1.1.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (8.1 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

ails_cli_tool-1.1.2-cp312-cp312-macosx_11_0_arm64.whl (1.1 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

ails_cli_tool-1.1.2-cp312-cp312-macosx_10_9_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.12macOS 10.9+ x86-64

ails_cli_tool-1.1.2-cp311-cp311-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.11Windows x86-64

ails_cli_tool-1.1.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (8.3 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

ails_cli_tool-1.1.2-cp311-cp311-macosx_11_0_arm64.whl (1.1 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

ails_cli_tool-1.1.2-cp311-cp311-macosx_10_9_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.11macOS 10.9+ x86-64

ails_cli_tool-1.1.2-cp310-cp310-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.10Windows x86-64

ails_cli_tool-1.1.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.7 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

ails_cli_tool-1.1.2-cp310-cp310-macosx_11_0_arm64.whl (1.1 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

ails_cli_tool-1.1.2-cp310-cp310-macosx_10_9_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

ails_cli_tool-1.1.2-cp39-cp39-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.9Windows x86-64

ails_cli_tool-1.1.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.7 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

ails_cli_tool-1.1.2-cp39-cp39-macosx_11_0_arm64.whl (1.1 MB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

ails_cli_tool-1.1.2-cp39-cp39-macosx_10_9_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.9macOS 10.9+ x86-64

ails_cli_tool-1.1.2-cp38-cp38-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.8Windows x86-64

ails_cli_tool-1.1.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.9 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

ails_cli_tool-1.1.2-cp38-cp38-macosx_11_0_arm64.whl (1.2 MB view details)

Uploaded CPython 3.8macOS 11.0+ ARM64

ails_cli_tool-1.1.2-cp38-cp38-macosx_10_9_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.8macOS 10.9+ x86-64

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.1.2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 746804158f5160e1ab61abf4d09cffcf4db40cdcdfdd342aa63ab46f76864140
MD5 eb569ea57be4cce4ac583a4462893006
BLAKE2b-256 71c7d82ef1dd0349e51d033526028b3e5aa0e72992c01c8fde352fdc88f85042

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.1.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 017b9218c6662aafa86a7039e6575c2f37f5a291e73289646f19a8cf8e7ff259
MD5 8c2a7a373d340b6571456c986d7dd931
BLAKE2b-256 65ee0c7d4d4874241a57d4959bfb296277a850e7c3217f9b03888fbc4535b61d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.1.2-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ed1bc794716fac33bea3a4c390b4f50cf91fc7b0cd177adf996b7710d7e4edca
MD5 ffbb5a89033ab74ff82eae16be7cc8c0
BLAKE2b-256 9b3462e6bc6eaed6e9ea5b59c78a81e13853b8c1af6b6207d7528f979e798001

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.1.2-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 29cae82049c7168c05535a38b0b02376be9d5e069167ae7d7fd8750c8bf07198
MD5 a4ac8ba7b96eb0ef6a339b0e7b10739a
BLAKE2b-256 8fd545285c1f8c26a9e35b1011604c3bebca3516426c93b855ef99a325e472b0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.1.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 f61adac46bf7e0a13d94c14b10410e948fb1c5947eb7f0aed0040a485455db52
MD5 137e90cdbfedb3bf4a3283a26fe7d63d
BLAKE2b-256 582e2bd92ef66e380a954834b62e09f22c97f7ac98c504194470b99d27d7004f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.1.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d3c81a74c8f7a04218e8ab352f132dbd8b1da3e6945ac7ccc0df9c7a70d0c4c8
MD5 479367e12ddc51d6904010b4e268390f
BLAKE2b-256 09d23395ae02a69b57c5180fbdcaee5aeb0b223fa6761169bc9789f60497b2fe

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.1.2-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b8276315c1be82a8e5258e44770439bcb65d229e687c6089f9aa99eddf343fe8
MD5 59444bf76954480e6edb61b4e0437909
BLAKE2b-256 82ba73d2c9f525cd6d88b5adcfb059e97e7e4ec668153b16f20c7f517d1f7e40

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.1.2-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 eb14ba394b9d012cabce75e1f8dd755bc4f9ced6ef28325dd59a0dbabcfeddfc
MD5 910ae1a2c53d447f49fc948667ec701d
BLAKE2b-256 660e859f011f3b5b3a9dbd69bf7a405277b60a94291d10934d2471069452c840

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.1.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 37771e1c8f9a1625630804ac56c82c4d8e98141befa914796d23ed64848e4e40
MD5 fa9dfb830093de2e24ad495130b29f8d
BLAKE2b-256 0ff6941697fe88cca284121843de46869ae712f502041210ac6f38e97c6fef86

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.1.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 df0aa64c36727f50b3e7e326eec12cb15b48b6f38d0e9a9f4bf0000a02c42d85
MD5 41815ae56cfcdc6ae9e611b3bb607444
BLAKE2b-256 3bd5e85dbc8d2dd251c933e06d3cfbe35bbbe2c5aad356e4d1c173c4ab140106

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.1.2-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 187183122f3b42d81bc860f70604e6a1a00e7f205d90fdbcff72b1d7cf467149
MD5 f7435a76a92c1c8c25c96c5dab139bfb
BLAKE2b-256 e7ec7d4fbb5399d55c02f296b3efc2aa25d55fbed5948c3f9a19fc7b82d67a02

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.1.2-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 f103c21dd8984f5727cd3ddcc7e55913ce9eeb897a9845776def7521e54043c8
MD5 153d50edb110e3ab0433372803ebe134
BLAKE2b-256 6dfdb18074cd4134b980600c30646cad5a1a49bdda3ba23ea1157c40b56d7b25

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.1.2-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 1411aff0d44075d66bc914ce9317664a2b96e49da3116aca7042858887e9e463
MD5 829f52fd7562e1a3f6de51b9da618449
BLAKE2b-256 9bde8326abbc61cc1a96f0e842d14ca567c0cc6fd806cee3c60058b1ecc4d256

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.1.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9910bc24201e2914de92cf5ee220f96fbdc009c0b761d687503d088f21ba0a77
MD5 02d4b83a51345c5c5079412247e2c2a2
BLAKE2b-256 6dd5f40feb72b91f728763082faf13eb85f8def832c45b4961dfb5af53305861

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.1.2-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 55f6d79acef292e3cc13583913c050ca008b32e58e89f34beb26ac7f4ae4f24a
MD5 9de38268dbf5ad22a851a611e18dcc29
BLAKE2b-256 95943b3aae7631154afe3a84661340e8a62f58db5da6fc705f2d8372a7cb2279

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.1.2-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 054ae9348171c45ae5180973eb85e5c628943b63b4d7f5532d799c55ab47f7db
MD5 aafbc36ba27de89d3c3c67c7be029a7c
BLAKE2b-256 056a2686fe9f90633901b6aeb4a4a1dacc06cf0106b888f06d1ed409ecd9aab0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.1.2-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 2e2250cd010bd2428e95040df734854ac5a27e35377fc7943dcd188901a5ee98
MD5 eea66c9a045b3e042a38b8eda40725e2
BLAKE2b-256 a8b6f416ab8502445cdc98449bdaaa0f757d2977627e34a01e2226f592341aab

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.1.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 064a91088030afa0fb27c70bede4c89b141ecf39cc86f13d9542e4c88b33fa8b
MD5 ebc0967ee53e02ec08ca98d426013bf4
BLAKE2b-256 bf340853c073b9f8e5357420e027be0727fe02bdb3a72cf2645e9524d1ffecf8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.1.2-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ab4d5084aedd41c297df888961abb76b208f33ccb84468e9563c5207fa598250
MD5 7bb3839f75d8f7992e5eb67fe0ee0221
BLAKE2b-256 2105d8cd0b8326adbc411aa7db142d0c0c2466c44bf685f242ee0bf762c1f61a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.1.2-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 0cec4d9099cb7d36682c970205893b026affedfb65092b3d99eeec9a28ff94ea
MD5 9ced605735aa043a4af09a33a547d416
BLAKE2b-256 dce945a25c8d7c01715831cd42fceb15351e8cefccd4d7726077be2bdb803cf1

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