open-index/open-npm huggingface dataset:
npm package: @sobaswap/sdk
Description: 🛠 An SDK for building applications on top of pancakeswap.
Author: me
Latest version: 1.0.1

# Pancakeswap SDK

[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
[![Actions Status](https://github.com/pancakeswap/pancakeswap-sdk/workflows/CI/badge.svg)](https://github.com/pancakeswap/pancakeswap-sdk)
[![npm version](https://img.shields.io/npm/v/@pancakeswap-lib/sdk/latest.svg)](https://www.npmjs.com/package/@pancakeswap-lib/sdk/v/latest)

## Running tests

To run the tests, follow these steps. You must have at least node v10 and [yarn](https://yarnpkg.com/) installed.

First clone the repository:

```sh
git clone https://github.com/pancakeswap/pancakeswap-sdk.git
```

Move into the pancakeswap-sdk working directory

```sh
cd pancakeswap-sdk/
```

Install dependencies

```sh
yarn install
```

Run tests

```sh
yarn test
```

You should see output like the following:

```sh
yarn run v1.22.4
$ tsdx test
 PASS  test/constants.test.ts
 PASS  test/pair.test.ts
 PASS  test/fraction.test.ts
 PASS  test/miscellaneous.test.ts
 PASS  test/entities.test.ts
 PASS  test/trade.test.ts

Test Suites: 1 skipped, 6 passed, 6 of 7 total
Tests:       3 skipped, 82 passed, 85 total
Snapshots:   0 total
Time:        5.091s
Ran all test suites.
✨  Done in 6.61s.
```
npm package: @sobers/yome
Description: Yome CLI — AI coding agent
Latest version: 0.0.2

# Yome CLI

AI coding agent in your terminal.

## Install

```bash
npm install -g @sobers/yome
```

Or run directly with npx:

```bash
npx @sobers/yome
```

## Configuration

### Environment Variables

```bash
export YOME_BASE_URL=https://dashscope.aliyuncs.com/apps/anthropic
export YOME_API_KEY=sk-
export YOME_MODEL=qwen-plus
```

| Variable | Description | Default |
|---|---|---|
| `YOME_API_KEY` | API key | - |
| `YOME_BASE_URL` | API base URL | `https://zenmux.ai/api` |
| `YOME_MODEL` | Model name | - |
| `YOME_PROVIDER` | API provider: `anthropic` or `openai` | auto-detected |

### CLI Flags

```bash
yome --key sk-xxx --base-url https://api.anthropic.com
yome --model qwen-plus --provider openai
```

Flags will be saved to `~/.yome/config.json` for future use.

## Usage

```bash
# Interactive mode
yome

# With a prompt
yome "help me read package.json"

# Set config and run
yome --key sk-xxx --base-url https://dashscope.aliyuncs.com/apps/anthropic
```
npm package: @soberwp/sass-tools
Description: Sass tools for creating config and utility first frameworks
Latest version: 0.0.1

# sass-tools

Four useful tools for creating config and utility first frameworks. 

Take a look at [sass-starter](https://github.com/soberwp/sass-starter) to see how it comes together in a starter.

## Installation

Download and `@import` sass-tools;

```shell
yarn add @soberwp/sass-tools
```

```scss
@import "~@soberwp/sass-tools";
```

## Documentation

* [@include util()](https://github.com/soberwp/sass-tools/blob/master/.github/util.md) and [@include util-classes()](https://github.com/soberwp/sass-tools/blob/master/.github/util.md)
  * Define utilities and reuse in classes or create media query prefixed classes.
* [@include fl()](https://github.com/soberwp/sass-tools/blob/master/.github/fl.md)
  * Fluid rem/px values using a ratio between a min and max screen width.
* [@include fs()](https://github.com/soberwp/sass-tools/blob/master/.github/fs.md)
  * Fluid font sizes using a ratio between a min and max screen width.
* [@include mq()](https://github.com/soberwp/sass-tools/blob/master/.github/mq.md)
  * Tiny and smart @media wrapper for faster media query implementation.
npm package: @sobird/actions
Description: Impl Actions runner using typescript
Author: sobird
Latest version: 1.0.2

# <img width="24" src="https://github.githubassets.com/images/modules/site/features/actions-icon-actions.svg" alt="actions"> Actions

Impl Github Actions & Runner using typescript, Run your [GitHub Actions](https://developer.github.com/actions/) locally and deploy your own CI/CD platform.

[![npm][npm]][npm-url]
[![Build Status][build-status]][build-status-url]
[![Install Size][size]][size-url]

## Installation

```sh
npm i -g @sobird/actions
```

## Usage

```sh
actions
Usage: actions [options] [command]

Run GitHub actions locally by specifying the event name (e.g. `push`) or an action name directly.

Options:
  -V, --version              output the version number
  -c, --config <path>        config file path (default: "actions.config.yaml")
  -h, --help                 display help for command

Commands:
  config                     generate an example config file
  run [options] [eventName]  run workflow locally
  help [command]             display help for command
```

### Run workflow locally

Run all local workflows containing push events
```sh
actions run push
```
Run a job with jobId as job-name
```sh
actions run -j job-name
```
Run a job directly on the host
```sh
actions run -j job-name --hosted
```

## Reference

* [actions/runner](https://github.com/actions/runner)
* [nektos/act](https://github.com/nektos/act)
* [go-gitea/gitea](https://github.com/go-gitea/gitea)

<!-- Badges -->
[npm]: https://img.shields.io/npm/v/@sobird/actions.svg
[npm-url]: https://www.npmjs.com/package/@sobird/actions
[build-status]: https://img.shields.io/github/actions/workflow/status/sobird/actions/release-please.yml?label=CI&logo=github
[build-status-url]: https://github.com/sobird/actions/actions
[size]: https://packagephobia.com/badge?p=@sobird/actions
[size-url]: https://packagephobia.com/result?p=@sobird/actions
npm package: @sobird/npm-template
Description: npm template
Author: sobird
Latest version: 1.2.0

# npm-template
Npm package template repository, designed to quickly start a front-end typescript project.

[![npm][npm]][npm-url]
[![Build Status][build-status]][build-status-url]
[![Install Size][size]][size-url]

<!-- Badges -->

[npm]: https://img.shields.io/npm/v/@sobird/npm-template.svg
[npm-url]: https://www.npmjs.com/package/@sobird/npm-template
[build-status]: https://img.shields.io/github/actions/workflow/status/sobird/npm-template/release-please.yml?label=CI&logo=github
[build-status-url]: https://github.com/sobird/npm-template/actions
[size]: https://packagephobia.com/badge?p=@sobird/npm-template
[size-url]: https://packagephobia.com/result?p=@sobird/npm-template

## husky config
```sh
# install
pnpm install --save-dev husky

# husky init
npx husky init
```

## commitlint config
```sh
npm install --save-dev @commitlint/config-conventional @commitlint/cli
echo "export default {extends: ['@commitlint/config-conventional']};" > commitlint.config.js

echo "npx commitlint --edit \$1" > .husky/commit-msg
```

## how to publish

### 一

手动通过下面的命令，进行tag发布

```sh
npm version --patch
npm version --minor
npm version --major
```

### 二

通过 `release-please` 这个自动化Action进行发布，详见 `.github/workflows/release-please.yml` 配置

## 参考

* [约定式提交](https://www.conventionalcommits.org/zh-hans/v1.0.0/)
npm package: @sobird/opusscript
Description: JS bindings for libopus 1.4, ported with emscripten
Author: abalabahaha
Latest version: 0.1.1

# OpusScript

JS bindings for libopus 1.4, ported with Emscripten.

----

## Usage

```js
var OpusScript = require("opusscript");

// 48kHz sampling rate, 20ms frame duration, stereo audio (2 channels)
var samplingRate = 48000;
var frameDuration = 20;
var channels = 2;

// Optimize encoding for audio. Available applications are VOIP, AUDIO, and RESTRICTED_LOWDELAY
var encoder = new OpusScript(samplingRate, channels, OpusScript.Application.AUDIO);

var frameSize = samplingRate * frameDuration / 1000;

// Get PCM data from somewhere and encode it into opus
var pcmData = new Buffer(pcmSource);
var encodedPacket = encoder.encode(pcmData, frameSize);

// Decode the opus packet back into PCM
var decodedPacket = encoder.decode(encodedPacket);

// Delete the encoder when finished with it (Emscripten does not automatically call C++ object destructors)
encoder.delete();
```

## Note: WASM

If your environment doesn't support WASM, you can try the JS-only module. Do note that the JS-only version barely has optimizations due to compiler/toolchain limitations, and should only be used as a last resort.

```js
var encoder = new OpusScript(samplingRate, channels, OpusScript.Application.AUDIO, {
  wasm: false
});
```

## Note: TypeScript

Since this module wasn't written for TypeScript, you need to use `import = require` syntax.

```ts
// Import using:
import OpusScript = require("opusscript");

// and NOT:
import OpusScript from "opusscript";
```
npm package: @sobird/ts-node
Description: ts-node with tsconfig-paths
Author: sobird
Latest version: 1.0.0

# ts-node
通过`node`运行一个带有`tsconfig-paths`配置的 `TypeScript` 脚本。

[![npm][npm]][npm-url]
[![Build Status][build-status]][build-status-url]
[![Install Size][size]][size-url]

<!-- Badges -->

[npm]: https://img.shields.io/npm/v/@sobird/ts-node.svg
[npm-url]: https://www.npmjs.com/package/@sobird/ts-node
[build-status]: https://img.shields.io/github/actions/workflow/status/sobird/ts-node/release-please.yml?label=CI&logo=github
[build-status-url]: https://github.com/sobird/ts-node/actions
[size]: https://packagephobia.com/badge?p=@sobird/ts-node
[size-url]: https://packagephobia.com/result?p=@sobird/ts-node



## ts-node with tsconfig-paths

安装完本包后(建议安装到全局)，配置环境变量

```sh
npm i @sobird/ts-node
# 该路径为@sobird/ts-node实际安装路径
export NODE_OPTIONS="--import=/path/to/register.js"
```
注：此配置可能会影响某些库的运行比如(vitest)

或者配置vscode的launch.json
```json
{
  // 使用 IntelliSense 了解相关属性。 
  // 悬停以查看现有属性的描述。
  // 欲了解更多信息，请访问: https://go.microsoft.com/fwlink/?linkid=830387
  "version": "0.2.0",
  "configurations": [
    {
      "type": "node",
      "request": "launch",
      "name": "Node.js",
      "skipFiles": [
        "<node_internals>/**"
      ],
      "program": "${file}",
      // "preLaunchTask": "tsc:build - tsconfig.json",
      "env": {
        "NODE_OPTIONS": "--import=./node_modules/@sobird/ts-node/register.js"
      }
    }
  ]
}
```

如上配置完成后，即可通过`node`执行运行`TypeScript`文件，比如：

```ts
// test.ts
import fs from 'fs';
// tsconfig-paths
import utils from '@/utils/local'

console.log(fs, utils);
```


```sh
npm run node test.ts
```

## How to publish

### 方式一

手动通过下面的命令，进行tag发布

```sh
yarn version --patch
yarn version --minor
yarn version --major
```

### 方式二

通过 `release-please` 这个自动化Action进行发布，详见 `.github/workflows/release-please.yml` 配置

## 参考

* [约定式提交](https://www.conventionalcommits.org/zh-hans/v1.0.0/)
npm package: @sobird/xiaozhi
Description: Run your XiaoZhi AI on the terminal
Author: sobird
Latest version: 1.2.3

# XiaoZhi AI Terminal
Run your XiaoZhi AI on the terminal

[![npm][npm]][npm-url]
[![Build Status][build-status]][build-status-url]
[![Install Size][size]][size-url]

<!-- Badges -->

[npm]: https://img.shields.io/npm/v/@sobird/xiaozhi.svg
[npm-url]: https://www.npmjs.com/package/@sobird/xiaozhi
[build-status]: https://img.shields.io/github/actions/workflow/status/sobird/xiaozhi/release-please.yml?label=CI&logo=github
[build-status-url]: https://github.com/sobird/xiaozhi/actions
[size]: https://packagephobia.com/badge?p=@sobird/xiaozhi
[size-url]: https://packagephobia.com/result?p=@sobird/xiaozhi

## Usage

**Install [sox](https://sourceforge.net/projects/sox/)**

Configure sox environment variables

```sh
# installed successfully
sox --version
sox:      SoX v
```

**Install [Node.js](https://nodejs.org/)**
```sh
# installed successfully
node -v
v22.1.0
```

**Install XiaoZhi AI**

```sh
npm i -g @sobird/xiaozhi

# Run xzai on the terminal and start a chat
xzai
```
**Note:** Press the spacebar to start chatting(No need to keep pressing), Press the spacebar again to complete the voice input.


## Develop
```sh
# clone repo
git clone https://github.com/sobird/xiaozhi.git
# install deps
pnpm install
# start run
pnpm start
# or npm link to xzai cli to global
npm link

# Run on the terminal
xzai
```

## Wechat

```sh
npx localtunnel --port 3000
```

## FAQ

* 使用`ora`后，设置的`process.stdin.on('keypress', (str, key) => {});`键盘监听事件无效
```ts
const spinner = ora({
  // 此处配置必须false，防止ora阻止用户的键盘输入事件
  discardStdin: false,
});
```

* 按下说话报错，Error: spawn sox ENOENT，详细信息如下
```sh
      throw er; // Unhandled 'error' event
      ^

Error: spawn sox ENOENT
    at ChildProcess._handle.onexit (node:internal/child_process:286:19)
    at onErrorNT (node:internal/child_process:484:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
Emitted 'error' event on ChildProcess instance at:
    at ChildProcess._handle.onexit (node:internal/child_process:292:12)
    at onErrorNT (node:internal/child_process:484:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'spawn sox',
  path: 'sox',
  spawnargs: [
    '--default-device',
    '--no-show-progress',
    '--rate',
    48000,
    '--channels',
    2,
    '--encoding',
    'signed-integer',
    '--bits',
    '16',
    '--type',
    'wav',
    '-'
  ]
}
```

电脑上没有安装sox，请自行根据系统选择安装对应的版本。

* 查看电脑音频设备信息
```sh
# macOS 执行下面命令
$ system_profiler SPAudioDataType
Audio:

    Devices:

        Built-in Microphone:

          Default Input Device: Yes
          Input Channels: 2
          Manufacturer: Apple Inc.
          Current SampleRate: 44100
          Transport: Built-in
          Input Source: Internal Microphone

        Built-in Output:

          Default Output Device: Yes
          Default System Output Device: Yes
          Manufacturer: Apple Inc.
          Output Channels: 2
          Current SampleRate: 44100
          Transport: Built-in
          Output Source: Internal Speakers

```
npm package: @sobol/app
Description: A starter app designed for integrations with Sobol.
Author: Sobol
Latest version: 2.0.0

# @sobol/app

A starter app designed for integrations with Sobol.

## Installation

To download and setup this package, run:

```bash
mkdir my-app
cd my-app
curl -SL $(npm view @sobol/app dist.tarball) | tar --strip-components 1 -xvz
npm install
```

## Prerequisites

Before running the app, you must first aquire a Sobol `API key`:

1. In Sobol, navigate to `Settings` -> `Applications`
2. Create a new application
3. Assign desired permissions (Webhooks require all the `application` permissions)
4. In the app, create a `.env` file at the project root
5. Add your key as `SOBOL_API_KEY=XXXXX`
6. Add some random example key as `EXAMPLE_API_KEY=...`

## Development

To run the app locally, you need to install [ngrok](https://ngrok.com) and then:

1. Run `ngrok http 8085`
2. Copy the `https` ngrok url to the `.env` file as follows `SOBOL_WEBHOOK_URL=<NGROK_URL>/development/events/sobol`
3. Next set `SOBOL_API_URI` if not working against production (eg. `SOBOL_API_URI=http://localhost:8080/api/v1`)
4. Then run `yarn start` or `yarn debug` to bring up inspector

## Production

To run in production:

1. In `.env`, set `NODE_ENV=production` and set `SOBOL_WEBHOOK_HOST` to your server's hostname
2. Run `yarn start-production`

## Help and Feedback

For help and feedback, please send us an email to team@sobol.io and we will respond as soon as possible.