Skip to content

Getting Started

Welcome to Index Inspector! This guide will walk you through the end-to-end process of setting up the bot, configuring your project, and running your first scan.

In Telegram, search for @index_inspector_bot and send:

/start

This registers you with the bot and allows it to send you private messages and configuration links.

Section titled “Step 2: Link Your Group (Optional but Recommended)”

If you want to use the bot with your team:

  1. Invite Index Inspector to your Telegram group.
  2. In that group, run the command:
    /chat_id
  3. The bot will provide a chat_id. You will need this if you want to manage group projects privately.

You can set up a project directly in a group or privately.

Simply run /init inside your Telegram group.

If you want to manage a group’s project without cluttering the chat:

  1. Run /impersonate <group_chat_id> in a private chat with the bot.
  2. Run /init.

The /init command will send you a secure form link. Open it to provide your:

  • Project Name
  • Git URL
  • Scan Paths: (e.g., app, modules). No trailing slashes.
  • Migration Scan Paths: (e.g., database/migrations) to detect existing indexes.

After submitting the form, confirm your project is active by running:

/project_list

This will show your Project ID and Name. If you need to change anything later, use /update_project <project_id>.

Now, trigger the analysis by specifying a branch:

/scan <branch_name>

Scalability & Coverage

Scanning branches like main, production, or development provides the best coverage and context for your database architecture. Note that for larger projects, these scans may take slightly longer.

Static vs. Incremental Scans: Index Inspector can detect changes based on your commits. When you run a scan, the bot will ask if you want to perform a Full Scan (all files in scan paths) or a Partial Scan (only files changed in recent commits).

Once the scan finishes, retrieve your indexing recommendations:

/result

This command provides all recommendations gathered across your scans. You can re-run /scan at any time as your codebase evolves. If you’re ready to apply the changes, use /result_migration to get the ready-to-use migration file!