Game pack for League of Legends and TFT integration with Clip Companion.
- Live Events: Real-time game events (kills, dragons, barons, TFT placements, etc.)
- Match History: Automatic match tracking and statistics
- Clip Triggers: Configurable triggers for automatic clip recording
- TFT Support: Full Teamfight Tactics integration (same client, different UI)
- LCU Events: Client connection, queue, champion select, and phase change events
pack-league/
├── config.json # Pack configuration (version, stage config, triggers)
├── daemon/ # Rust backend (runs as subprocess)
│ ├── Cargo.toml
│ └── src/
│ ├── main.rs # IPC entry point
│ ├── integration.rs # LCU + Live Client API integration
│ ├── lcu.rs # League Client API
│ └── ...
├── frontend/ # React components
│ ├── package.json
│ ├── index.ts # Pack entry point
│ ├── MatchCard.tsx # League match card
│ ├── TFTMatchCard.tsx # TFT match card
│ └── ...
└── events-seed.json # Event definitions
cd daemon
cargo build --releasecd frontend
pnpm install
pnpm buildThis pack communicates with the main Clip Companion daemon via NDJSON over stdin/stdout using the gamepack-runtime crate.
use gamepack_runtime::{run_gamepack, GamepackHandler};
struct LeagueHandler { /* ... */ }
impl GamepackHandler for LeagueHandler {
fn detect_running(&self) -> bool { /* LCU lockfile detection */ }
fn poll_events(&mut self) -> Vec<GameEvent> { /* Live Client API */ }
// ...
}
fn main() {
run_gamepack(LeagueHandler::new());
}Releases are fully automated. Just push to main:
git add -A && git commit -m "feat: your changes"
git pushGitHub Actions automatically:
- Bumps the patch version in
config.json(0.1.1 → 0.1.2) - Commits with
[skip ci]to avoid infinite loops - Creates a git tag (v0.1.2)
- Builds daemon for all platforms (macOS arm64/x64, Linux x64, Windows x64)
- Builds frontend.js bundle
- Creates checksums.txt
- Publishes GitHub release with all artifacts
- Sends webhook to
packs-indexto update the version
For minor/major version bumps, manually edit config.json:
# Edit config.json to set desired version
git add config.json && git commit -m "chore: bump version to 0.2.0"
git pushThe release workflow requires one secret:
| Secret | Purpose |
|---|---|
PACKS_INDEX_TOKEN |
Personal Access Token to trigger packs-index update |
Setting up PACKS_INDEX_TOKEN:
- Go to GitHub → Settings → Developer settings → Fine-grained tokens
- Create a new token with:
- Repository:
clip-companion/packs-index - Permissions: Contents (read/write)
- Repository:
- Add the token as a secret in this repository:
gh secret set PACKS_INDEX_TOKEN # Paste the token when prompted
- Main app fetches
packs-indexrepository to get available packs - Compares installed version vs index version
- Shows "Update" button in the Packs UI when versions differ
- Update downloads new artifacts from GitHub release
Each release includes:
daemon-darwin-arm64- macOS Apple Silicondaemon-darwin-x64- macOS Inteldaemon-linux-x64- Linux x64daemon-win32-x64.exe- Windows x64frontend.js- React component bundlechecksums.txt- SHA256 checksums
To verify the release configuration is correct before pushing:
cd frontend
pnpm test:ciThis checks that:
- Cargo.toml uses git URL (not local path) for dependencies
- package.json uses git URL (not file: path) for dependencies
- Workflow files are configured correctly
MIT