Skip to content

runbear-io/aweek-opencode

 
 

Repository files navigation

aweek aweek-opencode

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

Why aweek exists

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.

Who it's for

  • 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

What you can build

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

Other agent templates

  • 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.

What you get

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

Try it in 60 seconds

npm install -g aweek-opencode
aweek-opencode hire            # add your first agent (auto-bootstraps heartbeat)
aweek-opencode plan            # draft & approve the week

Walk away. Come back Monday morning to a status report and next week's draft plan.

How it works (in 3 lines)

  1. Commands (invoked via aweek-opencode [name]) shell out to a tiny CLI for every state change.
  2. 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.
  3. Storage is plain files: .aweek/agents/<slug>.json for scheduling, .opencode/agent/<slug>.md for identity. No DB.

Every mutation is schema-validated and atomic. 2,000+ tests guard the data layer.

Install

aweek-opencode ships as a standalone CLI that shells out to OpenCode.

From npm (when published):

npm install -g aweek-opencode

From source:

git clone https://github.com/junhodo/aweek-opencode.git
cd aweek-opencode && pnpm install && pnpm link --global

Requirements: macOS 10.15 (Catalina) or newer, Node.js 20+. Linux and Windows aren't supported yet — the heartbeat installs as a launchd user agent.

Per-agent secrets

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=enabled

Format 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.

Troubleshooting

  • 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, run aweek setup and confirm when prompted.
  • Agent paused. It hit its weekly budget. aweek manageresume (resets next week) or top-up (resets now).

Development

pnpm test          # 2,000+ tests
pnpm lint          # syntax-check src

Commands 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.

License

Apache 2.0 — © 2026 Runbear, Inc.


OpenCode does the work. aweek-opencode runs the week.

About

Claude Code plugin for managing multiple AI agents on scheduled weekly plans.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • TypeScript 94.8%
  • JavaScript 5.1%
  • Other 0.1%