open-index/open-npm huggingface dataset:
npm package: @moleculexyz/humanized-numbers
Description: display numbers (and bigints) in a more human way
Latest version: 1.0.1

# humanized numbers

humanizes numbers aka cuts unnecessary floating point display precision and shows 10exp shortcuts (monetary) like "M","K","B". 

Supports bigints, scientific notation, decimal cutting.

zero dependencies

```bash
npm i @moleculexyz/humanized-numbers
``` 

```ts
import {humanNumber, humanBigint} from '@moleculexyz/humanized-numbers'

expect(humanNumber(1234.567891)).toEqual('1,234.5679')
expect(humanNumber(1200.2345, true, 2)).toEqual('1,200.23')
expect(humanNumber(1_205_860, true)).toEqual('1.2059M')
expect(humanNumber(1_059_424.52, true, 2)).toEqual('1.06M')

//also works with bigints
expect(humanBigint(1205860000000000000000000n, 18, true)).toEqual('1.2059M')
expect(humanBigint(64068284585n, 6, true, 0)).toEqual('64,068')

```

## TODO

Use the user's locale by default. Atm we're using en_US as the default.
npm package: @moleft/wxcodex
Description: A WeChat-to-Codex bridge that lets you receive messages in WeChat and answer them with Codex through a local TUI runtime.
Author: MoLeft
Latest version: 0.0.1

# WXCodex

<p align="center">
  <strong>把 Codex 接进微信，让代码协作从终端延伸到聊天窗口。</strong>
</p>

<p align="center">
  <a href="https://github.com/MoLeft/wxcodex/blob/main/LICENSE"><img alt="License: MIT" src="https://img.shields.io/badge/license-MIT-0f766e.svg"></a>
  <img alt="Node.js" src="https://img.shields.io/badge/node-%3E%3D20-111827.svg">
  <img alt="TypeScript" src="https://img.shields.io/badge/TypeScript-5.x-2563eb.svg">
  <img alt="WeChat" src="https://img.shields.io/badge/WeChat-Agent-16a34a.svg">
</p>

WXCodex 是一个本地运行的 TypeScript CLI/TUI 项目，用来把微信消息链路与 Codex 连接起来。

它基于 `@tencent-weixin/openclaw-weixin` 提供的接口能力，可以直接配合微信官方的 OpenClaw 插件体系使用，在微信侧完成消息接入与账号联通。

你可以在本机启动一个终端界面，扫码登录微信机器人账号，接收微信消息，然后把消息转发给 Codex 处理，再将结果回发到微信会话里。它适合做个人助理、代码问答、远程控制式研发辅助，或者作为更复杂微信 Agent 系统的基础层。

## 特性

- 微信二维码登录，自动轮询登录状态
- 本地 TUI 运行界面，直观看到微信、Codex、队列和事件状态
- 共享 Codex 会话线程，适合连续多轮对话
- 支持微信文本消息收发，并带有 typing 状态同步
- 支持图片、文件消息落盘后再结合文本补充进行处理
- 本地数据目录持久化，保存登录态、上下文和运行状态

## 工作方式

```mermaid
flowchart LR
  A[WeChat User] --> B[WXCodex Runtime]
  B --> C[WeChat Polling / Media Download]
  B --> D[Codex App Server]
  D --> B
  B --> E[Reply to WeChat]
```

WXCodex 主要由三部分组成：

- `src/wechat/*`：微信登录、轮询、消息发送、文件下载
- `src/codex/*`：Codex CLI / app-server 连接桥接
- `src/runtime/*` + `src/tui/*`：运行时编排与终端 UI

## 快速开始

### 1. 准备环境

- Node.js 20 或更高版本
- 已可用的 `codex` CLI
- 可接入的微信机器人能力接口

### 2. 安装

全局安装：

```bash
npm install -g @moleft/wxcodex
```

如果你当前是在仓库源码下体验，也可以先用本地方式安装：

```bash
npm install
npm install -g .
```

### 3. 启动

全局安装后：

```bash
wxcodex
```

从源码目录运行：

```bash
npm run dev
```

或者先构建再运行：

```bash
npm run build
npm start
```

## 使用说明

启动后，程序会进入本地终端界面。完成微信登录后，运行时会开始轮询消息，并将用户消息交给 Codex 处理。

常见使用流程：

1. 启动 `wxcodex`
2. 扫码登录微信
3. 确认 Codex CLI 可用
4. 在微信聊天窗口发送问题
5. 等待 Codex 回复自动回传到微信

## 环境变量

| 变量名 | 说明 |
| --- | --- |
| `WXCODEX_CODEX_BIN` | Codex 可执行文件路径，默认 `codex` |
| `WXCODEX_DATA_DIR` | 本地数据目录，默认 `~/.wxcodex` |
| `WXCODEX_MODEL` | 指定模型 |
| `WXCODEX_REASONING_EFFORT` | 推理强度 |
| `WXCODEX_POLL_TIMEOUT_MS` | 微信消息轮询超时 |
| `WXCODEX_TYPING_INTERVAL_MS` | typing 心跳间隔 |
| `WXCODEX_SYSTEM_PROMPT` | 自定义系统提示词 |
| `WXCODEX_LOG_LEVEL` | 日志级别 |

## 项目结构

```text
.
├─ src/
│  ├─ codex/
│  ├─ runtime/
│  ├─ store/
│  ├─ tui/
│  └─ wechat/
├─ mcp-wechat-server/
├─ happy/
└─ dist/
```

