Agent routines,
fully under your control.

A self-hosted, open-source alternative to Claude Code routines. Run any agent, any model, as often as you want — on your own infrastructure.

opencode-routines is a movie organiser

Movie organiser — Filesystem trigger
Before
~/Movies/
🎬 The.Dark.Knight.2008.1080p.BluRay.x264-YIFY.mkv
🎬 Inception.2010.BDRip.x264.mkv
🎬 interstellar_2014_full_movie_hd.mkv new
Routine
Trigger
Filesystem ~/Movies
on file created
Prompt
A new video file was added. Parse the filename to extract the movie title. Fetch the title, year, rating, and plot from IMDB. Rename the file to Title (Year).ext and write a Title (Year).info.txt alongside it.
After
~/Movies/
🎬 The Dark Knight (2008).mkv
📄 The Dark Knight (2008).info.txt
🎬 Inception (2010).mkv
📄 Inception (2010).info.txt
🎬 Interstellar (2014).mkv done
📄 Interstellar (2014).info.txt done
Docs updater — Filesystem + Cron
Before
~/projects/
api/v1/
📄 openapi.yaml changed
services/auth/
📄 spec.yaml changed
docs/reference/
📄 api.md stale 3d
Routine
Triggers
Filesystem api/v1, services/auth
Cron daily at 09:00
Prompt
The API specs have been updated. Read api/v1/openapi.yaml and services/auth/spec.yaml, then rewrite docs/reference/api.md to match. Add a dated entry to CHANGELOG.md summarising what changed.
After
~/projects/
api/v1/
📄 openapi.yaml
services/auth/
📄 spec.yaml
docs/reference/
📄 api.md done
📄 CHANGELOG.md done
Screenshot renamer — Filesystem + Vision
Before
~/Downloads/
🖼️ Screen Shot 2024-01-15 at 3.45.23 PM.png
🖼️ Screen Shot 2024-01-16 at 9.12.04 AM.png
🖼️ Screen Shot 2024-01-16 at 11.30.45 AM.png new
Routine
Trigger
Filesystem ~/Downloads
on .png / .jpg created
Prompt
A new screenshot was saved to Downloads. Use vision to understand what's shown in the image. Rename it to a short, descriptive kebab-case filename that captures the content (e.g. app-feature-state.png). Do not move the file.
After
~/Downloads/
🖼️ clerk-dashboard-empty-state.png
🖼️ terminal-git-rebase-conflict.png
🖼️ figma-onboarding-flow-v2.png done
Receipt tracker — Filesystem trigger
Before
~/Receipts/
📄 receipt_001.pdf
📄 wholefoods_scan.jpg
📄 amazon-order-jan16.pdf new
📊 expenses.csv stale 5d
Routine
Trigger
Filesystem ~/Receipts
on file created
Prompt
A new receipt was added. Extract the vendor name, date, and total amount. Rename the file to YYYY-MM-DD_Vendor_Amount.ext. Append a new row to expenses.csv with date, vendor, amount, and a best-guess category.
After
~/Receipts/
📄 2024-01-10_Stripe_149.00.pdf
📄 2024-01-12_Whole_Foods_23.80.jpg
📄 2024-01-16_Amazon_42.50.pdf done
📊 expenses.csv updated
Notes indexer — Filesystem trigger
Before
~/Notes/
📝 meeting-product-2024-01-15.md
📝 research-competitors.md
📝 idea-async-pipeline.md changed
📄 INDEX.md stale 2d
Routine
Trigger
Filesystem ~/Notes
on file created or changed
Prompt
A note was updated. Read all .md files in the Notes folder. Extract topics, people, decisions, and action items from each. Rewrite INDEX.md as a structured index: topics → notes, people mentioned → notes, open action items.
After
~/Notes/
📝 meeting-product-2024-01-15.md
📝 research-competitors.md
📝 idea-async-pipeline.md
📄 INDEX.md done
Changelog writer — Git watcher
Before
~/projects/my-app/
.git/
📄 COMMIT_EDITMSG new commit
root
📄 CHANGELOG.md stale v1.2
Routine
Trigger
Filesystem .git/COMMIT_EDITMSG
on file changed
Prompt
A new commit was just made. Run git log to read commits since the last CHANGELOG.md entry. Group them by type (feat, fix, chore). Append a new dated version section to CHANGELOG.md.
After
~/projects/my-app/
.git/
📄 COMMIT_EDITMSG
root
📄 CHANGELOG.md v1.3 added
Contract parser — Filesystem trigger
Before
~/Contracts/
📄 NDA-unsigned-v3-FINAL(1).pdf
📄 contract_scan_jan2024.pdf
📄 MSA_acme_draft_2024.pdf new
Routine
Trigger
Filesystem ~/Contracts
on file created
Prompt
A new contract was added. Extract the contract type, parties, effective date, expiration date, and key obligations. Rename to Type_Party_Date_status.pdf. Write a _summary.md alongside it with the structured key terms.
After
~/Contracts/
📄 NDA_TechCorp_2024-01-10_signed.pdf
📄 services-agreement_ClientCo_2024-01-05.pdf
📄 MSA_Acme_2024-01-16_draft.pdf done
📄 MSA_Acme_2024-01-16_summary.md done

Why this exists

Claude Code routines are a great idea — save a prompt, pick a trigger, let it run. But you're locked into their platform, their models, and their limits. OpenCode Routines gives you the same thing, self-hosted, with any model OpenCode supports, and the agent can only touch the files you explicitly mount.

See it in action

See what's running at a glance. Stats, recent runs, one click to create.

Routines Runs Settings
Recent runs New Routine
7
Routines
2
Running
1
Recent failures

Recent runs

View all
Routine Trigger Status Started
PR review summary cron running just now
Docs drift check filesystem success 23 min ago
Nightly test runner cron failed 6 hours ago

Pick a name, write a prompt, choose your model and schedule. That's it.

Routines Runs Settings
← Routines
New Routine
anthropic/claude-sonnet-4-6
Cron daily at 09:00 Remove
Filesystem ~/projects Remove
+ Add another trigger
Save routine Cancel

Watch the agent work in real time. Follow up with questions when it's done.

Routines Runs Settings
← Runs
PR review summary
success · Cron · 1m 32s
Review all open PRs in the main branch. For each PR: 1. Summarize the changes 2. Flag any potential issues 3. Suggest reviewers based on code ownership
Ran bash
Ran bash

Found 3 open PRs:

#142 — Add rate limiting to API endpoints
Token bucket limiting on /api/routines. No edge-case tests — recommend adding timeout scenarios.

#139 — Fix SSE connection leak
Small focused fix. Looks good.

#136 — Migrate schema to support tags
Migration is not idempotent — add an IF NOT EXISTS guard.

PR Risk Suggested reviewer
#142 Medium @sarah (api owner)
#139 Low @david (infra)
#136 Medium @sarah (database)
Send

Connect your LLM providers once. API keys are injected into every run automatically.

Routines Runs Settings
Settings
Providers Add provider
Anthropic Connected Remove
OpenAI Connected Remove
Favourite models
claude-sonnet-4-6 claude-haiku-4-5 + Add

Quick start

# Clone the repo
git clone https://github.com/tessellate-digital/opencode-routines.git
cd opencode-routines

# Install dependencies (needed for the host agent)
npm install

# Start everything
npm run up

Starts the Docker stack and the host agent in one command. Open http://localhost:8080, create a routine, pick a trigger, done.

Coming soon