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

Uploaded CPython 3.12Windows x86-64

ails_cli_tool-1.1.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (9.4 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

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

Uploaded CPython 3.12macOS 11.0+ ARM64

ails_cli_tool-1.1.3-cp312-cp312-macosx_10_9_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.12macOS 10.9+ x86-64

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

Uploaded CPython 3.11Windows x86-64

ails_cli_tool-1.1.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (9.5 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

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

Uploaded CPython 3.11macOS 11.0+ ARM64

ails_cli_tool-1.1.3-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.3-cp310-cp310-win_amd64.whl (1.3 MB view details)

Uploaded CPython 3.10Windows x86-64

ails_cli_tool-1.1.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (8.9 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

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

Uploaded CPython 3.10macOS 11.0+ ARM64

ails_cli_tool-1.1.3-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.3-cp39-cp39-win_amd64.whl (1.3 MB view details)

Uploaded CPython 3.9Windows x86-64

ails_cli_tool-1.1.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (8.9 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

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

Uploaded CPython 3.9macOS 11.0+ ARM64

ails_cli_tool-1.1.3-cp39-cp39-macosx_10_9_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.9macOS 10.9+ x86-64

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

Uploaded CPython 3.8Windows x86-64

ails_cli_tool-1.1.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (9.1 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

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

Uploaded CPython 3.8macOS 11.0+ ARM64

ails_cli_tool-1.1.3-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.3-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for ails_cli_tool-1.1.3-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 353530bf0565d8c6604dd5d076bd18313e3ac8a46d8af2c28a5c8b638fcf707f
MD5 93080b9505132718f2909dbee14f3f5f
BLAKE2b-256 fcd47f9478d7d440a17572fabc9f8f16bd2c6280cd4babdb0b7a237e81dc6ce7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.1.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8d04ffd642b2e422aaf5a910fb6faab4cf88ccf70778a2b8c603402822d8652e
MD5 89048708f6731391521bcbfc875cf81c
BLAKE2b-256 abcb8fd375c2bb159dd9c1e9c9dc71ca022e6bf49c3b72164b8839a7d3b73cd8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.1.3-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d880824d94aeab22f5a31e5e471ee8fa890e1c50db2f6bca93bf9c4bf017430c
MD5 36aad184b8a8b00dbf3bc72652f874e4
BLAKE2b-256 09d9a13a161beac473861a61ecf624c20039e55ba77ed05c4ff5209cde0ba621

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.1.3-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 497218a27da5ea014e9acb22b48a69b9018db530b465edf55531dc229195b3b5
MD5 55a54e6ac286161fc65d1466ef03a200
BLAKE2b-256 7f715f21f7befeebc17052bf91c1a474a38741088a6ef9c9370ca07ed5294b89

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.1.3-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 fb1a49e4fddf89077cf99d2ac0dac7ca714c4518574a1273679f20e78efce899
MD5 134c32d31a13db610c4767afd9e5da35
BLAKE2b-256 01729d84a59be3a5363d7e34ab0376586c077a807df27a31e8de605a298efcce

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.1.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 af11dd94abb24327b2b9690a8078165f5a0ccaa0713b3472015f6567383f4695
MD5 4886c527c0e9a6d8091b65413e4a487a
BLAKE2b-256 084a962c9f79caf7ec9682819b40a82276ea412c18e473c7553feb5e6db11e7a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.1.3-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 bcf32bae96dbd5fb607a6f1f47037ee9a8b65adc9532e36fd8f659f6733bc99b
MD5 089a5f3004079ae764f2fdd4d24cf229
BLAKE2b-256 743d87647bbd1a856eea264d262093f4eec7ca2fce18372b5e55cb02c912b403

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.1.3-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 0e439bd4be0897fef19a7c0ded88339cc73415544ad0be7cb1d7293f121d5a64
MD5 ff3f21103f5af6555f0435091a5fc276
BLAKE2b-256 b497e4cef02231252fba53fe4f28b6dd565129cce10f74f9c1000eccc2d7f218

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.1.3-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 c6b23cdbaf40a69f7f6a6ec95e1844df7f0f42a7c10378a4a3113f2d793bb219
MD5 03bbdb9d17bdb963ddc10e355d8df462
BLAKE2b-256 cde6adeb3a0bef1a6ad8f2588d2ad5bb1df0af7c201fb948dd46cec7c24af6fa

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.1.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5f18075c42c600f6e6d4f10a3831545603fa1b0ba58f0acb4b83e2c10a0314fa
MD5 678c1ec427f95ecbe7fbe15728f10cd1
BLAKE2b-256 b5387fc733d587b15452764c2e0b065b127f6bc4a1aa064f60b58626ba11189c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.1.3-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0ab165d93e3e5f40af0c060bd73c5ed9febf65214898199cb85b6744dadb8941
MD5 b47a8a82d4d456d3f5ac9392daeab0af
BLAKE2b-256 25af4def7719cdc9771b528ccb08fd516c26279f38df3e85d5267af7168dc174

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.1.3-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 8c1ac205e89331ca5dc2aadc143f7d15d157ecfb353684aa3d8381117066c073
MD5 e362c2262ac10b819bcfcf702c4d1268
BLAKE2b-256 671a76788e81e98773ab2c8698f866d697ff77d0d4b6e49f63b9fa5a70281c01

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.1.3-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 e5bc603bbcc0486680943898f1016de80e91b6164b411091ebc0e4e613f3146f
MD5 0e237b3ff7ed93738f80c144dc340145
BLAKE2b-256 2d86a686872f7a5f4dff5128b2b7ae9cff2f8b605e9db03f563e7ceca385b4be

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.1.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 09064bdbc8b7e32ac07085c3a1bfd7b98a4699de6cacf7e32e80c7534da35f76
MD5 267615dbbbe7c30e88e86291bfd6703d
BLAKE2b-256 4a61f3fd14d9a9de6dd40996e87659f76c0bafd46d5d8c1e10b27cc378eb8607

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.1.3-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8e7e2d3b0d5cbec41908d4e47a71cefdc2bb5e3d14488defc885bfd96372379d
MD5 879eee2b0b77d3f31767e2d3a0350f8f
BLAKE2b-256 8716baf5ac694d4bc96758b5566677be7d2280a49b3ab77a0606b8e9b35c6c5c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.1.3-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 d1e6f65c6e8417d2ea03c6e5813fc4b022f688ffb3750bc5b6eb02749c3119ff
MD5 0da902b632f9819fe35fc9660d3edeb0
BLAKE2b-256 00e969c33da2de89a3cf90fb50eecbea9f2a4214a1fdb4aced1580b68e643168

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.1.3-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 8e4b3e067cfcc37f005609de95fe2d66b550926cc535e480e47b9bf24a7a5e9e
MD5 1a34011f3f48b2b257b5e7c9976f22a5
BLAKE2b-256 3bdc032217cfaa0fdd8d77ca17cfa304fbb66be7d9d20485532bea95f6e68c4c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.1.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8f2a7d946cd4ed89497389eaca94410b6aaa09b3aacff0afe8bdd252ce22a49a
MD5 769b715464c6739e58048ca78e1235e5
BLAKE2b-256 e5817d4d71c3fe4e25f78907f9a2dae801993d8ed48b54280d5b6944771ce058

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.1.3-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ce61fa43fbbcd6c514482e9e85849a09f9db4f4a82bffb6506507df8d323317d
MD5 1b42c4425143a5fd103e511a2b6e6521
BLAKE2b-256 ed5abd4b0fe853bfaa8aa4e9b47bc5b07c6c2f54bd8b202cbeab6cc3ce7b2667

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.1.3-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 7a51f8d1c6c7243e7cff5a7d8482aa63ee0a107d39f98c9415488ab9186d63ee
MD5 46274ba890912db152d65e74670f8d1a
BLAKE2b-256 b28c2353afbeb54592dc925bd4fcd2a1883bee2c2c6e42e57269e0bd5f87663a

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