CODEBASE ANALYSIS / DOCIFY CLI

How to analyze an unfamiliar codebase

When you join an existing project, start with a map rather than opening files at random. Docify can summarize a directory without running the application, helping you decide which source files to read next.

1. Get a project explanation without writing files

npx @autodocify/autodocs explain .

Run the command from the project's root with Node.js 20 or newer. The explanation goes to your terminal. Unlike analyze, explain does not generate documentation files.

The result summarizes the facts the inspection pipeline can detect: routes, models, services, integrations, database drivers and application layers. Counts and categories depend on the code present in that checkout, so treat an empty category as missing evidence rather than proof that a feature does not exist.

2. Use the structure to choose a starting point

Read the dependency and runtime declarations alongside the README. A manifest can tell you which packages are declared, but it cannot show whether every dependency is used or which configuration is active in production.

Choose one feature to trace, such as authentication or invoice creation. Locate its route or entry point, then inspect its local imports and associated data models. This focused path is more useful than assuming that directory names always match runtime layers.

3. Narrow the explanation to a source file

npx @autodocify/autodocs explain src/services/payment.ts

Replace the example path with a file that exists in your project. File explanations can show purpose, operations, direct imports, local importers, storage references and recognized SDK calls.

JavaScript and TypeScript have deeper syntax and cross-file call analysis. Coverage for other languages and frameworks varies. Dynamic imports, injected clients and custom resolution rules may require reading the source directly.

4. Ask one concrete question

npx @autodocify/autodocs ask "How does auth work?"

A focused question can point you toward relevant source, documentation and configuration. Read the answer together with its file references and verdict.

An inferred layer order or call relationship is not a recorded request trace. Conditional branches can appear together, and unresolved definitions are not evidence of successful execution. Use tests, logs or a debugger when you need runtime confirmation.

5. Save the map when you need a durable reference

npx @autodocify/autodocs analyze .

When the overview is useful, generate Markdown documentation and review it with another developer. This turns your first exploration into an onboarding reference instead of leaving the findings in terminal scrollback.