open-index/open-npm huggingface dataset:
npm package: @mudlab/create-workflow
Description: Create Mudlab workflow projects with a single command
Author: Mudlab
Latest version: 1.0.11

# @mudlab/create-workflow

Scaffold a new [Mudlab](https://mudlab.io) workflow project in seconds.

## Prerequisites

1. **Code Editor** — [VS Code](https://code.visualstudio.com/) or [Cursor](https://cursor.com/)
2. **Claude Code** — [Install & setup guide](https://code.claude.com/docs/en/overview)
3. **Node.js** — v16+ from [nodejs.org](https://nodejs.org/)

## Quick Start

```bash
pnpm create @mudlab/workflow my-automations
cd my-automations
cp .env.example .env
```

Add your Mudlab API key to `.env` (get it from Mudlab > **API Keys** in the sidebar).

## How It Works

You don't build workflows manually. Just tell Claude what you want:

```
"Build me a lead capture workflow that saves leads to Notion and sends a notification email"
```

```
"Create a workflow that generates a weekly report from my database"
```

```
"I need a workflow that posts to Slack when a new order comes in"
```

Claude reads the `CLAUDE.md` file and automatically creates:
- Tool code in `execution/tools/`
- Workflow definitions in `execution/workflows/`
- Documentation in `directives/`

Then pushes everything to Mudlab for you.

## Project Structure

When Claude builds workflows, it creates files in these directories:

| Directory | What Claude Creates |
|-----------|---------------------|
| `execution/tools/` | Node.js functions that do the actual work |
| `execution/workflows/` | JSON files that define how tools connect |
| `directives/` | Documentation for each workflow |
| `execution/tools_directives/` | AI instructions for using each tool |
| `examples/` | Reference images and files you provide |

## Learn More

- [Mudlab Documentation](https://mudlab.io/docs)
- [GitHub](https://github.com/mudlab/create-workflow)

## License

MIT
npm package: @mudlabs/mudlify-snowpack-plugin
Description: Plugin for Mudlify Snowpack apps
Author: Mudlabs
Latest version: 0.5.0

# mudlify-snowpack-plugin
A Plugin for Snowpack Mudlify apps. The plugin transforms the contents of files so that any placeholder tags are populated with the files corrisponding Netlify CMS data.

See the Mudlify docs to learn how to configure the `tags` -> `cms data` relationships.


## Usage
1. Add the package to your Snowpack app `devDependencies`.
    ```bash
    pnpm install -D @mudlabs/mudlify-snowpack-plugin
    ```

2. Specify the plugin in `snowpack.config.js`.
    - Be sure to point the config path to your `mudlify.yaml` file.
    ```js
    module.exports = {
      mount: {...},
      plugins: [
        [
          "@mudlabs/mudlify-snowpack-plugin",
          { config: "mudlify.yaml" }
        ]
      ],
      installOptions: {...},
      devOptions: {...},
      buildOptions: {...}
    };
    ```
npm package: @muds/event
Description: Core event signal library for muds
Author: Andy K.S. Wong
Latest version: 0.1.0

# @muds/event
<p align="center">
  <a href="https://www.npmjs.com/package/@muds/event"><img src="https://img.shields.io/npm/v/@muds/event?label=@muds/event" alt="NPM @muds/event" /></a>
  <a href="./LICENSE"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT" /></a>
</p>

## Overview
`@muds/event` is the core event signal library for `muds`, the modular microframework for interactive data-oriented systems. It provides the event emitter and listener interface, as well as several useful event implementations.

## Usage
```shell
npm install --save @muds/event
```

```javascript
import { Event, EventMultiplexer } from '@muds/event';

const listener = (...msg) => console.log(...msg);
const event1 = Event.create(); // simple event
const event2 = Event.create();

event1.addListener(listener);
event1.emit('hello', 'world'); // log "hello world"
event1.removeListener(listener);

const multiplexer = new EventMultiplexer(); // multiplex events into a single event
multiplexer.addListener(listener);
multiplexer.add(event1, (event) => [1, ...event]); // add an event with event mapping
multiplexer.add(event2, (event) => [2, ...event]);
event1.emit('hello', 'again'); // log "1 hello again"
event2.emit('bye'); // log "2 bye"
```

```javascript
import { OnAnimationFrame } from '@muds/event';

const listener = (delta) => console.log(`delta: ${delta} ms`);
const event = new OnAnimationFrame(); // emit event with delta time on each requestAnimationFrame callback
event.addListener(listener);
event.start(); // log "delta: 16ms" periodically
// event.pause(); to stop
```

## License
This repository and the code inside it is licensed under the MIT License. Read [LICENSE](./LICENSE) for more information.
npm package: @muds/genindex
Description: Generational index library
Author: Andy K.S. Wong
Latest version: 0.2.0

# genindex

[![license: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](./LICENSE)
[![npm](https://img.shields.io/npm/v/genindex.svg)](https://www.npmjs.com/package/genindex)
[![build](https://github.com/andykswong/muds/actions/workflows/build.yaml/badge.svg)](https://github.com/andykswong/muds/actions/workflows/build.yaml)

## Overview
`genindex` is a simple library for generational index, which is a number encoded as index + generation value. It is mainly used as a weak reference to array values. The generation part allows indices to be reused without suffering from [ABA problem](https://en.wikipedia.org/wiki/ABA_problem), so that data can be safely stored in a packed array.

## API Documentation
http://andykswong.github.io/muds

## Usage
```shell
npm install --save genindex
```
```javascript
import { IndexF64 } from 'genindex';

// create gen ID with index = 0 and generation = 0
const id = IndexF64.create(10);

// get index value
console.log(IndexF64.indexOf(id)); // 10

// increment generation
console.log(IndexF64.next(id)); // 4294967306

```

## License
This repository and the code inside it is licensed under the MIT License. Read [LICENSE](./LICENSE) for more information.
npm package: @muds/gltf
Description: Minimal glTF 2.0 file loader for muds
Author: Andy K.S. Wong
Latest version: 0.1.0

# @muds/gltf
<p align="center">
  <a href="https://www.npmjs.com/package/@muds/gltf"><img src="https://img.shields.io/npm/v/@muds/gltf?label=@muds/gltf" alt="NPM @muds/gltf" /></a>
  <a href="./LICENSE"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT" /></a>
</p>

## Overview
`@muds/gltf` is the minimal glTF 2.0 file loader for [muds](https://github.com/andykswong/muds), a modular microframework for interactive data-oriented systems.

## API Documentation
http://andykswong.github.io/muds

## Usage
```shell
npm install --save @muds/gltf
```

To load a glTF 2.0 model (both .gltf and .glb formats are supported):
```typescript
import { loadGlTF, glTF2 } from '@muds/gltf';

const uri = 'https://raw.githubusercontent.com/KhronosGroup/glTF-Sample-Models/master/2.0/BoxTextured/glTF-Binary/BoxTextured.glb';
const {
  glTF, // glTF model in JSON
  buffers, // array of Uint8Array for buffers declared in the model
  images // array of Image for images declared in the model
} = loadGlTF(uri);

// For TypeScript, the glTF model typing is available as glTF2.GlTF
// It is auto-generated from the official glTF 2.0 JSON schema
const typedGlTF: glTF2.GlTF = glTF;
```

## License
This repository and the code inside it is licensed under the MIT License. Read [LICENSE](./LICENSE) for more information.
npm package: @muds/ioc
Description: Minimal inversion of control container for muds
Author: Andy K.S. Wong
Latest version: 0.1.1

# @muds/ioc
<p align="center">
  <a href="https://www.npmjs.com/package/@muds/ioc"><img src="https://img.shields.io/npm/v/@muds/ioc?label=@muds/ioc" alt="NPM @muds/ioc" /></a>
  <a href="./LICENSE"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT" /></a>
</p>

## Overview
`@muds/ioc` is a minimal inversion of control (IoC) container library for [muds](https://github.com/andykswong/muds), a modular microframework for interactive data-oriented systems.

In `@muds/ioc`, the IoC container contents are defined by module classes, which declares provider functions for injectables. Modules are easily reusable, interchangeable and testable. Unlike many other JavaScript/TypeScript IoC libraries, `@muds/ioc` does not require you to add decorators nor make any change to the injectable classes, makes it easy to integrate with third-party libraries.

## API Documentation
http://andykswong.github.io/muds

## Usage
```shell
npm install --save @muds/ioc
```

The library requires the use of TypeScript [decorators](https://www.typescriptlang.org/docs/handbook/decorators.html), or [Babel legacy decorator](https://babeljs.io/docs/en/babel-plugin-proposal-decorators#legacy) if using pure JavaScript:
```javascript
import { Container, inject, module, multi, provide, singleton, tagged } from '@muds/ioc';

const id0 = Symbol('id0'), id1 = Symbol('id1'), id2 = Symbol('id2');

// 1. declare modules
@module()
class Module {
  // each provider method must be decorated with @provide(id). they can return any value
  @provide(id0)
  getFoo() { return 'foo'; }

  // singletons are cached once created
  // use @inject to inject a dependency by id
  @provide(id1) @singleton 
  getBar(@inject(id0) foo) {
    return { bar: foo };
  }

  // multiple providers with same id is supported
  // add tags using @tagged to differentiate them
  @provide(id1) @tagged({ type: 2 }) 
  getBar2() { return { bar: 2 }; }

  // use @multi to inject an array of injectables with same id
  @provide(id2)
  getBars(@inject(id1) @multi bars) { return bars; }
}

// 2. initialize IoC container and add modules
const container = Container.create();
container.add(new Module());

// 3. use get(id, tags?) or multiGet(id, tags?) to get injectables
container.get(id0); // 'foo'
container.multiGet(id1); // [{ bar: 'foo' }, { bar: 2 }]
container.get(id2); // [{ bar: 'foo' }, { bar: 2 }]
container.get(id1, { type: 2 }); // { bar: 2 }
```

## License
This repository and the code inside it is licensed under the MIT License. Read [LICENSE](./LICENSE) for more information.
npm package: @muds/node
Description: Minimal scene node graph library for muds
Author: Andy K.S. Wong
Latest version: 0.1.0

# @muds/node
<p align="center">
  <a href="https://www.npmjs.com/package/@muds/node"><img src="https://img.shields.io/npm/v/@muds/node?label=@muds/node" alt="NPM @muds/node" /></a>
  <a href="./LICENSE"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT" /></a>
</p>

## Overview
`@muds/node` is a minimal 2D/3D scene node graph library for [muds](https://github.com/andykswong/muds), a modular microframework for interactive data-oriented systems.

# API Documentation
http://andykswong.github.io/muds

## Usage
```shell
npm install --save @muds/node
```

To create a node hierarchy:
```javascript
import { Node, setParent, preorderTraverse } from '@muds/node';

const nodes = new Map();

const root = 1, child = 2;
nodes.set(child, new Node());
nodes.set(root, new Node());
setParent(nodes, child, root);
console.assert(nodes.get(root).lastChild === child && nodes.get(child).parent === root);

for (const [nodeId, node] of preorderTraverse(nodes, root)) {
  console.log(nodeId);
}
// prints: 1 2
```


Using the 3D transform component:
```javascript
import { Transform } from '@muds/node';

const transform = new Transform();
transform.translation = [1, 2, 3]; // x-y-z translation
transform.rotation = [0, 0, 0, 1]; // quaternion rotation
transform.scale = [5, 6, 7]; // x-y-z scaling

transform.update(true); // if false (default), it sets transform.needUpdate = true only without updating the matrix.
console.log(transform.matrix); // prints the 4x4 local transformation matrix = T * R * S
```

To create a 3D transform hierarchy and calculate world transformations:
```javascript
import { Node, Transform, setParent, updateWorldTransforms } from '@muds/node';

const nodes = new Map();
const transforms = new Map();
const worldTransforms /* : Map<number, Mat4> type */ = new Map();

const root = 1, child = 2;
nodes.set(root, new Node());
transforms.set(root, new Transform());
nodes.set(child, new Node());
transforms.set(child, new Transform());
setParent(nodes, child, root);
// set root/child transform logic omitted

updateWorldTransforms(nodes, transforms, worldTransforms, root);
console.log(worldTransforms.get(child)); // prints the 4x4 world matrix = (parent transform) * (child transform)
```

There are also 2D versions of above and the APIs are similar except for being 2D:
```javascript
import { Transform2D, updateWorldTransforms2D } from '@muds/node';
```

## License
This repository and the code inside it is licensed under the MIT License. Read [LICENSE](./LICENSE) for more information.
npm package: @muds/react
Description: React integration for muds
Author: Andy K.S. Wong
Latest version: 0.1.1

# @muds/react
<p align="center">
  <a href="https://www.npmjs.com/package/@muds/react"><img src="https://img.shields.io/npm/v/@muds/react?label=@muds/react" alt="NPM @muds/react" /></a>
  <a href="./LICENSE"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT" /></a>
</p>

## Overview
`@muds/react` is the [React](https://reactjs.org/) integrataion utils for `muds`, the modular microframework for interactive data-oriented systems. It provides useful utils for integrating your React components with `muds` libraries.

## Usage
```shell
npm install --save @muds/react @muds/event
```

Use `useEventReducer(event, reducer, initialState)` hook to act on events within a React component. It is comparable to `useReducer` hook, but for muds events.
```javascript
import React from 'react';
import { Event } from '@muds/event';
import { useEventReducer } from '@muds/react';

function Counter({ event, initialCount = 0 }) {
  const count = useEventReducer(event, reducer, initialCount);
  return (<span>{count}<button onClick={() => event.emit('inc')}>+1</button></span>);
}

function reducer(count: number, action: Action): number {
  switch (action) {
    case 'inc': return count + 1;
    default: return count;
  }
}

const event = Event.create();
const vdom = <Counter event={event} initialCount={100} />;
event.emit('inc'); // increments the count outside of the component
```

## License
This repository and the code inside it is licensed under the MIT License. Read [LICENSE](./LICENSE) for more information.
npm package: @mudssky/eslint-config-custom
Description: eslint配置文件
Latest version: 0.1.0

# `@mudssky/eslint-config-custom`

eslint配置文件的集合

## Usage

需要先安装eslint

```shell
pnpm add eslint @mudssky/eslint-config-custom -D
```

然后，在项目的根目录下创建一个`.eslintrc.cjs`文件，并添加以下内容：

```js
module.exports = {
  extends: ['@mudssky/eslint-config-custom/vite-recommended'],
}

```

其中 vite-recommended 也可以换成根目录下的其他配置文件
npm package: @mudssky/jsutils
Description: 个人通用js库
Author: mudssky
Latest version: 1.34.1

# jsutil

[![NPM version](https://img.shields.io/npm/v/@mudssky/jsutils.svg?style=flat)](https://npmjs.org/package/@mudssky/jsutils)
[![NPM downloads](http://img.shields.io/npm/dm/@mudssky/jsutils.svg?style=flat)](https://npmjs.org/package/@mudssky/jsutils)

个人通用js函数库。采用typescript编写，打包为esm，cjs，umd 3种格式，并且含有类型声明，适合在typescript项目中使用。  
umd模块使用了babel转义，兼容性会比较好，cjs和esm模块没有转义tsconfig target设为es2017，
因为现在用户一般项目里有打包工具，所以这边就不需要转义了。

## 安装

```shell
npm install @mudssky/jsutil
or
yarn add @mudssky/jsutil
or
pnpm add @mudssky/jsutil

```

## 质量校验

- `pnpm qa`: 本地快速校验，覆盖 `typecheck`、`lint:fix`、runtime tests 和 type tests
- `pnpm ci:strict`: PR 严格门禁，在 `qa` 基础上增加 coverage 校验
- `pnpm release:check`: 发布前校验，在 `ci:strict` 基础上增加构建与 Typedoc 生成校验

## 使用方法

和lodash-es类似  
推荐使用esm的方式按需引入，这样可以借由tree shaking，减少最后的打包体积

```ts
import { range } from '@mudssky/jsutils'
console.log(range(1, 10))
```

[详细文档地址](https://mudssky.github.io/jsutils/index.html)
npm package: @mudssky/shipit
Description: - 技术栈：Node.js CLI、TypeScript、Commander、Inquirer、Cosmiconfig、Zod、Rspack - 包管理：`pnpm`
Latest version: 1.0.22

# Shipit 发布脚手架

- 技术栈：Node.js CLI、TypeScript、Commander、Inquirer、Cosmiconfig、Zod、Rspack
- 包管理：`pnpm`

## 安装与构建
- 安装依赖：`pnpm i`
- 开发运行：`pnpm dev`
- 构建：`pnpm build`
- 质量检查：`pnpm qa`（类型检查 → 格式化 → 测试）

## 本地使用
- 直接运行（不依赖命令安装）：`node dist/index.js --help`
- 命令模式（bin，全局链接）：
  - 初始化：`pnpm build && pnpm link --global`
  - 使用：`shipit upload <file>`、`shipit release list`、`shipit release publish`
  - 取消链接：`pnpm unlink --global`
- 在其他项目中使用（本地开发联调）：
  - 在本仓库执行：`pnpm link --global`
  - 在目标项目执行：`pnpm link @mudssky/shipit`，随后可直接运行 `shipit`
- 说明：本包标记为 `private: true`，不发布到 npm，推荐通过 `pnpm link` 在本地以命令形式使用。

## 配置
- 配置文件：`shipit.config.ts|js`
- 示例字段：
  - `artifact.defaultPath`、`artifact.nameTemplate`
  - `upload.defaultProvider`、`upload.server`、`upload.oss`
  - `release.defaultProvider`、`release.targetDir`、`release.listLimit`、`release.listOutputStyle?`、`release.listLargeThreshold`
  - `hooks.beforeUpload/afterUpload/beforeRelease/afterRelease`、`hooks.shell`
- 全局配置（可选）：`TABLE_STYLE?: 'tsv' | 'table'`（从 `@/config` 读取）
- 读取路径优先级：`SHIPIT_CONFIG_DIR` 环境变量 > 项目根目录（如 `c:\home\Projects\frontend\node\shipit`）> 当前工作目录

### 示例配置
- 示例文件：`examples/shipit.config.example.ts`（随 npm 包一同提供）
- 使用方式：复制为 `shipit.config.ts` 后按需修改占位字段（AK/SK、Bucket、Server Token 等）
- 安全建议：敏感信息优先使用环境变量或外部注入，避免提交到版本库

## 命令
- 上传：`shipit upload <file> [-p server|oss|scp] [-n name] [--no-hooks] [--dry-run]`
- 列表：`shipit release list [-p server|oss] [-n limit] [--style tsv|table] [-i|--no-interactive] [--yes]`
- 发布：`shipit release publish [name] [-p server|oss] [-d dir] [--no-hooks] [--dry-run] [-i|--no-interactive] [--yes]`
- 下载：`shipit release download <name> [-p oss] [-o dir]`
- 配置路径：`shipit config path`
- 配置内容：`shipit config show`

## 输出样式优先级
- `--style` > `shipit.release.listOutputStyle` > `global.TABLE_STYLE` > `'tsv'`

## 交互式体验
- 自动条件：TTY 且非 CI；显式 `-i/--interactive` 强制启用，`--no-interactive` 禁用
- 发布确认：`--yes` 默认同意；目录校验支持 `allowedTargetDirPrefix`
- Hooks 概览：仅显示类型与数量；`--verbose` 显示脚本明细

## 发布（OSS）解压与回退
- Windows：PowerShell `Expand-Archive`，失败回退 `tar -xf`
- Linux/mac：`unzip`，缺失回退 `7z`
- 错误分类：
  - `解压失败: 文件不存在`
  - `解压失败: 平台命令不可用或执行失败`
  - `解压失败: 缺少 unzip/7z 或执行失败`

## 使用示例
- 构建并查看列表（全局样式）：
  - `pnpm build && node dist/index.js release list -p oss`
- 上传到服务器并命名：
  - `node dist/index.js upload ./dist/release.zip -p server -n release-YYYYMMDDHHmmss.zip`
- 交互式发布到服务器：
  - `node dist/index.js release publish -p server -i --yes --no-hooks`

## 测试
- 运行：`pnpm test`
- 覆盖率：`@vitest/coverage-v8`（文本与 HTML）

## 发布到 npm
- 前置：确保 `package.json` 已设置
  - `private: false`
  - `bin.shipit: dist/index.js`
  - `publishConfig.access: public`（作用于作用域包 `@mudssky/…`）
- 构建产物：`pnpm build`
- 登录 npm：`npm login`（或 `pnpm npm login`）
- 发布：
  - 常规：`npm publish`
  - 指定公开访问（若未配置 `publishConfig`）：`npm publish --access public`
- 版本管理：
  - 升级版本号：`npm version patch|minor|major`
  - 预发布标签：`npm publish --tag beta`
- 验证：
  - 全局安装：`npm i -g @mudssky/shipit`
  - 运行：`shipit --help`