Visualization — aic map

Generate SVG visualizations of the codebase structure and commit history.

Subcommands

aic map tree

Produces a squarified treemap of the file hierarchy, sized by line count and coloured by top-level directory.

aic map tree                     # writes aic-treemap.svg
aic map tree -o treemap.svg      # custom output path
FlagDefaultDescription
-oaic-treemap.svgOutput file path
--no-aioffSkip AI cluster annotation (reserved)
--themedefault-lightColor theme

aic map history

Draws a vertical zigzag timeline of recent commits. Cards alternate left and right of a central line, with date circles on the spine, full commit messages (subject and body), and file-change dots coloured by directory.

aic map history                  # last 20 commits
aic map history -n 40            # last 40 commits
FlagDefaultDescription
-oaic-timeline.svgOutput file path
-n20Number of commits to include
--themedefault-lightColor theme

aic map heat

Renders a horizontal bar chart of files sorted by modification frequency, coloured on a cold-to-hot scale.

aic map heat                     # last 50 commits
aic map heat -n 200 -o heat.svg  # deeper history
FlagDefaultDescription
-oaic-heatmap.svgOutput file path
-n50Number of commits to analyze
--themedefault-lightColor theme

aic map activity

Generates a GitHub-style contribution grid from commit timestamps over the past 52 weeks.

aic map activity                 # last 500 commits
aic map activity -n 1000         # larger sample
FlagDefaultDescription
-oaic-activity.svgOutput file path
-n500Number of commits to load
--themedefault-lightColor theme

Themes

All map subcommands accept a --theme flag. Available themes:

ThemeVariant
github-lightLight (default)
github-darkDark
classic-lightLight
classic-darkDark
solarized-lightLight
solarized-darkDark
monokaiDark
draculaDark

Theme definitions live in the themes/ directory as TOML files. Each theme controls background, text, border, accent, and gradient colours.

Configuration

Create a .aicommit-map file in the repository root to set defaults for all map subcommands:

theme = "dracula"
history_commits = 30
heat_commits = 100
activity_commits = 1000
KeyDefaultDescription
themegithub-lightDefault color theme
history_commits20Default commit count for aic map history
heat_commits50Default commit count for aic map heat
activity_commits500Default commit count for aic map activity

CLI flags (--theme, -n) override the config file when specified.

Output

All subcommands produce standalone SVG files that open in any modern browser. The SVGs use the system font stack and look good at any zoom level.

Future

  • AI-annotated clusters: the tree subcommand will optionally pass file groupings to the configured AI provider to generate short descriptive labels for each cluster.