Metadata-Version: 2.4
Name: eaisports
Version: 0.1.20
Summary: AI-powered game building CLI — creators use their own AI compute to build browser games, then publish to eaisports.ai
Author: EAISports
License-Expression: MIT
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: openai
Requires-Dist: python-dotenv
Requires-Dist: fire
Requires-Dist: httpx
Requires-Dist: rich
Requires-Dist: tenacity
Requires-Dist: pyyaml
Requires-Dist: requests
Requires-Dist: jinja2
Requires-Dist: pydantic>=2.0
Requires-Dist: prompt_toolkit
Requires-Dist: firecrawl-py
Requires-Dist: fal-client
Requires-Dist: edge-tts
Requires-Dist: litellm>=1.75.5
Requires-Dist: typer
Requires-Dist: platformdirs
Requires-Dist: PyJWT[crypto]
Provides-Extra: dev
Requires-Dist: pytest; extra == "dev"
Requires-Dist: pytest-asyncio; extra == "dev"
Provides-Extra: cron
Requires-Dist: croniter; extra == "cron"
Provides-Extra: cli
Requires-Dist: simple-term-menu; extra == "cli"
Provides-Extra: tts-premium
Requires-Dist: elevenlabs; extra == "tts-premium"
Provides-Extra: mcp
Requires-Dist: mcp>=1.2.0; extra == "mcp"
Provides-Extra: all
Requires-Dist: eaisports[dev]; extra == "all"
Requires-Dist: eaisports[cron]; extra == "all"
Requires-Dist: eaisports[cli]; extra == "all"
Requires-Dist: eaisports[tts-premium]; extra == "all"
Requires-Dist: eaisports[mcp]; extra == "all"
Dynamic: license-file

# EAISports CLI

