Code
How fastapi/typer is laid out, and where to start for common changes.
There is no import map for this report yet.
Where to start reading
- Repository root
- Repository root
- Likely public API
- Likely start-up file
- Likely start-up file
- Suggested starting pointAI
- Suggested starting pointAI
- Suggested starting pointAI
Find files for a task
AIAdd a new CLI command
- Create a new Python file in `docs_src/commands/` with a function decorated with `@app.command()`.
- Register the command with the main Typer app instance via `typer.run()` or explicit command registration.
Add environment variable support to a parameter
- Import `typer.Option` or `typer.Argument` and use the `envvar` parameter.
- Declare parameter with type hint and wrap default value in `typer.Option(..., envvar="ENV_VAR_NAME")`.
Add custom help text and parameter documentation
- Use the `help` parameter in `typer.Option()` or `typer.Argument()` to set parameter-level documentation.
- Add docstring to the command function for command-level help text.
- Use Rich markdown formatting in help strings for enhanced terminal rendering.
Implement command-level validation or setup with callbacks
- Create a callback function decorated with `@app.callback()` to run before command execution.
- Use the callback context to share state or perform global setup across commands.
Change the public API
Trace runtime behavior
Add or update tests
Change build or automation
RepoPilot lists up to 500 files, so a file missing here may still exist.
- Files marked “likely” are guessed from their names.
- The file list is newer than the written guide, so descriptions and suggested changes may describe older code.