Live

Skips the noise. Keeps the structure.

File Structure Generator

A clean, always up-to-date map of your project, in one text file. It skips node_modules, virtual environments, build output and anything in your .gitignore.

›ext install AdithyaLochana.fs-generator

v0.1.0Free, MITVS Code 1.91+No data collected

my-app/ (on disk)
  • coverage2 filesskipped · built-in rule
  • dist2 filesskipped · built-in rule
  • node_modules240 filesskipped · built-in rule
  • public2 files
  • src5 files
  • tests2 files
  • .vscode1 fileskipped · built-in rule
  • .envskipped · .gitignore
  • .eslintrc.json
  • .gitignore
  • package-lock.jsonskipped · built-in rule
  • package.json
  • README.md
filestructure.txt
|-- .eslintrc.json
|-- .gitignore
|-- package.json
|-- public
|-- index.html
|-- styles.css
|-- README.md
|-- src
|-- index.js
|-- middleware
|-- logger.js
|-- routes
|-- auth.js
|-- users.js
|-- utils
|-- format.js
|-- tests
|-- auth.test.js
|-- users.test.js
Written when you open the folder. Watching for changes…Updates automatically

Updates on its own

Add, rename or delete a file and the tree is rewritten. It only writes when the content really changed.

|-- routes
|-- auth.js
|-- orders.js new

Skips the noise

Dependency, build, cache and IDE folders at any depth, lock files, compiled files and anything in .gitignore.

node_modules.venv__pycache__disttarget*.classpackage-lock.json

Stays out of Git’s way

Waits while Git switches branches, and offers to keep the file out of Git. It never commits or pushes.

M.gitignorestaged · not committed
Knows the noise inJavaScriptPythonPHPGoRuby.NETJavaFlutteriOSTerraform
PrivateRuns locallyNo data collectedNo network requestsMulti-root: a file per folder

Quick start

Three steps. The third one is waiting.

  1. 1

    Install the extension

    From the Marketplace, or with one command.

    ext install AdithyaLochana.fs-generator
  2. 2

    Open a project folder

    Any language. Nothing to set up first.

    my-appFile › Open Folder
  3. 3

    Find filestructure.txt

    It is in the root of the folder, already written.

    filestructure.txtready

Then use it for

Give a chat assistant the whole picture

Paste the tree instead of describing folders by hand. The assistant sees the layout and asks better questions.

Here’s my project. Where should a new orders route go?
|-- package.json
|-- public
|-- index.html
|-- src
|-- index.js
|-- routes
|-- auth.js
Next to auth.js in src/routes, then register it in src/index.js.

Settings

Try the settings on a real-looking project

Change anything on the left. The file on the right is rebuilt with the same rules the extension uses, and only your changes go into settings.json.

Tree style

Plain ASCII lines, or ├── and └── connectors.

fsGenerator.treeStyle

Folders first

List folders before files.

fsGenerator.foldersFirst

Depth

How many levels deep. 0 means no limit.

fsGenerator.maxDepth

3

Leave out

Extra patterns to skip.

fsGenerator.exclude

tests/

Keep anyway

Keep something the defaults or .gitignore would hide.

fsGenerator.include

Built-in skip list

node_modules, .venv, dist, caches and the rest.

fsGenerator.useDefaultExcludes

Respect .gitignore

Also skip what the root .gitignore lists.

fsGenerator.respectGitignore

Output file

Can include folders. A .md file gets a code block.

fsGenerator.outputFile

filestructure.txt20 lines
├── config
│ ├── __init__.py
│ ├── settings.py
│ ├── urls.py
│ └── wsgi.py
├── shop
│ ├── migrations
│ │ ├── __init__.py
│ │ └── 0001_initial.py
│ ├── templates
│ │ └── shop
│ ├── __init__.py
│ ├── admin.py
│ ├── models.py
│ ├── urls.py
│ └── views.py
├── .gitignore
├── manage.py
├── README.md
└── requirements.txt

Left out (6)

.venv/ 1800shop/__pycache__/ 1tests/ 2htmlcov/ 40.envdb.sqlite3

built-in.gitignoreexclude

