Metadata-Version: 2.4
Name: gigaquads-installer
Version: 0.1.0
Summary: Keygen-style Ansible deployment installer framework
Home-page: https://github.com/gigaquads/gigaquads-installer-python.git
Author: Gigaquads
Author-email: what@gigaquads.com
License: MIT
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: POSIX :: Linux
Requires-Python: >=3.11
Description-Content-Type: text/markdown
Requires-Dist: pygame-ce>=2.4
Requires-Dist: pyyaml>=6.0

# Gigaquads Installer

Keygen-style Ansible deployment installer framework. Build interactive deployment UIs with a retro demoscene aesthetic — starfield backgrounds, neon glow effects, chiptune audio, and live terminal output.

## Features

- Pygame-based visual installer with cracktro/keygen aesthetic
- Screen wizard: splash → host config → component selection → deploy → results
- Live Ansible playbook execution with per-component progress tracking
- Host reachability probing and per-component host targeting
- Chiptune audio engine (PSQ) with song sequencer
- Configurable theme, components, and screen flow

## Quick Start

```bash
pip install gigaquads-installer
```

```python
from gigaquads_installer import InstallerApp, InstallerConfig

config = InstallerConfig(
    project_name="myproject",
    project_title="My Project Installer",
    splash_logo="M Y P R O J E C T",
    splash_credits=":::   My Project — Deployment System   :::",
    public_deploy_dir="../myproject-deploy",
    host_groups=["myproject_core", "myproject_gpu"],
    components=[
        {
            "id": "api",
            "label": "API Server",
            "description": "FastAPI backend",
            "tag": "api",
            "host_groups": ["myproject_core"],
            "port": 8000,
        },
        {
            "id": "worker",
            "label": "Worker",
            "description": "Background job processor",
            "tag": "worker",
            "host_groups": ["myproject_gpu"],
        },
    ],
)

app = InstallerApp(config)
app.run()
```

## Configuration

`InstallerConfig` fields:

| Field | Default | Description |
|-------|---------|-------------|
| `project_name` | `"myproject"` | Used for home dir (~/.myproject), branding |
| `project_title` | `"My Project Installer"` | Window title |
| `splash_logo` | `"M Y P R O J E C T"` | Large logo text on splash screen |
| `splash_credits` | `":::"` | Scrolling ticker text |
| `version` | `"1.0.0"` | Shown on splash screen |
| `screens` | `["splash", "deploy_config", "progress", "complete"]` | Screen flow |
| `playbooks` | `{"full": "site.yml", "sync": "sync-and-restart.yml"}` | Ansible playbook names |
| `home_dir` | `"~/.{project_name}"` | User config directory |
| `public_deploy_dir` | `""` | Path to Ansible deploy dir (relative to installer) |
| `host_groups` | `[]` | Ansible inventory groups |
| `components` | `[]` | Deployable components (see below) |
| `audio_enabled` | `True` | Enable chiptune audio |

## Components

Each component is a dict:

```python
{
    "id": "api",              # Unique identifier and Ansible tag
    "label": "API Server",    # Display name
    "description": "...",     # Short description
    "tag": "api",             # Ansible tag (usually same as id)
    "host_groups": ["core"],  # Which inventory groups can run this
    "port": 8000,             # Optional — shown in UI
}
```

## Custom Screens

Override any built-in screen by passing `screen_classes`:

```python
from gigaquads_installer.screens.splash import SplashScreen

class MySplash(SplashScreen):
    def draw(self, surface):
        # custom drawing
        super().draw(surface)

app = InstallerApp(config, screen_classes={"splash": MySplash})
```

## PSQ Audio Engine

The PSQ (Programmable Sound sQuencer) is a chiptune audio engine included with the framework. It provides oscillator-based synthesis, ADSR envelopes, and a JSON song format.

## Requirements

- Python 3.11+
- pygame-ce >= 2.4
- PyYAML >= 6.0
- Ansible (must be installed on the system for deployment)
- PortAudio (system library, for audio — `sudo apt install libportaudio2`)

## License

MIT