AI-powered game building CLI. Creators use their own AI compute (via OpenRouter, Nous, or other providers) to build browser games from a text description, then publish to [eaisports.ai](https://eaisports.ai).

## Install

```bash
pip install eaisports
```

Requires Python 3.11+.

## Quickstart

```bash
# 1. Set up API key, model, and wallet
eaisports init

# 2. Build a game
eaisports build my-trivia-game
# or describe what you want
eaisports build -d "a space shooter with power-ups"

# 3. Preview locally
eaisports preview my-trivia-game

# 4. Deploy to eaisports.ai
eaisports push my-trivia-game
```

## Configuration

Config lives in `~/.eaisports/`. Run `eaisports init` for interactive setup, or set environment variables:

```bash
# Required: OpenRouter API key (https://openrouter.ai/keys)
export OPENROUTER_API_KEY=sk-or-...

# Optional: default model (default: anthropic/claude-opus-4.6)
export LLM_MODEL=anthropic/claude-opus-4.6
```

Multiple inference providers are supported — OpenRouter, Nous Research, OpenAI Codex, and custom endpoints. Run `eaisports model` to switch providers interactively.

## Commands

### Core

| Command | Description |
|---------|-------------|
| `eaisports init` | First-run setup wizard (API key, wallet, model) |
| `eaisports build [slug]` | Build a game with AI assistance |
| `eaisports build -d "desc"` | Build from a text description |
| `eaisports build --skill trivia` | Build using a skill template |
| `eaisports build --resume my-game` | Resume a previous build session |
| `eaisports preview [slug]` | Launch local Vite dev server |
| `eaisports push [slug]` | Deploy game to eaisports.ai |
| `eaisports stats` | View creator dashboard (games, visitors) |

### Interactive Agent

| Command | Description |
|---------|-------------|
| `eaisports chat` | Interactive chat session with the AI agent |
| `eaisports chat -q "query"` | Single-query (non-interactive) mode |
| `eaisports -c` | Continue the most recent session |
| `eaisports -c "session name"` | Continue a session by title |
| `eaisports --resume SESSION_ID` | Resume a session by ID |

### Skills

| Command | Description |
|---------|-------------|
| `eaisports skills list` | List installed game skills |
| `eaisports skills info <name>` | Show skill details |
| `eaisports skills init <name>` | Create a new skill template |
| `eaisports skills search <query>` | Search skill registries |
| `eaisports skills browse` | Browse all available skills (paginated) |
| `eaisports skills install <id>` | Install a skill from a registry |
| `eaisports skills inspect <id>` | Preview a skill without installing |
| `eaisports skills audit` | Re-scan installed hub skills for security |
| `eaisports skills publish <path>` | Publish a skill to a registry |

### Configuration & Diagnostics

| Command | Description |
|---------|-------------|
| `eaisports setup` | Interactive setup wizard |
| `eaisports model` | Select default model and provider |
| `eaisports config show` | View current configuration |
| `eaisports config set <key> <val>` | Set a configuration value |
| `eaisports login` | Authenticate with an inference provider |
| `eaisports logout` | Clear stored authentication |
| `eaisports doctor` | Check configuration and dependencies |
| `eaisports status` | Show component status |

### Sessions & History

| Command | Description |
|---------|-------------|
| `eaisports sessions list` | List recent sessions |
| `eaisports sessions browse` | Interactive session picker with search |
| `eaisports sessions rename <id> <title>` | Rename a session |
| `eaisports sessions export <file>` | Export sessions to JSONL |
| `eaisports sessions prune` | Delete old sessions |

### Other

| Command | Description |
|---------|-------------|
| `eaisports cron list` | List scheduled tasks |
| `eaisports tools` | Configure which tools are enabled |
| `eaisports insights` | Token usage analytics (last 30 days) |
| `eaisports version` | Show version |
| `eaisports update` | Update to latest version |
| `eaisports uninstall` | Uninstall EAISports |

## Skills

Skills are reusable game templates that seed the AI build process. Bundled skills:

- **interactive-fiction** — Text-based narrative games with branching storylines
- **trivia** — Quiz games with categories, scoring, and timers
- **puzzle-logic** — Logic puzzles, pattern matching, and brain teasers
- **game-ui** — Reusable UI components (menus, HUDs, leaderboards)
- **mobile** — Mobile-optimized game templates

Skills live in `~/.eaisports/skills/{name}/SKILL.md` with YAML frontmatter. You can create your own, install from online registries (official, GitHub, community), or let the agent auto-extract reusable patterns from your builds.

## Wallet & Deployment

Games are deployed to [eaisports.ai](https://eaisports.ai) via `eaisports push`. Creator identity is backed by a Solana wallet — run `eaisports init` to connect yours via a browser-based device code flow. The CLI bundles the Vite build output, verifies it, and uploads with JWT authentication.

## Agent & Tools

The interactive agent (`eaisports chat`) has access to 40+ tools:

- **File & code** — Read, write, patch, and search files
- **Terminal** — Execute commands across local, Docker, Modal, SSH, Singularity, and Daytona backends
- **Web & browser** — Search the web, crawl pages (Firecrawl), and automate browsers
- **Skills** — List, view, create, and manage game skills with security scanning
- **Memory** — Persistent agent memory across sessions
- **MCP** — Connect external Model Context Protocol servers
- **Planning** — Todo lists, filesystem checkpoints, and rollback

The agent supports OpenAI-compatible tool calling, automatic context compression, and session persistence (SQLite + FTS5 search).

## Architecture

```
eaisports_cli/         CLI commands (init, build, preview, push, stats, skills, config)
agent/                 AI agent runtime (prompt building, context compression, sessions)
tools/                 40+ tools (file, terminal, web, browser, skills, memory, MCP)
tools/environments/    Execution backends (local, docker, modal, singularity, ssh, daytona)
skills/                Bundled game skill templates
cron/                  Scheduled task system
run_agent.py           AIAgent class (OpenAI-compatible tool calling loop)
cli.py                 Interactive terminal UI (Rich + prompt_toolkit)
eaisports_state.py     Session management (SQLite + FTS5)
```

## Development

```bash
# Install dev dependencies
pip install -e ".[dev]"

# Run tests
python -m pytest tests/ -x

# Import check
python -c "import eaisports_cli"

# Smoke test
python -m eaisports_cli.main --help
```

## Acknowledgments

EAISports is built on the shoulders of [Hermes Agent](https://github.com/NousResearch/hermes-agent) by [Nous Research](https://nousresearch.com/). The core agent runtime, tool-calling loop, memory system, and session management are derived from their open-source work under the MIT License.

## License

MIT — see [LICENSE](./LICENSE) for details.
