Fun-CI
Opinionated local CI that checks your code before it leaves your machine. Runs a four-stage pipeline on every commit with strict time budgets, so your feedback loop stays fast.
How It Works
Fun-CI hooks into git and runs your pipeline locally:
- Lint + Build (parallel, 30s budget each) -- static analysis and compilation
- Slow suite (spawned in background, 5min budget) -- integration/end-to-end tests
- Fast suite (synchronous, 10s budget) -- unit tests
On pre-commit, the entire pipeline forks to the background so your commit is not blocked. On pre-push, lint, build, and fast suite must pass before the push proceeds. The slow suite always runs in the background.
Results are stored in a local SQLite database. A terminal dashboard lets you monitor pipeline status across branches.
Getting Started
gem install fun_ci
cd your-project
fun-ci init --everythingThis does three things:
- Detects your project type and creates
.fun-ci/with template scripts - Installs pre-commit and pre-push git hooks
- Verifies the setup is valid
fun-ci init has built-in templates for Ruby (Bundler), JVM (Gradle Kotlin, Gradle Groovy, Maven), but Fun-CI works with any project -- just write your own shell scripts.
Manual Setup
If you prefer to set things up step by step:
fun-ci init # Create .fun-ci/ with template scripts
fun-ci install-hooks # Install git hooks
fun-ci check # Verify everything is configuredThen edit the generated scripts in .fun-ci/ to match your project:
-
lint.sh-- linter/static analysis -
build.sh-- build/compile step -
fast.sh-- fast test suite (unit tests) -
slow.sh-- slow test suite (integration tests)
Each script receives the commit hash as its first argument.
Commands
fun-ci trigger <commit> <branch> Run the full pipeline
fun-ci trigger --no-validate <commit> <branch> Fork pipeline to background (used by pre-commit)
fun-ci console Launch the TUI dashboard
fun-ci init Scaffold .fun-ci/ for detected project type
fun-ci init --everything init + install-hooks + check in one step
fun-ci install-hooks Install pre-commit and pre-push hooks
fun-ci install-hooks pre-commit Install a single hook type
fun-ci check Verify .fun-ci/ setup
Git Hooks
After fun-ci install-hooks, two hooks are active:
pre-commit -- Runs fun-ci trigger --no-validate <commit> <branch>. This forks the pipeline into a background process and returns immediately, so commits are never blocked.
pre-push -- Runs fun-ci trigger <commit> <branch>. This validates the project config, runs lint + build + fast suite synchronously, and blocks the push if any stage fails. The slow suite runs in the background.
Admin Dashboard
fun-ci consoleOpens a terminal UI showing pipeline status across all branches. The header area displays animated ASCII art: a gentle starfield when idle, a rocket while pipelines run, and celebration/explosion animations on success or failure.
Navigation:
-
j/k-- scroll up/down -
c-- cancel a running pipeline -
q-- quit
Time Budgets
| Stage | Budget | Blocks |
|---|---|---|
| Lint | 30s | push |
| Build | 30s | push |
| Fast | 10s | push |
| Slow | 5min | nothing (background) |
If a stage exceeds its budget, it is killed and reported as timed out.
Development
bundle install
rake testChangelog
See CHANGELOG.md for release history.
License
MIT