Skip to content

Quick Start

A minimal workflow to get deputy working with your project.

1. Initialize the database

deputy init

Creates .deputy.db in the current directory and auto-detects your virtual environment.

2. Sync your project

deputy sync

Parses all Python source files under the current directory and indexes them into the database. Incremental by default - only changed files are re-parsed.

3. Search for entities

deputy search "Model"

Finds all entities whose name or full path matches the regex Model.

4. Inspect an entity

deputy info deputy.core.create_context

Shows metadata, source location, and (for classes) inheritance information.

5. Resolve through imports

deputy resolve deputy.utils.storage.FileMetadata

Traces import aliases and re-exports to find the original definition.

Include dependencies

To also index third-party packages from your virtual environment:

deputy sync --sync-deps

Auto-sync

When auto-sync is enabled, search and info commands automatically re-sync if source files have changed:

deputy config auto_sync true