LinuxCommandLibrary

gource

Visualize software repository history as an animation

TLDR

Run gource in a directory (if it isn't the repository's root directory, the root is sought up from there)

$ gource [path/to/repository]
copy

Run gource in the current directory, with a custom output resolution
$ gource -[width]x[height]
copy

Specify how long each day should be in the animation (this combines with -c, if provided)
$ gource [[-s|--seconds-per-day]] [seconds]
copy

Use fullscreen mode and a custom background color
$ gource [[-f|--fullscreen]] [[-b|--background-colour]] [hex_color_code]
copy

Specify the animation title
$ gource --title [title]
copy

Pause the animation
$ <Space>
copy

Adjust simulation speed
$ <[+|-]>
copy

Display help
$ gource [[-h|--help]]
copy

SYNOPSIS

gource [options...] [path]

PARAMETERS

-h, --help
    Display help and exit

-V, --version
    Output version information

-s <float>, --seconds-per-day <float>
    Seconds per day in animation (default 10)

--seconds-per-file <float>
    Minimum seconds per file visibility

--time-scale <float>
    Adjust animation speed

--start-date <date>
    Start date (YYYY-MM-DD or unix timestamp)

--stop-date <date>
    Stop date

--title <string>
    Title text overlay

-o <file>, --output <file>
    Output frames to file (e.g., for FFmpeg)

--fullscreen
    Fullscreen mode

--window-size <WxH>
    Set window resolution

--max-file-size <bytes>
    Hide files larger than this

--max-tree-size <pixels>
    Maximum tree depth in pixels

--load-config <file>
    Load settings from config file

--save-config <file>
    Save current settings to file

--camera-mode <mode>
    Camera modes: pan, orbit, boundary, track, etc.

--background-color <#RRGGBB>
    Background color

--font-color <#RRGGBB>
    Font color

--font-name <font>
    Font family

--font-size <size>
    Font size in pixels

--highlight-color <#RRGGBB>
    Color for highlighted paths

--bloom-intensity <float>
    Bloom/glow effect strength

--diff
    Enable diff visualization

--user-image-filename <file>
    Image file for all users

--user-{name}-image <file>
    Per-user avatar image

--hidden
    Include hidden files

--no-follow-links
    Don't follow symlinks

DESCRIPTION

Gource is a powerful tool for visualizing the history of software projects stored in version control systems like Git, Mercurial, Bazaar, and Subversion. It renders a dynamic 3D tree structure where the root represents the repository, directories branch out as trunks, and files appear as leaves.

Commits are depicted as rippling light effects traveling from the root along paths to modified files, highlighting changes over time. User avatars orbit around their contributions, with colors distinguishing different developers. Directory sizes scale based on content volume, and features like file drops, renames, and diffs add depth to the animation.

Ideal for presentations, code reviews, or exploring project evolution, gource supports real-time playback, video output via pipes to FFmpeg, and customizable parameters for timing, camera motion, colors, and bloom effects. It turns abstract commit logs into an engaging, intuitive 3D movie of code growth.

CAVEATS

Resource-intensive for large repositories; requires OpenGL 2.0+ and SDL2; real-time playback may stutter on slow hardware. Video output needs external tools like FFmpeg.

INPUT FORMATS

Supports Git (default), Mercurial (-l hg.log), Bazaar (-l bzr.log), SVN (--svn-repo), custom logs (-l file). Use git log --pretty=format:'committer %an %ci|%H|%an %s' --date-order > git.log for logs.

VIDEO OUTPUT EXAMPLE

gource -s 10 -1920x1080 -o - | ffmpeg -y -r 60 -f image2pipe -vcodec ppm -i - -vcodec libx264 ~/movie.mp4

HISTORY

Created by Andrew Petersen in 2009 as a Git visualization experiment. First public release 0.1 in 2010. Actively maintained on GitHub; version 0.54 (2022) added Vulkan support and modernized dependencies. Widely used for open-source project demos.

SEE ALSO

git(1), hg(1), bzr(1), ffmpeg(1)

Copied to clipboard