Metadata-Version: 2.4
Name: nex-cls
Version: 1.0.0
Summary: Project-agnostic artifact ignore tool — scan, select, gitignore
Author: nexuss0781
License: MIT
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: questionary>=2.0.0
Requires-Dist: rich>=13.0.0

# nex-cls

Project-agnostic artifact ignore tool — scan, select, gitignore.

`nex-cls` is a standalone CLI that helps you keep junk out of any git repository. Run it in any project, browse the markdown files and folders, pick what you want ignored, and it appends the right root-anchored patterns to `.gitignore`.

**It never deletes or modifies any file** — it only writes to `.gitignore`.

## Install

```bash
pip install nex-cls
```

## Usage

```bash
cd ~/any/project
nex-cls                 # interactive browser
nex-cls --dry-run       # preview only, no changes
nex-cls --auto          # ignore all root-level .md files, keep folders
nex-cls --wildcard      # use /*.md instead of individual entries
nex-cls --path DIR      # scan a specific directory
```

### Interactive browser

```
┌───────────────────────────────────────────────┐
│ nex-cls — select artifacts to ignore          │
│   myproject/                                  │
│   [x] Research.md                             │
│   [ ] docs/  (2 .md)   [enter → open]         │
│   [x] work.md                                 │
└───────────────────────────────────────────────┘
  ↑/↓ move · space toggle · enter open folder · ← back · tab done · q quit
```

- Root-level `.md` files are listed individually (pre-selected).
- Folders containing `.md` files are shown as one entry (default keep) — press **Enter** to open them and select individual files or subfolders.
- **Selection persists across navigation** — opening/leaving folders never unselects anything.
- Press **Tab** to finish, then confirm the preview.

### What gets written

Patterns are root-anchored so only the exact things you chose are ignored:

```gitignore
/Research.md
/notes/scratch.md
/SPEC/            # whole folder, chosen by you
```

## Features

- Project-agnostic — works in any directory, no assumptions about your stack
- Never deletes or moves files — `.gitignore` only
- Interactive checkbox + folder browser
- Idempotent — re-running never duplicates entries
- Dry-run preview and `--auto` mode for scripts
- Skips `node_modules`, hidden dirs, and other junk automatically

## License

MIT
