Metadata-Version: 2.4
Name: ops_eyes
Version: 0.1.2
Summary: Scenario Operations Tool — tmux-backed monitoring pane launcher
Author-email: Ashley Roeckelein <roeckelein@gmail.com>
License: Apache-2.0
Keywords: tmux,monitoring,ops,devops,terminal
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: System Administrators
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: POSIX :: Linux
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 :: System :: Monitoring
Classifier: Topic :: Terminals :: Terminal Emulators/X Terminals
Classifier: Topic :: Utilities
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pyyaml>=6.0
Requires-Dist: libtmux>=0.28
Dynamic: license-file

# ops_eyes

**ops_eyes** is a terminal-based scenario operations tool that launches and manages named sets of monitoring panes inside a [tmux](https://github.com/tmux/tmux/wiki) session.  An interactive curses selector lets you choose a scenario; each scenario brings up a pre-configured set of panes running whatever commands you need — `htop`, `journalctl -f`, `watch`, custom scripts, or anything else.

## Features

- Curses-based scenario selector (keyboard + mouse)
- Per-scenario pane layout, commands, and descriptions stored in YAML
- Live pane management inside tmux: add (F2), delete (F3), edit name/command (F4), zoom (F5), swap order (F6)
- Layout cycling (F1): tiled, even-horizontal, even-vertical, main-horizontal, main-vertical
- Geometry persistence: pane sizes and order saved back to YAML on exit
- Scenario management in selector: new (N), copy (C), edit metadata (E), delete (D), reorder (←/→), save (S), reload (R)
- First-run prompt to copy the bundled example config into `~/.ops_eyes.yaml`

## Requirements

- Python 3.8 or later
- **tmux 2.1 or later** — must be installed separately:
  ```
  sudo apt install tmux        # Debian / Ubuntu
  sudo dnf install tmux        # Fedora / RHEL
  brew install tmux            # macOS
  ```

## Installation

```bash
pip install ops_eyes
```

The `ops_eyes` command will be available immediately after install.

## Quick Start

```bash
# Launch the interactive selector
ops_eyes

# Jump directly to a named scenario
ops_eyes my-scenario

# List configured scenarios
ops_eyes --list

# Use a custom config file
ops_eyes --config /path/to/my.yaml
```

## Configuration

On first run, `ops_eyes` will offer to copy the bundled example config to `~/.ops_eyes.yaml`.  You can also create or edit `~/.ops_eyes.yaml` directly.

### Config format

```yaml
scenarios:
  my-servers:
    description: Production servers overview
    layout: tiled
    panes:
      - name: web-01
        command: ssh web-01 'htop'
      - name: db-01
        command: ssh db-01 'htop'
      - name: logs
        command: ssh web-01 'journalctl -f'
      - name: terminal
        command: ''          # interactive shell
```

**Top-level keys inside a scenario:**

| Key | Default | Description |
|---|---|---|
| `description` | `""` | Human-readable description shown in the selector |
| `layout` | `tiled` | Initial tmux layout: `tiled`, `even-horizontal`, `even-vertical`, `main-horizontal`, `main-vertical` |
| `panes` | `[]` | Ordered list of pane definitions |

**Pane keys:**

| Key | Description |
|---|---|
| `name` | Label shown in the pane border |
| `command` | Shell command to run; empty string for an interactive shell |

## Keyboard reference

### Selector (top level)

| Key | Action |
|---|---|
| ↑ / ↓, j / k | Navigate scenario list |
| ← / → | Move selected scenario up / down |
| Enter / double-click | Launch scenario |
| N | New scenario |
| C | Copy selected scenario |
| E | Edit scenario name / description |
| D | Delete scenario |
| S | Save config (opens file browser) |
| R | Reload config (opens file browser) |
| Q / F10 | Quit |

### Inside a scenario (tmux)

| Key | Action |
|---|---|
| F1 | Cycle layout |
| F2 | Add new terminal pane |
| F3 | Delete focused pane |
| F4 | Edit focused pane name / command |
| F5 | Zoom / unzoom focused pane |
| F6 | Swap focused pane with the next |
| F8 / F9 | Previous / next pane |
| F12 | Exit scenario → return to selector |

## License

Apache 2.0 — see [LICENSE](LICENSE).
