Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

stacy deps

Show dependency tree for Stata scripts

Synopsis

stacy deps <SCRIPT> [OPTIONS]

Description

Analyzes a Stata script to find all files it depends on (via do, run, include) and package dependencies (via require). Shows a tree view of the dependency graph, detects circular dependencies, and identifies missing files.

require statements (including cap require and capture require) are recognized as package dependencies and shown as leaf nodes in the tree.

Arguments

ArgumentDescription
<SCRIPT>Script to analyze (required)

Options

OptionDescription
--flatShow flat list instead of tree

Examples

Show dependency tree

stacy deps main.do

Show flat list

stacy deps --flat main.do

Exit Codes

CodeMeaning
0Analysis complete
3Script not found

See Exit Codes Reference for details.

See Also