settings.json"treeStyle": "tree", "foldersFirst": true, "maxDepth": 3, "exclude": ["tests/"]

Which rule wins

Rules apply in this order. A later one wins.

  1. Built-in list
  2. .gitignore
  3. exclude
  4. includewins

Pattern syntax

exclude and include use .gitignore syntax. Click one to try it.

All 12 settingsEvery one can be set per folder in settings.json.
  • autoUpdate

    default true

    Update the file automatically. When off, only Generate writes it.

  • outputFile

    default "filestructure.txt"

    File name, relative to the folder. A .md file gets a code block.

  • showStatusBar

    default true

    Show the Structure item in the status bar.

  • promptGitignore

    default true

    Point out once if the file is committed or not ignored, and offer a fix.

  • useDefaultExcludes

    default true

    Leave out the built-in list of dependency, build, cache and IDE folders.

  • respectGitignore

    default true

    Also leave out everything in the folder’s .gitignore.

  • exclude

    default []

    Extra patterns to leave out.

  • include

    default []

    Patterns to keep even if a rule would leave them out.

  • treeStyle

    default "simple"

    simple draws |-- lines, tree draws ├── and └──.

  • foldersFirst

    default false

    List folders before files.

  • maxDepth

    default 0

    How many levels deep. 0 means no limit.

  • maxEntries

    default 20000

    Stop after this many entries. 0 means no limit.

Status bar & Git

One click on Structure. It never commits.

The file changes whenever your files do, so in a Git project it would show up in every diff. Pick what you want from the menu. A choice only stages a change. You review and commit it yourself.

File Structure: my-app
File Structure options · my-app

Tree style · how the file looks, saved for this project

Layout

Git · kept out (listed in .gitignore)

More

⎇ main0 ⚠ 0
Pretend the file is already committedSee the ⚠ warning the status bar shows.

Keep out of Git

Add it to .gitignore

Adds one line to the project’s .gitignore and stages it. If your .gitignore has other uncommitted edits, it is left unstaged so your edits are never swept in.

.gitignore

node_modules/
+ filestructure.txt

Source Control · Staged changes

M.gitignore

Nothing committed or pushed. You review it.

Commands

Five commands, all under File Structure

Press Ctrl Shift P (Cmd on macOS) and type File Structure.

  • File Structure: GenerateWrites the file now.
  • File Structure: OptionsThe status bar menu: style, layout, Git, more.
  • File Structure: Copy to ClipboardCopies the tree without writing a file.
  • File Structure: Stop Tracking in GitStages the file’s removal from Git and ignores it. Nothing is committed.
  • File Structure: Show LogExplains what it found and decided, like why a Git prompt did or didn’t appear.

Good to know

Small print, made short

A folder called build, logs, out or temp is hidden

The built-in list matches names. Keep it with include.include: ["build"]

A plain bin folder is shown

It is often real source, in Go and Ruby. Hide it with exclude.exclude: ["bin/"]

Only the root .gitignore is read

Ones in subfolders are not.

Symlinked folders are listed, not followed

So a circular link can’t loop forever.

Needs a real folder on disk

It doesn’t run in virtual workspaces like github.dev.

v0.1.0LatestA big step up: configurable, many more languages, and out of Git’s way.
New
  • –Settings for file name, tree style, folders first, depth and size
  • –Respects .gitignore, plus your own exclude and include patterns
  • –Many more languages: Python, PHP, Go, Ruby, .NET, Java, Flutter, iOS, Terraform
  • –Status bar menu with Git choices, a ⚠ warning and a log
  • –Markdown output with a code block
Improved
  • –Only writes when the content changed, and waits while Git is busy
  • –Updates are grouped, so installs and builds don’t cause rescans
  • –Every folder in a multi-root workspace gets its own file
  • –Settings take effect without reloading
Fixed
  • –No error on startup with no folder open
  • –Skipped folders recognised at any depth
  • –Broken or circular symlinks can’t break the tree
  • –Output is sorted, so it stays the same between runs

v0.0.1First release.

Let the tree write itself

Free · MIT · VS Code 1.91+ · Works in any language

More products

All products