Metadata-Version: 2.4
Name: filetree-cli
Version: 0.1.0
Summary: Generate ASCII or Markdown directory trees with smart filtering
Project-URL: Homepage, https://github.com/marcusbuildsthings-droid/filetree
Project-URL: Repository, https://github.com/marcusbuildsthings-droid/filetree
Project-URL: Issues, https://github.com/marcusbuildsthings-droid/filetree/issues
Author-email: Marcus <marcus.builds.things@gmail.com>
License-Expression: MIT
License-File: LICENSE
Keywords: ascii,cli,directory,file,markdown,structure,tree
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Documentation
Classifier: Topic :: Utilities
Requires-Python: >=3.8
Requires-Dist: click>=8.0.0
Description-Content-Type: text/markdown

# filetree

Generate ASCII or Markdown directory trees with smart filtering.

## Installation

```bash
pip install filetree-cli
```

## Usage

```bash
# Basic usage - current directory
filetree

# Specific path with depth limit
filetree ~/projects -d 2

# Markdown output for documentation
filetree . --md

# Ignore additional patterns
filetree . -I "*.log" -I "tmp"

# Show only directories
filetree . -D

# Show hidden files with sizes and stats
filetree . -a --size --stats

# JSON output for programmatic use
filetree . --json
```

## Features

- **Smart defaults**: Ignores common cruft (.git, node_modules, __pycache__, etc.)
- **Depth limiting**: Control how deep the tree goes
- **Pattern ignoring**: Glob patterns to exclude files/directories
- **Multiple formats**: ASCII (default), Markdown, or JSON
- **Size display**: Optional file size annotations
- **Statistics**: File/directory counts and total size
- **Hidden files**: Toggle visibility of dotfiles

## Default Ignored Patterns

These patterns are ignored by default (use `--no-default-ignore` to include them):

- `.git`, `.svn`, `.hg`
- `__pycache__`, `*.pyc`
- `node_modules`
- `.venv`, `venv`, `.env`
- `*.egg-info`, `.pytest_cache`, `.mypy_cache`
- `dist`, `build`
- `.idea`, `.vscode`
- `.DS_Store`

## Examples

### Basic Tree
```
$ filetree
myproject/
├── README.md
├── pyproject.toml
└── src/
    ├── __init__.py
    └── main.py
```

### Markdown Output
```
$ filetree --md
```
```
myproject/
├── README.md
├── pyproject.toml
└── src/
    ├── __init__.py
    └── main.py
```

### With Stats
```
$ filetree --stats --size
myproject/
├── README.md (1.2KB)
├── pyproject.toml (856B)
└── src/
    ├── __init__.py (45B)
    └── main.py (2.3KB)

1 directories, 4 files
Total size: 4.4KB
```

### JSON Output
```
$ filetree --json
{
  "root": "/path/to/myproject",
  "tree": [
    "myproject/",
    "├── README.md",
    "├── pyproject.toml",
    "└── src/",
    "    ├── __init__.py",
    "    └── main.py"
  ],
  "stats": {
    "directories": 1,
    "files": 4,
    "total_size": 4501,
    "total_size_human": "4.4KB"
  }
}
```

## Options

| Option | Description |
|--------|-------------|
| `-d, --depth N` | Maximum depth (-1 for unlimited) |
| `-I, --ignore PATTERN` | Patterns to ignore (repeatable) |
| `--no-default-ignore` | Don't use default ignore patterns |
| `-a, --all` | Show hidden files/directories |
| `-D, --dirs-only` | Show only directories |
| `-s, --size` | Show file sizes |
| `--stats` | Show summary statistics |
| `--md, --markdown` | Output as markdown code block |
| `--json` | Output as JSON |
| `--version` | Show version |

## For AI Agents

See [SKILL.md](SKILL.md) for agent-optimized documentation.

## License

MIT
