Metadata-Version: 2.4
Name: django-shreck
Version: 0.1.4
Summary: A rich TUI replacement for Django's shell_plus — browse models, querysets, and management commands from your terminal.
Project-URL: Homepage, https://github.com/belda/django-shreck
Project-URL: Repository, https://github.com/belda/django-shreck
Project-URL: Issues, https://github.com/belda/django-shreck/issues
Author: belda
License-Expression: MIT
License-File: LICENSE
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Framework :: Django
Classifier: Framework :: Django :: 4.2
Classifier: Framework :: Django :: 5.0
Classifier: Framework :: Django :: 5.1
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.11
Requires-Dist: django>=4.2
Requires-Dist: ptpython>=3.0.0
Requires-Dist: textual>=1.0.0
Provides-Extra: dev
Requires-Dist: pytest-django>=4.8; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: ruff>=0.9.0; extra == 'dev'
Description-Content-Type: text/markdown

# 🟢 django-shreck

> A rich TUI replacement for Django's `shell_plus` — browse models and querysets from your terminal.

![Python 3.11+](https://img.shields.io/badge/python-3.11+-blue.svg)
![Django 4.2+](https://img.shields.io/badge/django-4.2+-green.svg)
![License: MIT](https://img.shields.io/badge/license-MIT-yellow.svg)

## Screenshots

<p>
  <img src="docs/Screenshot_2026-03-21_07-56-03.png" width="48%" alt="Shell and table view" />
  <img src="docs/Screenshot_2026-03-21_07-57-53.png" width="48%" alt="Detail view" />
</p>
<p>
  <img src="docs/Screenshot_2026-03-21_07-58-18.png" width="48%" alt="Inline editing" />
  <img src="docs/Screenshot_2026-03-21_07-58-58.png" width="48%" alt="Side-by-side compare" />
</p>

> 🎬 [Watch the screencast](docs/screencast.mp4)

## Features

- **Auto-imported models** — All your Django models are available immediately with tab completion
- **Interactive shell** — Full Python REPL powered by ptpython
- **Scrollable table view** — QuerySets are rendered as rich, scrollable tables
- **Detail browser** — Single objects displayed as navigable key-value detail views
- **Inline editing** — Edit and save single model instances directly from the TUI
- **Side-by-side compare** — Two objects rendered in a diff-style comparison view
- **Admin integration** — Single keypress opens the Django admin for any object or queryset

## Installation

```bash
pip install django-shreck
```

Add to your `INSTALLED_APPS`:

```python
INSTALLED_APPS = [
    # ...
    "django_shreck",
]
```

## Usage

```bash
python manage.py shreck
```

### Keybindings

| Key | Action |
|-----|--------|
| `q` | Quit |
| `a` | Open admin for current object/queryset |
| `Enter` | Execute shell input |
| `↑/↓` | Browse fields / scroll table |
| `Tab` | Auto-complete |

## Development

```bash
git clone https://github.com/belda/django-shreck.git
cd django-shreck
python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
make test
```

## License

MIT

