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.6-cp312-cp312-win_amd64.whl (882.0 kB view details)

Uploaded CPython 3.12Windows x86-64

ails_cli_tool-1.0.6-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.0 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

ails_cli_tool-1.0.6-cp312-cp312-macosx_11_0_arm64.whl (901.2 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

ails_cli_tool-1.0.6-cp312-cp312-macosx_10_9_x86_64.whl (964.4 kB view details)

Uploaded CPython 3.12macOS 10.9+ x86-64

ails_cli_tool-1.0.6-cp311-cp311-win_amd64.whl (919.7 kB view details)

Uploaded CPython 3.11Windows x86-64

ails_cli_tool-1.0.6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.1 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

ails_cli_tool-1.0.6-cp311-cp311-macosx_11_0_arm64.whl (936.5 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

ails_cli_tool-1.0.6-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.6-cp310-cp310-win_amd64.whl (916.6 kB view details)

Uploaded CPython 3.10Windows x86-64

ails_cli_tool-1.0.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.6 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

ails_cli_tool-1.0.6-cp310-cp310-macosx_11_0_arm64.whl (943.5 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

ails_cli_tool-1.0.6-cp310-cp310-macosx_10_9_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

ails_cli_tool-1.0.6-cp39-cp39-win_amd64.whl (920.1 kB view details)

Uploaded CPython 3.9Windows x86-64

ails_cli_tool-1.0.6-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.6 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

ails_cli_tool-1.0.6-cp39-cp39-macosx_11_0_arm64.whl (948.6 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

ails_cli_tool-1.0.6-cp39-cp39-macosx_10_9_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.9macOS 10.9+ x86-64

ails_cli_tool-1.0.6-cp38-cp38-win_amd64.whl (944.9 kB view details)

Uploaded CPython 3.8Windows x86-64

ails_cli_tool-1.0.6-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.8 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

ails_cli_tool-1.0.6-cp38-cp38-macosx_11_0_arm64.whl (983.8 kB view details)

Uploaded CPython 3.8macOS 11.0+ ARM64

ails_cli_tool-1.0.6-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.6-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for ails_cli_tool-1.0.6-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 8bc26f3da0c02e4b5f492e25294e9287b4fe5a8aa8b51a0b80e1df0f029474d7
MD5 df25321ce4c99b8eaf55c6cdf4961a94
BLAKE2b-256 d080b3ce2bcbca4d4bc25863e838e5ccb69679181d8da6975f404314e60b5083

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.0.6-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f8932b5d2088e2ce83e3c261d3c5a5ea2f36d468e4d211d1f9620d79aa8f5a28
MD5 63e04bb3dc2aa71c29a76a31ad4dffc9
BLAKE2b-256 f287781c977202537e4b7d7dff1a2c8fea44edbf9c3009be1be43b64fb312e73

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.0.6-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 42ed993d63bcd9bd91046cd8bbb6d9951c629cc50e426e678c363f3feeea9dc2
MD5 22e2240798ab2597b3dfce35e99507bc
BLAKE2b-256 18f53b1ff29617b4dc4711e385b1ea0906ffd17d338eec5ce515a87b264e9d23

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.0.6-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 8611442d79a3a83591dc0fbd8d804aa0d07307c62c53f50fd19ae905be89af72
MD5 96814755981afe3c314a1dcb38ef100f
BLAKE2b-256 31fd05b4da346df6db1fb6a5c3ea79dc41415b4075f8f0755ca8ba22fe9a4715

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.0.6-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 aaecd8dfa42552b9ebb6a68e65efefe555e67f00cff6ecc66634037fcd261be9
MD5 224619d199aa6e9b2712352d23b591e9
BLAKE2b-256 d9695a51e955784238adcf73d1a99bcb25c166d763494dbc6187dfdde7477b58

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.0.6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 065bf9a1b14162997ba5bc211b54841126d8ba4c939b712ad1b84b758d954ee5
MD5 46474cc33b191871b7c2aeaac1386a8a
BLAKE2b-256 1b06ffdf3c7b05afeb7da2add6c5ccac55435cf6ae2fc5bbe28b0fd9217c28a9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.0.6-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 44afcad1d1ecbac86bf1a81e08ed69e651fe65387e395039f7b4b585735c59a3
MD5 6f668722e94f5041e516e6bd54101618
BLAKE2b-256 396189e5a3a66cfe32e8bc8533a1798a0df7a193a1a90f3eb32d37f83c29dffe

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.0.6-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 c0a7b587d4f4d2d14c0074159cebc6ae84952f8bb41e8217034b87b7b63a08ca
MD5 1c5318ab2d1092340a54302d700d9e60
BLAKE2b-256 7a8f8458805dc0597be0b224c4b5ab07eed20093f902640e6f7565052ad91b38

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.0.6-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 9ef333db591e7252cc72394927c8f5afcebc45f90043f3d180970ddb1a4f66fb
MD5 c4cc4a2c5ed1d10f4008ccbe7cc424d9
BLAKE2b-256 127569739ad91cde8bfbb8cab0520d164fceb8260f171c34b31a56fb88612ad9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.0.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a49f4763a3549e6672d512fea655da3821f918b4f9aaec5bc1d74d2ba03f56d4
MD5 0e3ce8889bae3fb0c66654932dac2584
BLAKE2b-256 f0655a37e85debbd125bfb7d3eaa3bf29ae79cf50a085e1f6a4eb0916eb02587

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.0.6-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 17c325e0a7344765ebd36aa38f015a9fb994b17bf6946783cdf980fe3d89d242
MD5 a7ef0b79df4824d72c73d888ac120da7
BLAKE2b-256 a966b5afed38e30ebe314b589ee8cc1a48e212e10e278280fff992c89b1f3ea3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.0.6-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 713edade428ff4d43b944558a57334de5486a689b9373c370118385c9ff73b0c
MD5 058412ad090ce2d5ab11d917f4e47264
BLAKE2b-256 06e36830d7fbfce9123be6d9b25025dea3a4200382949eb860e274580520b85c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.0.6-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 213e0134b6cbb89164ca12b2606ab177005a449ca6ab5c3a4f1bc68ba266e553
MD5 800117465fcc882b06321719cf63f8ef
BLAKE2b-256 bd03233ccc86d2a16f9ed0b02258da20988b03557c0df3d7b6bcdf0f910c0458

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.0.6-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bc41b41ec73dd4229ba0ce20dac70c88aafcd2e1fd4efa8c7741a64d40959668
MD5 32b985e4875da6a18e0ac2720c254361
BLAKE2b-256 92d6e85be9b96ad0871e4e91224e5cf73a5f6a4d8de74f6542f8ef9d5e0ccd3f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.0.6-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ac37a090a08e2ca224bece477a81bf354df888f73a5088b32c72d2ad28243f96
MD5 e9735df37f448db005f539cd01786900
BLAKE2b-256 e4117773c8b4bd1ab1a01580a8a70053ad825cef9dfbbe6e2ed2f99645ae994d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.0.6-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 c749beb301200635c187e74a7b79a3fb4e958b46f8381ab4b2fd1d1cfe7975f9
MD5 612ec7ad8ffbf9acd1fc137afcd36000
BLAKE2b-256 9e4003abfe734432999da22dd06d16e31e822b0de0ceffcae0b7cc00e7fbf2d3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.0.6-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 ef9a9004e53372e132fc81779db02f8f11d34c38171733330b386f60e3d66d31
MD5 8a49fa08c96c6c37a55a5edac5d99406
BLAKE2b-256 2029d72b1cbdec42a470b84c9ae43f8cad75be6bcbedcae24110fc097c175faf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.0.6-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8294643579e23f42f0639876e85915c55d15c5d230dc53d355ef65b4083314e8
MD5 f1c367430f02f286e0ee0283d4143761
BLAKE2b-256 442cbe74d7024e49df6834034bf90675af873ffc95ac7285503f647ccf2e7be3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.0.6-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 df19e34dff740e5b4e10ffb737000abd06d850efb966af37b579191334451551
MD5 cb76f4807ab3eac0906b2903b5a7b56f
BLAKE2b-256 a379fafcbe02bd0813579a52ac91dc920958e5d8decc9e8e73324dd7bd2b0813

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.0.6-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 32ad6be62d8a3b7399720eaf90aba91d62a63b2556e4618d80b4ed257d94f00d
MD5 95db7e8799be0235727277c061f02eec
BLAKE2b-256 b9d815034d756c8e3fb3edbb66c7fa638d653972b56a7062b2d759b50474e4dc

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