Skip to content

[FeatureRequest] Add -I option to exclude directories/files (like tree) #262

Open

Description

@SamDc73

Motivation

Sometimes when traversing large directories, we want to skip over things like:

  • node_modules
  • __pycache__

Example Usage

erd -I 'node_modules|__pycache__'

That would exclude all entries matching those names.

Optionally:

erd -I '*.log|*.tmp'

Would exclude all log or temp files.

This feature exists in the classic tree command:

tree -I 'node_modules|__pycache__'

--

I'm happy to work on this feature if you'd be open to it.

Activity

  1. CatBraaain commented on Mar 4, 2026

    @CatBraaain

    I also want the ignore option.

    FYI node_modules and __pycache__ are usually already included in .gitignore. I think the existing option below should work in your case:

    -i, --no-ignore
          Do not respect .gitignore files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions