npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

oh-my-goal

v1.0.0

Published

Codex-style /goal autonomous loop plugin for OpenCode.

Readme

oh-my-goal

Codex-style /goal autonomy for OpenCode.

Set one objective. Let the agent keep going until the work is done, blocked, paused, or out of budget.

CI Release npm version npm downloads License Node TypeScript Prettier

Install · Usage · How It Works · Contributing

oh-my-goal terminal demo

If this makes your OpenCode workflow better, please consider giving the repo a star.


Why

OpenCode already has powerful automation plugins. Many of them are built for advanced orchestration: multiple agents, metrics, scopes, model maps, verification plans.

oh-my-goal is intentionally smaller.

/goal fix the flaky login test

That is the interface. The plugin stores the goal, injects a continuation prompt whenever the session goes idle, and keeps the agent moving until there is a concrete stop condition.

Features

  • One-line autonomy: start with /goal <objective>.
  • Project-local state: stores goal state in .opencode/goal.json.
  • Continuation loop: uses session.idle to push the agent into the next concrete action.
  • Completion detection: watches for GOAL_ACHIEVED: and GOAL_BLOCKED: markers.
  • Budget guardrails: tracks token usage and warns near the configured budget.
  • Compaction-safe context: preserves goal state through OpenCode session compaction.
  • No model orchestration: plays nicely beside other OpenCode tools because it only manages goal continuation.

Install

npm i -g oh-my-goal

Add it to opencode.json:

{
  "plugin": ["oh-my-goal"]
}

For local use before publishing, build the repo and run OpenCode from this project. The repository includes:

  • .opencode/plugins/oh-my-goal.js to load the built plugin locally
  • .opencode/commands/goal.md so the TUI registers /goal

Usage

Start a goal:

/goal fix the login redirect bug

Check or control the active goal:

/goal status
/goal pause
/goal resume
/goal clear

Override the default token budget:

/goal raise payment module test coverage to 80% --token-budget 100000

Commands

| Command | Behavior | | ------------------- | ----------------------------------------------------- | | /goal <objective> | Create a new goal and start the loop | | /goal status | Show current objective, status, budget, and iteration | | /goal pause | Pause the loop without deleting goal state | | /goal resume | Resume a paused goal | | /goal clear | Delete .opencode/goal.json and stop the loop |

How It Works

The plugin is deliberately simple:

/goal <objective>
  -> write .opencode/goal.json
  -> on session.idle, inject continuation prompt
  -> on message.updated, scan for stop markers and token usage
  -> preserve goal context during compaction

When a goal is pursuing, each idle event injects an active-goal check into the session. The agent must concretely decide whether the original objective is complete. If not, it continues immediately.

The loop stops when:

  • The assistant emits GOAL_ACHIEVED: <summary>
  • The assistant emits GOAL_BLOCKED: <reason>
  • /goal pause or /goal clear is used
  • The token budget or iteration limit is reached

State File

.opencode/goal.json follows this shape:

{
  "objective": "fix the login redirect bug",
  "status": "pursuing",
  "created_at": "2026-05-05T10:00:00.000Z",
  "updated_at": "2026-05-05T10:02:00.000Z",
  "token_budget": 50000,
  "tokens_used": 12400,
  "iteration": 3,
  "max_iterations": 100,
  "budget_warning_sent": false,
  "history": [
    {
      "iteration": 1,
      "summary": "Injected continuation prompt.",
      "status": "in_progress",
      "created_at": "2026-05-05T10:01:00.000Z"
    }
  ]
}

Development

npm ci
npm run check
npm run build

Quality gates:

  • npm run typecheck
  • npm run lint
  • npm run format:check
  • npm audit --omit=dev

Contributing

Issues and pull requests are welcome. See CONTRIBUTING.md, CODE_OF_CONDUCT.md, and SECURITY.md.

License

Apache-2.0. See LICENSE.