You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[](https://github.com/FvdHMBAI/agent-stack)
3
+
<palign="center">
4
+
<ahref="https://github.com/FvdHMBAI/agent-stack"><imgsrc="https://img.shields.io/badge/Part%20of-AgentStack-blue?style=flat-square"alt="Part of AgentStack"></a>
5
+
</p>
6
+
7
+
<palign="center">
8
+
<strong>Your codebase improves while you sleep.</strong>
I used to start every Monday reviewing the same lint errors, the same type mismatches, the same outdated dependencies. Now I wake up to a branch per fix, each one verified, each one ready to merge.
6
28
7
-
Night Shift scans your repositories overnight, finds lint errors, TypeScript issues, security vulnerabilities, and documentation gaps — fixes them automatically, commits each fix to its own branch, and sends you a morning summary. Self-hosted, free, runs with your own LLM.
29
+
Night Shift turned Monday mornings from cleanup into code review.
It scans your repositories overnight, finds lint errors, TypeScript issues, security vulnerabilities, and documentation gaps. Fixes them automatically. Commits each fix to its own branch. Sends you a morning summary. Self-hosted, free, runs with your own LLM.
**Night Shift is not trying to be Devin.** It handles the boring, repetitive maintenance that piles up. The kind of work nobody wants to do but everybody benefits from. It runs when you sleep, uses your own LLM, and every fix lands on its own branch for you to review.
**Night Shift is not trying to be Devin.** It handles the boring, repetitive maintenance that piles up — the kind of work nobody wants to do but everybody benefits from. It runs when you're asleep, uses your own LLM, and every fix lands on its own branch for you to review.
155
+
### Safety guarantees
65
156
66
-
## What it fixes
157
+
1.**Branch isolation.** Every fix gets its own branch. Your main/develop is never touched.
158
+
2.**Backup tags.** Created before any changes, recoverable with `git tag -l 'nightshift-backup/*'`.
159
+
3.**Compilation verification.** TypeScript check after every npm change. Breaks? Automatic rollback.
160
+
4.**Stash protection.** Uncommitted work is stashed before, restored after.
161
+
5.**RAM monitoring.** Stops spawning workers if memory drops below threshold.
Every completed fix generates a learning lesson explaining the programming concept behind the change — not just what was fixed, but why it matters. Stored in the database with topic, difficulty, code before/after, and exercises.
258
+
Every completed fix generates a learning lesson explaining the programming concept behind the change. Not just what was fixed, but why it matters. Stored in the database with topic, difficulty, code before/after, and exercises.
196
259
197
260
Works best with an Anthropic API key but falls back to Ollama.
1. Adding a scanner in `coordinator.sh`→ `scan_repo()`that outputs `repo|category|title|description`
221
-
2. Adding a handler in `worker.sh`→ `case "$category" in your-category) execute_your_fix && success=true ;;`
287
+
1. Adding a scanner in `coordinator.sh` that outputs `repo|category|title|description`
288
+
2. Adding a handler in `worker.sh`with a `case "$category"` branch
222
289
3. That's it. The coordinator/worker/summary pipeline handles the rest.
223
290
291
+
---
292
+
224
293
## FAQ
225
294
226
295
**Can it break my code?**
@@ -230,42 +299,51 @@ Every fix runs on its own branch. If TypeScript compilation fails after a fix, t
230
299
Yes. Add the monorepo root to `REPOS`. The scanner checks for ESLint, TypeScript, and npm audit at the configured paths.
231
300
232
301
**What LLMs does it support?**
233
-
Any Ollama model (local, free) or Anthropic Claude (cloud, paid). The TypeScript fixer and doc generator use the LLM; lint and security fixes are deterministic tools.
302
+
Any Ollama model (local, free) or Anthropic Claude (cloud, paid). The TypeScript fixer and doc generator use the LLM. Lint and security fixes are deterministic tools.
234
303
235
304
**How much does it cost to run?**
236
305
With Ollama: $0. With Claude API: typically $0.02-0.10 per run depending on findings. The system logs token usage per task.
237
306
238
307
**Can I run it manually?**
239
308
Yes: `./coordinator.sh` runs a full cycle. `./summary-morning.sh` generates/sends the summary.
240
309
241
-
## How It Compares
310
+
---
311
+
312
+
<aid="agentstack-ecosystem"></a>
313
+
314
+
## AgentStack Ecosystem
315
+
316
+
Night Shift is one piece of a complete AI operations stack. Each tool solves one problem well:
317
+
318
+
| Tool | What it does | Link |
319
+
|------|-------------|------|
320
+
|**[GuardRail](https://github.com/FvdHMBAI/guardrail)**| Pre-execution security for AI agents. Blocks dangerous commands before they run. |[Repo](https://github.com/FvdHMBAI/guardrail)|
321
+
|**[Model Router](https://github.com/FvdHMBAI/model-router)**| Shell-native LLM routing. One config, every model, zero dependencies. |[Repo](https://github.com/FvdHMBAI/model-router)|
322
+
|**Night Shift**| Overnight codebase maintenance. You are here. ||
323
+
|**[Graphify Toolkit](https://github.com/FvdHMBAI/graphify-toolkit)**| Turn any codebase into a queryable knowledge graph. |[Repo](https://github.com/FvdHMBAI/graphify-toolkit)|
324
+
|**[Autonomie OS](https://github.com/FvdHMBAI/autonomie-os)**| Self-improving AI agent framework. Learns from every session. |[Repo](https://github.com/FvdHMBAI/autonomie-os)|
|**Data stays local**| Yes | Partial | No | No | No |
253
-
|**Verification**| TypeScript + build check | CI pipeline | None | Manual review | CI pipeline |
254
-
|**Lesson generation**| Yes (Pro: explains WHY) | No | No | No | No |
326
+
All five tools are open source, self-hosted, and work together. GuardRail protects. Model Router picks the right model. Night Shift maintains the code. Graphify maps the architecture. Autonomie OS makes agents smarter over time.
255
327
256
-
**Different category.** Renovate and Dependabot handle one slice (dependency updates). CodeRabbit reviews but never fixes. Devin is a full interactive agent ($500/mo). Night Shift covers the boring maintenance layer between those tools: lint, types, security, docs. It runs unattended, on your hardware, with your LLM, and every fix is isolated on its own branch.
328
+
---
329
+
330
+
## Learn More
331
+
332
+
Want to understand how these tools fit into a complete AI governance strategy? The free course covers guard design, model routing, autonomous operations, and more:
This tool is free and always will be. For teams that need the full governance stack (GuardRail Pro + Compliance Shield + priority support), see [AgentStack Pro](https://github.com/FvdHMBAI/agent-stack/blob/main/BUNDLE.md) (EUR 79/dev/month).
336
+
---
261
337
262
338
## License
263
339
264
-
MIT — see [LICENSE](LICENSE)
340
+
MIT. See [LICENSE](LICENSE).
265
341
266
342
---
267
343
268
-
Built by [Prompt & Build](https://promptandbuild.de). Running 13+ SaaS products with AI agents.
344
+
<palign="center">
345
+
Built by <ahref="https://promptandbuild.de">Prompt & Build</a>.
346
+
</p>
269
347
270
348
<palign="center">
271
349
If Night Shift saves you maintenance time, consider giving it a <ahref="https://github.com/FvdHMBAI/nightshift">star</a>. It helps others find it.
0 commit comments