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

@dysonic/ai-labs-codex-openclaw-bridge

v1.0.0-alpha.0

Published

Bridge CLI for letting OpenClaw drive Codex non-interactively

Readme

codex-openclaw-bridge

codex-openclaw-bridge 是一个本地 CLI,用来把 OpenClaw 的消息/命令入口映射到 Codex 的非交互命令。

第一版只覆盖四个动作:

  • run
  • resume
  • last
  • status

同时新增了一个更适合 OpenClaw / Telegram 的 dispatch 入口。

它不尝试控制 Codex 的交互式 TUI,而是直接调用:

  • codex exec
  • codex exec resume

并从 ~/.codex/history.jsonl~/.codex/sessions/ 提取会话摘要。

用法示例

codex-openclaw-bridge install-local
codex-openclaw-bridge run --cwd /path/to/repo --prompt "修复 lint"
codex-openclaw-bridge resume --session-id 019d... --prompt "选择方案 A,继续"
codex-openclaw-bridge last
codex-openclaw-bridge status --last

OpenClaw 友好协议

dispatch 接收一条文本命令,适合从 Telegram/OpenClaw 直接转发:

codex-openclaw-bridge dispatch --text "/codex run /path/to/repo :: 修复 lint"
codex-openclaw-bridge dispatch --text "/codex resume 019d... :: 选择方案 A,继续"
codex-openclaw-bridge dispatch --text "/codex status last" --chat
codex-openclaw-bridge dispatch --text "/codex last" --chat

推荐给 OpenClaw 的最小协议就是:

  • /codex run <cwd> :: <prompt>
  • /codex resume <session-id|last> :: <prompt>
  • /codex continue <session-id|last> :: <prompt>
  • /codex yes <session-id|last> :: <prompt>
  • /codex no <session-id|last> :: <prompt>
  • /codex status [<session-id>|last|<cwd>]
  • /codex last [<cwd>]

本地安装

可以把 bridge 安装成稳定命令名,默认落到 ~/.local/bin

codex-openclaw-bridge install-local

安装后会得到两个命令:

  • codex-openclaw-bridge
  • openclaw-codex-dispatch
  • openclaw-codex-handler

后者更适合给 OpenClaw 直接调用:

openclaw-codex-dispatch "/codex status last"
openclaw-codex-dispatch "/codex run /Users/hongboy/projects/ai-labs :: 查看最近变更"

openclaw-codex-handler 则是更通用的 handler 包装层。它会依次从:

  • 第一个命令行参数
  • MESSAGE_TEXT
  • OPENCLAW_MESSAGE_TEXT
  • stdin

读取消息文本,再转发给 openclaw-codex-dispatch

OpenClaw 接线模板

OpenClaw 侧最小接线可以直接把 Telegram 文本原样转给:

openclaw-codex-dispatch "$MESSAGE_TEXT"

然后把 stdout 原样回发 Telegram。

如果 OpenClaw 的执行面更适合传环境变量或 stdin,就用:

openclaw-codex-handler

或:

MESSAGE_TEXT="$MESSAGE_TEXT" openclaw-codex-handler