Skip to content

Projects

fw project structure

project structure

Print a project's folder tree, with what .gitignore hides

Added in 0.8.7.

Prints the project's folder tree and uploads nothing. PATH names one folder or several; the default is the project root, or the current folder outside a project.

Ignored files are listed by name with the rule that hides them, up to 20 per folder and rule. An ignored folder, a private folder (named private or ending in _private, or a settings folder marked private), and a folder below --depth show a file count instead of their contents. .git is left out, and symbolic links are files.

git decides what is ignored when the folder is in a work tree. Without git, fw reads the root .gitignore.

fw publish --structure publishes the tree, with each ignored file's name replaced by its rule and a count.

Usage

fw project structure [PATH...] [flags]

Options

Name Type Default Description
PATH... string
--depth int "0"

levels to list; deeper folders show a file count (default: no limit)

--exclude stringArray "[]"

leave out paths matching a gitignore-style glob; repeatable

--ignored string "rules"

rules shows ignored paths as their rules and file counts; hide leaves them out

--note stringArray "[]"

PATH=TEXT, a note beside a path; repeatable

Examples

fw project structure
fw project structure R data --depth 2
fw project structure --exclude renv --note R="Reusable functions"

Related reference

Search guides and reference for R, Python, Stata, the CLI, and Framework Cloud.