CODEBASE QUESTIONS / DOCIFY CLI

How to ask questions about your codebase

Use a codebase question to narrow your search to the implementation you need to read. Docify ask combines local retrieval and static analysis. It is not a hosted AI chat service or a substitute for reviewing the source.

1. Ask from the project root

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

Use Node.js 20 or newer and run this command inside a local project checkout. The command searches source, existing documentation and configuration for evidence relevant to your question.

No API key or hosted model is needed. The command does not upload your code, run the application, or write documentation or index files. npx may fetch the CLI package from npm on its first run.

2. Select a different project when needed

npx @autodocify/autodocs ask "How does auth work?" --path ../your-project

The --path option selects the directory to search. It is not part of the question. Quote the question so your shell passes it as one argument. In automation, always supply the question explicitly.

Use source vocabulary when you can: a route name, service class, table, provider or business feature. A question such as where is Redis caching configured gives the search more concrete evidence to work with than a broad request to explain everything.

3. Read the answer, references and verdict together

The answer points to detected relationships and source locations. File and line references let you open the implementation and check the context. The verdict explains what the available evidence can establish.

When there is insufficient evidence, narrow the question or open the likely source file with explain. A missing result can mean that a declaration was excluded, named differently or not recognized by the current analysis.

4. Distinguish source relationships from runtime behavior

JavaScript and TypeScript support deeper cross-file call relationships. Other source languages may produce a source map rather than a call tree. These outputs describe detected code relationships, not guaranteed execution order.

Dynamic dispatch, framework injection, external library internals and environment-specific behavior can remain unresolved. Broad design questions may require human context even when the relevant code is present.

5. Review output before sharing it

Source references, names and documented intent can contain private project details. File exclusions and redaction are best-effort, so review the result before pasting it into a public issue or message.

Use analyze when you need Markdown documentation to keep in the repository, and explain when you want a direct summary of one file or directory without asking a question.