Skip to content

hocestnonsatis/trigd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Trigd

Release CI License: MIT Electron Svelte TypeScript Platforms GitHub issues GitHub stars

Cross-platform Electron desktop app that watches GitHub repositories and runs shell commands or AI CLI tools when matching events occur.

Trigd screenshot

Features

  • GitHub repository management with manual entry or GitHub CLI (gh) import
  • Automatic local workspace clone and sync for AI CLI rules
  • Event rules for pull requests, pushes, issues, comments, releases, and workflow runs
  • Cron scheduled jobs for recurring shell or AI CLI automation
  • Shell commands and AI CLI rules (Cursor, Codex, Claude)
  • Conditional rule filters (branch, actor, label, changed paths)
  • Rule presets and edit flows for rules and cron jobs
  • Local GitHub webhook server for near real-time triggers
  • Command templates with variables like {{owner}}, {{repo}}, {{pr_number}}, {{pr_title}}
  • Desktop notifications and optional external webhook notifications
  • Config import/export and execution queue with concurrency limits
  • SQLite-backed event deduplication and command execution logs
  • Encrypted GitHub token storage via Electron safeStorage
  • System tray support with pause/resume polling
  • English and Turkish UI
  • Automatic updates from GitHub Releases
  • Linux, macOS, and Windows builds via electron-builder

How it works

Trigd polls the GitHub REST API (GET /repos/{owner}/{repo}/events) on a configurable interval. On the first poll for a repository, existing events are recorded as a baseline so old activity does not trigger commands. New events are mapped to internal event types and matched against enabled rules.

Polling is not real-time. The default interval is 60 seconds.

Setup

Requirements

  • Node.js 20+
  • npm

Install

npm install --ignore-scripts
node node_modules/electron/install.js
npx electron-builder install-app-deps

better-sqlite3 is rebuilt for Electron in the last step. A plain npm install may fail on very new system Node versions.

Development

npm run dev

Build

npm run build
npm run build:linux
npm run build:win
npm run build:mac

Releases

Pre-built installers are published on GitHub Releases.

Platform Artifact
Linux .AppImage, .deb
macOS .dmg
Windows -setup.exe (NSIS)

Publish a new release

  1. Update CHANGELOG.md and bump the version in package.json.
  2. Commit the changes on main.
  3. Create and push a version tag:
git tag v1.0.1
git push origin v1.0.1

The Release workflow builds on Linux, macOS, and Windows and uploads artifacts to the GitHub release for that tag.

Packaged builds check GitHub Releases for updates on startup and can install them from Settings → Updates.

GitHub token

Create a GitHub Personal Access Token with:

  • public_repo for public repositories
  • repo for private repositories

Add the token in Settings inside the app.

Example rule

Event: pull_request.opened

Command:

notify-send "PR #{{pr_number}} in {{owner}}/{{repo}}: {{pr_title}}"

Template variables

  • {{owner}}, {{repo}}, {{event_type}}, {{actor}}
  • {{pr_number}}, {{pr_title}}, {{branch}}, {{sha}}
  • {{issue_number}}, {{issue_title}}, {{comment_body}}
  • {{release_tag}}, {{workflow_name}}, {{workflow_conclusion}}
  • {{check_conclusion}}, {{ref_type}}, {{ref_name}}
  • {{labels}}, {{changed_files}}
  • Cron: {{cron_name}}, {{cron_schedule}}, {{timestamp}}

Cron jobs

Create scheduled jobs under Schedule to run shell or AI CLI commands on a cron expression. Link an optional repository for workspace-aware AI CLI runs.

Webhooks

Enable the local webhook server in Settings and configure GitHub repo webhooks to:

http://127.0.0.1:9876/webhook/{owner}/{repo}

Use the generated secret for HMAC signature verification.

Security note

Rules execute arbitrary shell commands on your machine. Only add repositories and commands you trust. See SECURITY.md for vulnerability reporting.

Project structure

  • src/main — Electron main process, polling, command execution, storage
  • src/preload — IPC bridge exposed as window.trigd
  • src/renderer — Svelte UI
  • src/shared — shared TypeScript types

Contributing

Contributions are welcome. Please read CONTRIBUTING.md before opening a pull request.

This project follows the Contributor Covenant Code of Conduct.

License

MIT

About

Cross-platform Electron app that runs shell commands and AI CLI tools on GitHub repo events

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors