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

Uploaded CPython 3.12Windows x86-64

ails_cli_tool-1.0.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.1 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

ails_cli_tool-1.0.3-cp312-cp312-macosx_11_0_arm64.whl (823.7 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

ails_cli_tool-1.0.3-cp312-cp312-macosx_10_9_x86_64.whl (878.8 kB view details)

Uploaded CPython 3.12macOS 10.9+ x86-64

ails_cli_tool-1.0.3-cp311-cp311-win_amd64.whl (840.5 kB view details)

Uploaded CPython 3.11Windows x86-64

ails_cli_tool-1.0.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.1 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

ails_cli_tool-1.0.3-cp311-cp311-macosx_11_0_arm64.whl (856.0 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

ails_cli_tool-1.0.3-cp311-cp311-macosx_10_9_x86_64.whl (940.0 kB view details)

Uploaded CPython 3.11macOS 10.9+ x86-64

ails_cli_tool-1.0.3-cp310-cp310-win_amd64.whl (837.4 kB view details)

Uploaded CPython 3.10Windows x86-64

ails_cli_tool-1.0.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.8 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

ails_cli_tool-1.0.3-cp310-cp310-macosx_11_0_arm64.whl (863.8 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

ails_cli_tool-1.0.3-cp310-cp310-macosx_10_9_x86_64.whl (947.5 kB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

ails_cli_tool-1.0.3-cp39-cp39-win_amd64.whl (841.0 kB view details)

Uploaded CPython 3.9Windows x86-64

ails_cli_tool-1.0.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.8 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

ails_cli_tool-1.0.3-cp39-cp39-macosx_11_0_arm64.whl (868.8 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

ails_cli_tool-1.0.3-cp39-cp39-macosx_10_9_x86_64.whl (952.8 kB view details)

Uploaded CPython 3.9macOS 10.9+ x86-64

ails_cli_tool-1.0.3-cp38-cp38-win_amd64.whl (863.5 kB view details)

Uploaded CPython 3.8Windows x86-64

ails_cli_tool-1.0.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.9 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

ails_cli_tool-1.0.3-cp38-cp38-macosx_11_0_arm64.whl (901.3 kB view details)

Uploaded CPython 3.8macOS 11.0+ ARM64

ails_cli_tool-1.0.3-cp38-cp38-macosx_10_9_x86_64.whl (983.9 kB view details)

Uploaded CPython 3.8macOS 10.9+ x86-64

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.0.3-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 9dadb4c86b45a8153a1906f10ad5295b6a09f3b2a6163e9b538665d878c91332
MD5 cc800a7af4285cf2ca8c1288b47ffffe
BLAKE2b-256 74b286fd3726f4bea896a6f73af9a42e79c79be6a0ad012765032481409b88ee

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.0.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ae3484ed710b2383edac9580f1a1797c3ee34f68b2ce648e7a30b3a5f3d109aa
MD5 ad79ae83609d1225fea3f30e25d3b49a
BLAKE2b-256 2ee36c1f7405bfd7b90a04fb0335d3ce789714966d6a3824c4ec34d8b70fdc04

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.0.3-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 17730910d647a01a4825d1fab1906cd8190b0816be0ab80ea8c084a962cd381d
MD5 6eb2ea43c658e3ea55631254ef867cba
BLAKE2b-256 38d1928c965fceaf69f07537a823dd26ddbb84868b034790958650e8f6452dcb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.0.3-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 26d3b8e76ff4ed9f0282ae86539506132b50c9a2ac2482fbb1598430031c9d72
MD5 d5916ca59331845178cd21e0e8e62c42
BLAKE2b-256 15fe50e58c95e0dd1a52f2e0ce1f8ca3d076094ba79a55392334836fa1138679

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.0.3-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 2c84e831fe60dfe33bdae3520c822b752a801901bd22487e3c27d5816a201f86
MD5 7fb34b788288ed68b4d437e24a732464
BLAKE2b-256 7140100cb2f40fa06d11a0f9a672b3c2bb68b231540b0bf95406be3899154c64

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.0.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 469aa39faddc8b8e704525bb0a284d1cf6d6a1045b46c656b15e8743b48bb15e
MD5 f9d1548c9ad4ab64f0c179f8c312e6c9
BLAKE2b-256 a6a95734471c4ebb4de26dd9eea3c388965f97b7973add62f9a346ba4372bd27

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.0.3-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9305f15d0201bb076db6a91bf931d6f96c8c549de544d9da9584d830f7bcbfa7
MD5 7c4c1692d0776a1930bb50e54d8cfb24
BLAKE2b-256 3688cf5f87b665e0caabd56054641b05989d637fc13c33bbc448a3873d4b5029

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.0.3-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 b7a6fd4d55daaad9226402b52a84b2a6a67ed4249ee82eebc176a0c728a8ce7b
MD5 e8bf2e1cbf192bda5e068e2fab7f36bd
BLAKE2b-256 01f35f26d296305a3395708aa8c8c2fbc35a00cfefffd81a5236bb0798546c4e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.0.3-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 1d4eeaaced4ce05f2bfd550e4ece32314906a4187eba6bcbb857baf9cff0ccca
MD5 0ad5e38b7a6887f977636081f9904e83
BLAKE2b-256 daf6c79dc48445078e296ae5f3ac8b68d00bbf1f95f1254fe0aa6ff49f68e462

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.0.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2c640e11c09ffdd449e219cdb071443494075c067eaec8bc5135740eef6f2a6a
MD5 1eca38966dbc5c1ab11a1a9b599d8e0d
BLAKE2b-256 38d5d14fb09ce3a1331e592dddcf1b1ece71776bc8cf021326841f09d938bf66

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.0.3-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 510326d7ade3fcca36554ce301fe31aa5babd5fac6b3c8e5209067506f211213
MD5 51981d86c2ea786ce4d059b72def0981
BLAKE2b-256 ef440bdad2e5bfe147eb616849a0e0f8760c364bf385c7e651fbac4c792bc39e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.0.3-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 2cf248a16d61f68576bdb28b0c30f75091ca20ad3d270932fc4c78bac4745c0a
MD5 1e1d1e48cad66d2e4c5637ebc4add23b
BLAKE2b-256 6b321cf21b01381869dcfa4592a58e8222748ce08f41920f5dcadf5f4d04d270

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.0.3-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 640d081180e4e660fbaced63d29cb5bd56ddf619a473d214d36ac79ce133c626
MD5 c2c5692e68662e49edce56f32529dacc
BLAKE2b-256 d55d082cefff8ef573c549aa43884404ed144cfc9c6cda507a114be9d3eb90c2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.0.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 40cfb048edc004902851759a7cb6f232b4caef74ae70398217388342002c5064
MD5 73eed25d8b93d3f4d699ad3a3ba40e09
BLAKE2b-256 6746439bb9f626bef1bb7399e3bf5911209b81200c14eee84677c23959512e01

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.0.3-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7d916bb0d5265b64dba08fb34cc9d667f9fbea6351d02e83d49ef8f33ffa1e5c
MD5 0ad4ad8c0abe8814997ee5ff15dff392
BLAKE2b-256 08fcd2fb636c575f965463620dd07f4651b5efe710f0cd1464d872bb528c317b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.0.3-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 1f0bbe73523bb3570161d49fbd600d9df36037dadc0ae2a723b50d61ae64b586
MD5 b727dd6929030ee02cd99f055295bf17
BLAKE2b-256 5915428163b3b2fb4e0195eee148f7f595f3b7ad9b263070b8004d3ad7383fe3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.0.3-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 fdf47640e4a23cd48ae013d6286f81c0ed336931fef56599c55338f75d8a0ab7
MD5 09c571dd5b806f6c65cb557225133559
BLAKE2b-256 a3a6cb1b9044886d0e7e64551d477d21a5c1dcb7f1f1559d1154d07d95ec9ddb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.0.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 840d642a63d6c3e557e7c99d2831ca083bd4fc78c4caf59c74ecdc037d557069
MD5 3ec5ce936f84ff4c0c8687e72f1a9b7c
BLAKE2b-256 647541d5193218a2de76a0f8659ebffb5fa017d5354cf5aae2701f78952f2e7f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.0.3-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 42da9c84ebbf04f8753a3e55fc594078c3cd9bd4b3a4a1113854ae9f0e764125
MD5 13df39d8e0cc2516b2c8c725712b8673
BLAKE2b-256 539fdfafa522807c0b055b922a21e208de0c7f1fa8864e95f960ef27c1b9c0f4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ails_cli_tool-1.0.3-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 481105cf130c435ffd012301d6d21f3e7998a367cc3265ea2c539caca402ccb6
MD5 cd0caae90851973d67461ccaf4af06de
BLAKE2b-256 d4794c5b29821c17fe69856197140e6a873f5eb67ea0fc2cabe38d4cb6292ff8

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