## 开发命令

```bash
npm run dev
npm run build
npm run test
```

## 路线图

- 完善更多微信消息类型支持
- 增强多会话与多用户隔离能力
- 提供更稳定的部署与日志方案
- 补充发布流程与安装分发体验

## 参考项目

本项目的设计与实现过程中，参考了以下项目与资料：

- [`@tencent-weixin/openclaw-weixin`](https://www.npmjs.com/package/@tencent-weixin/openclaw-weixin)
- [`mcp-wechat-server`](https://github.com/Howardzhangdqs/mcp-wechat-server)
- [`happy`](https://github.com/slopus/happy)

## License

本项目基于 [MIT](./LICENSE) 协议开源。
npm package: @molehill-ui/babel-plugin
Description: Babel plugin to add theme properties
Author: Wes Cole
Latest version: 0.6.0

## Installation

Run `npx molehill-ui` to setup the config.

## Manual installation

Add this plugin before any plugins that add or process the `css` prop:

```json
{
  "plugins": ["@molehill-ui"]
}
```

## Setup the config file (optional)

Add a `molehill.config.js` file to the project root.

```tsx
import { createCssTheme } from '@molehill-ui/theme'

export default createCssTheme({
  config: {},
})
```
npm package: @molejs/git-emoji-commit-hook
Description: enjoy emoji
Author: liugenpeng
Latest version: 0.1.1


## 安装

- Install git-emoji-commit-hook package

```
$ npm install -g @molejs/git-emoji-commit-hook
```

- Install the hook

```
$ cd any-git-initialized-directory
$ git-emoji-commit-hook --init
```

## 配置

You can put unwanted emojis in a blacklist section by adding the name in a blacklist array in your `package.json`:

```json
{
  "gitmoji": {
    "blacklist": [
      "card-file-box",
      "beers"
    ]
  }
}
```
npm package: @molejs/global-helper
Description: ```  /**    * 获取BSGlobal中值    */   getBSGlobal(key: string, defaultV?: any) {     return BSGlobal[key] || defaultV;   },   /**    * 获取租户信息    */   getTenantInfo(key?: string) {     return this.getBSGlobal(key || 'tenantInfo');   },   /**    * 获取用户信息    */
Author: liugenpeng
Latest version: 0.0.1

# 标准BSGlobal 操作API

```
 /**
   * 获取BSGlobal中值
   */
  getBSGlobal(key: string, defaultV?: any) {
    return BSGlobal[key] || defaultV;
  },
  /**
   * 获取租户信息
   */
  getTenantInfo(key?: string) {
    return this.getBSGlobal(key || 'tenantInfo');
  },
  /**
   * 获取用户信息
   */
  getUserInfo(key?: string): any {
    return this.getBSGlobal(key || 'loginUserInfo');
  },
  /**
   * 获取用户Id
   */
  getUserId() {
    const user = this.getUserInfo()
    return user.Id || user.UserId || user.id;
  },
  /**
   * 用户租户Id
   */
  getTenantId() {
    const tenant = this.getTenantInfo();
    return tenant.Id || tenant.tenant_id || tenant.tenantId;
  },
  /**
   * 获取环境标识
   */
  getEnv() {
    const env = this.getBSGlobal('env');
    return {
      get isProduction() {
        return  /production/ig.test(env);
      },
      get isDevelopment() {
        return /development/ig.test(env) || /develop/ig.test(env);
      },
      get isTesting() {
        return /test/ig.test(env) 
      }
    };
  },
  // 获取协议
  getProtocol() {
    return window.location.protocol;
  },
```
npm package: @molejs/highlight-words-core
Description: Utility functions shared by react-highlight-words and react-native-highlight-words
Author: liugenpeng
Latest version: 0.1.1

Utility functions shared by [`react-highlight-words`](https://github.com/bvaughn/react-highlight-words) and [`react-native-highlight-words`](https://github.com/clauderic/react-native-highlight-words).

## API

The primary API for this package is a function exported as `findAll`. This method searches a string of text for a set of search terms and returns an array of "chunks" that describe the matches found.

Each "chunk" is an object consisting of a pair of indices (`chunk.start` and `chunk.end`) and a boolean specfifying whether the chunk is a match (`chunk.highlight`). For example:

```js
import { findAll } from "highlight-words-core";

const textToHighlight = "This is some text to highlight.";
const searchWords = ["This", "i"];

const chunks = findAll({
  searchWords,
  textToHighlight
});

const highlightedText = chunks
  .map(chunk => {
    const { end, highlight, start } = chunk;
    const text = textToHighlight.substr(start, end - start);
    if (highlight) {
      return `<mark>${text}</mark>`;
    } else {
      return text;
    }
  })
  .join("");
```

[Run this example on Code Sandbox.](https://codesandbox.io/s/ykwrzrl6wx)

### `findAll`

The `findAll` function accepts several parameters, although only the `searchWords` array and `textToHighlight` string are required.

| Parameter | Required? | Type | Description |
| --- | :---: | --- | --- |
| autoEscape |  | `boolean` | Escape special regular expression characters |
| caseSensitive |  | `boolean` | Search should be case sensitive |
| findChunks |  | `Function` | Custom find function (advanced) |
| sanitize |  | `Function` | Custom sanitize function (advanced) |
| searchWords | ✅ | `Array<string>` | Array of words to search for |
| textToHighlight | ✅ | `string` | Text to search and highlight |


## License
MIT License - fork, modify and use however you want.