If OpenCode is the doer, aweek-opencode is the planner.
OpenCode fork of runbear-io/aweek.
aweek-opencode is an OpenCode companion CLI for building a team of AI agents that handle the work that repeats. Each agent has a role, a weekly plan, and a token budget. The plan evolves every Monday based on what worked last week. You set direction. OpenCode does the work. aweek-opencode runs the week.
aweek.mp4
Most AI tools are great at one-off prompts. They're terrible at the work that repeats — the weekly competitive scan, the Monday newsletter, the customer feedback digest, the recurring research memo. That work doesn't need a smarter model. It needs a team that shows up on schedule, remembers what they did last week, and gets a little better each Monday.
aweek-opencode is that team.
- Founders running their own ops who can't keep up with weekly cadence
- Marketers and creators publishing on a schedule (blog → social → newsletter)
- Analysts and researchers running weekly digests, briefs, or memos
- Anyone whose week looks a lot like last week's
A single agent on a calendar — sixteen scheduled tasks across five days, a daily review that closes each day, and a weekly review that ties the week to the month's goals. One budget, one cumulative plan.md, fresh Markdown in your repo every week.
| Mon | Tue | Wed | Thu | Fri | |
|---|---|---|---|---|---|
| 7am | Brief | Outreach | Interviews | Roadmap | — |
| 9am | Inbox | — | — | — | Feedback |
| 10am | — | Metrics | — | — | — |
| 11am | — | — | Content | Issues | Numbers |
| 3pm | — | — | — | — | Retro |
| 5pm | Daily | Daily | Daily | Daily | Weekly |
Full recipe → A weekly operator
- An engineer — handles the engineering periphery: PR triage, dep drift, flaky tests, doc drift, retros. Never ships features.
- A content marketer — grooms the topic queue, drafts the post, atomizes it for social, writes the newsletter, reviews analytics.
| You run | Your team does |
|---|---|
aweek hire |
Adds an agent — name, role, system prompt (auto-bootstraps on first run) |
aweek plan |
Drafts long-term goals → monthly objectives → weekly tasks. You approve. |
aweek summary |
Hands in a status report — done, pending, budget left |
aweek calendar |
Shows the week as an editable calendar grid |
aweek manage |
Lifecycle ops — pause, resume, top up budget, fire |
aweek delegate-task |
Drops work into another agent's inbox. Agents hand off to each other. |
aweek setup |
Explicitly bootstrap the project (usually auto-called by the first command you run) |
aweek teardown |
Remove the heartbeat and/or .aweek/ data from a project |
npm install -g aweek-opencode
aweek-opencode hire # add your first agent (auto-bootstraps heartbeat)
aweek-opencode plan # draft & approve the weekWalk away. Come back Monday morning to a status report and next week's draft plan.
- Commands (invoked via
aweek-opencode [name]) shell out to a tiny CLI for every state change. - Heartbeat is a 10-minute launchd user agent per project. It picks the next pending task per agent and runs it in a fresh OpenCode CLI session.
- Storage is plain files:
.aweek/agents/<slug>.jsonfor scheduling,.opencode/agent/<slug>.mdfor identity. No DB.
Every mutation is schema-validated and atomic. 2,000+ tests guard the data layer.
aweek-opencode ships as a standalone CLI that shells out to OpenCode.
From npm (when published):
npm install -g aweek-opencodeFrom source:
git clone https://github.com/junhodo/aweek-opencode.git
cd aweek-opencode && pnpm install && pnpm link --globalRequirements: macOS 10.15 (Catalina) or newer, Node.js 20+. Linux and Windows aren't supported yet — the heartbeat installs as a launchd user agent.
Drop a .env file at .aweek/agents/<slug>/.env to give one agent its own environment variables. The heartbeat loads it on every tick and passes the values into that agent's OpenCode session — other agents don't see them.
# .aweek/agents/writer/.env
OPENAI_API_KEY=sk-...
NOTION_TOKEN=secret_...
FEATURE_FLAG=enabledFormat is dotenv-style: KEY=value, # comments, single/double quotes (double-quoted values support \n \r \t \\ \"). .aweek/ is gitignored, so secrets stay out of the repo by default.
- OpenCode cannot find an agent. Confirm the agent file exists under
.opencode/agent/<slug>.md. - Heartbeat isn't running. Check
launchctl list | grep io.aweek.heartbeat. If nothing matches, runaweek setupand confirm when prompted. - Agent paused. It hit its weekly budget.
aweek manage→resume(resets next week) ortop-up(resets now).
pnpm test # 2,000+ tests
pnpm lint # syntax-check srcCommands call into src/skills/*.ts via aweek-opencode exec <module> <fn>. Don't duplicate logic in ad-hoc node -e snippets — extend the module and register it in src/cli/dispatcher.ts.
Apache 2.0 — © 2026 Runbear, Inc.
OpenCode does the work. aweek-opencode runs the week.