Metadata-Version: 2.4
Name: copilot-sessions
Version: 2.2.0
Summary: Terminal tool to view and manage GitHub Copilot CLI sessions
Author: Haim Cohen
License: MIT
Project-URL: Homepage, https://github.com/sk3pp3r/copilot-sessions
Project-URL: Issues, https://github.com/sk3pp3r/copilot-sessions/issues
Project-URL: PyPI, https://pypi.org/project/copilot-sessions/
Keywords: copilot,github,cli,sessions,tui,terminal,dashboard
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Environment :: Console
Classifier: Topic :: Utilities
Classifier: Intended Audience :: Developers
Classifier: Development Status :: 4 - Beta
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: rich>=13.0.0
Requires-Dist: textual>=1.0.0
Dynamic: license-file

# 🤖 Copilot Sessions

A rich terminal UI (TUI) to view and manage your GitHub Copilot CLI sessions — track usage, costs, premium requests, kill stale sessions, and clean up old ones.

![Python](https://img.shields.io/badge/python-3.10+-blue)
![License](https://img.shields.io/badge/license-MIT-green)
[![PyPI](https://img.shields.io/pypi/v/copilot-sessions)](https://pypi.org/project/copilot-sessions/)

## Features

- **Full TUI** — interactive Textual-based terminal dashboard
- **List & filter** all Copilot CLI sessions with live search
- **View details** with full 💰 usage breakdown (tokens, models, premium requests, cost)
- **Active sessions** — see what's running live with `● LIVE` indicators
- **Ghost detection** — identify empty sessions (`👻 ghost`: 0 B, 0 Msgs)
- **Kill** stale/orphan live sessions (SIGTERM)
- **Delete & cleanup** old or ghost sessions in bulk
- **Sort** by clicking column headers (Status, Created, Size, etc.)
- **Export** sessions to CSV, JSON, or styled HTML report
- **Statistics** — total usage, premium reqs, disk, ghost count at a glance
- **Resume command** — copy-paste to jump back into any session
- **About & Help** screens built in (`i` / `?`)

## Installation

### pipx (Recommended)
```bash
pipx install copilot-sessions
```

### pip
```bash
pip install copilot-sessions
```

### From source
```bash
git clone https://github.com/sk3pp3r/copilot-sessions.git
cd copilot-sessions
pipx install .
```

## Usage

```bash
copilot-sessions              # launch TUI dashboard
copilot-sessions --version    # show version
copilot-sessions --help       # CLI help + keyboard shortcuts
```

### Keyboard Shortcuts

| Key | Action |
|-----|--------|
| `l` | List all sessions |
| `a` | Show active (live) sessions only |
| `f` | Toggle search / filter bar |
| `v` / `Enter` | View session detail + usage |
| `k` | Kill a live session |
| `d` | Delete an idle session |
| `c` | Cleanup ghost sessions (0 B, 0 Msgs) |
| `e` | Export (CSV / JSON / HTML) |
| `r` | Refresh session list |
| `?` | Help screen |
| `i` | About screen |
| `Escape` | Back |
| `q` | Quit |

**Mouse:** Click row to select · Click header to sort · Scroll wheel to navigate

## Requirements

- Python 3.10+
- [textual](https://github.com/Textualize/textual) + [rich](https://github.com/Textualize/rich) (installed automatically)
- GitHub Copilot CLI (`~/.copilot/session-state/` must exist)

## License

MIT © Haim Cohen 2026
