open-index/open-npm huggingface dataset:
npm package: @manzt/uv
Description: An extremely fast Python package and project manager, written in Rust.
Author: Trevor Manz
Latest version: 0.8.13

# @manzt/uv

[![npm version](https://img.shields.io/npm/v/%40manzt%2Fuv)](https://www.npmjs.com/package/@manzt/uv)

This repo mirrors [uv](https://github.com/astral-sh/uv) GitHub releases to npm,
letting you run Astral’s fast Python package manager via JavaScript package
managers — no install needed.

## Usage

Run `uv` via the npm CLI:

```sh
npx @manzt/uv --help
# An extremely fast Python package manager.
#
# Usage: uv [OPTIONS] <COMMAND>
```

Or with one of several other JavaScript package managers:

```bash
# pnpm
pnpx @manzt/uv --help # [pnpm docs](https://pnpm.io/cli/dlx)

# bun
bunx @manzt/uv --help # [bun docs](https://bun.sh/docs/cli/bunx)
```

See uv's [documentation](https://docs.astral.sh/uv/) and
[repository](https://github.com/astral-sh/uv) for more information.

### Example

```sh
npx @manzt/uv init --script foo.py
npx @manzt/uv add --script foo.py rich
echo 'from rich import print; print("[bold green]Hello uv![/bold green]")' >> foo.py
npx @manzt/uv run foo.py
```

## Why?

JavaScript developers like to dunk on Python packaging. Python folks dunk on
JavaScript. It's silly. Both ecosystems have evolved since you last looked.

IMO [uv](https://github.com/astral-sh/uv) has fixed Python packaging, and this
project is an attempt to make that more accessible to JavaScript folks. I also
wanted to learn a bit about how the distribution of binaries works on npm.

## License

MIT
npm package: @manzul/learnstorybook-design-system
Description: storybook design systems tutorial
Author: Adrian
Latest version: 0.2.0

# Storybook design system tutorial

The Storybook design system tutorial is a subset of the full [Storybook design system](https://github.com/storybookjs/design-system/), created as a learning resource for those interested in learning how to write and publish a design system using best in practice techniques.

Learn more in [Storybook tutorials](https://storybook.js.org/tutorials/).
npm package: @mao-fu/eslint-config
Description: 常用的eslint共享配置，包含vue2、vue3、vue3-ts、react、typescript、javascript、node
Author: MaoFu
Latest version: 1.0.1

# 介绍

常用的eslint共享配置，包含vue2、vue3、vue3-ts、react、typescript、javascript、node

你可以查看源代码来了解具体的配置，它都是使用了一些推荐的配置。

# 安装依赖

安装本包：

```javascript
pnpm i -D @mao-fu/eslint-config
```

如果你在接下来的配置中使用了

1. `@mao-fu/eslint-config`

   * 你需要安装`pnpm i -D eslint-plugin-jsdoc`
2. `@mao-fu/eslint-config/typescript`

   * 你需要安装 `pnpm i -D @typescript-eslint/eslint-plugin`
3. `@mao-fu/eslint-config/vue2`,`@mao-fu/eslint-config/vue3`,`@mao-fu/eslint-config/vue3-ts`

   * 你需要安装 `pnpm i -D eslint-plugin-vue`
4. `@mao-fu/eslint-config/react`

   * 你需要安装`pnpm i -D eslint-plugin-react`
5. `@mao-fu/eslint-config/node`

   * 你需要安装`pnpm i -D eslint-plugin-node`
6. `@mao-fu/eslint-config/import`

   * 你需要安装`pnpm i - D eslint-plugin-import`

# 使用

在项目根目录下创建 eslint 配置文件`.eslintrc.cjs`，根据你的需要选择配置：

```javascript
module.exports = {
  /** 通常是一个很好的 ESLint 实践，用于指示此文件是项目使用的根级文件，ESLint 不应该在这个目录之外搜索配置文件。 */
  root: true,
  extends: [
    '@mao-fu/eslint-config',
    '@mao-fu/eslint-config/import',
    '@mao-fu/eslint-config/typescript',
    '@mao-fu/eslint-config/vue3-ts',
    // '@mao-fu/eslint-config/vue3',
    // '@mao-fu/eslint-config/vue2',
    // '@mao-fu/eslint-config/react',
    // '@mao-fu/eslint-config/node',
  ],
};
```

注意，同时使用 ts 和 vue 的 eslint 检查配置时，必须把 vue 的配置放在后边

```
module.exports = {
    /** 通常是一个很好的 ESLint 实践，用于指示此文件是项目使用的根级文件，ESLint 不应该在这个目录之外搜索配置文件。 */
    root: true,
    extends: [
        '@mao-fu/eslint-config',
        '@mao-fu/eslint-config/import',
        '@mao-fu/eslint-config/typescript',
        '@mao-fu/eslint-config/vue3-ts', // 放在后边
    ],
};


```
npm package: @maogo/embedding
Description: 基于 midway 的自定义 embedding 组件库
Author: LvLin
Latest version: 1.0.5

# README.md

# midway 的 embeding 组件

该组件用于实现对文案进行 embedding 的能力。

目前暂时只接入了百度文心大模型接口，[参考文档](https://cloud.baidu.com/doc/WENXINWORKSHOP/s/alj562vvu)。

### 安装

```bash
$ npm i @maogo/embedding
```

### 设置配置项

配置百度的 clientId 和 clientSecret，用于获取 token 鉴权。

```ts
// config.default.ts

import { MidwayConfig } from '@midwayjs/core';

export default {
  //...
  embedding: {
    baiduClientId: 'xxx',
    baiduClientSecret: 'xxx'
  }
  //...
} as MidwayConfig;

```

### 使用示例

midway 组件引入。

```ts
//...
import * as embedding from '@maogo/embedding';

@Configuration({
  imports: [
    //...
    embedding
    //...
  ],
  importConfigs: [join(__dirname, './config')],
})
export class MainConfiguration {
  //...
}

```

具体使用示例如下。

```ts
import { BaiduEmbeddingsService } from '@maogo/embedding';

@Provide()
export class testService {
  @Inject()
  baiduEmbeddingsService: BaiduEmbeddingsService;

  async textToEmbedding() {
    // 接受单个文本传参
    const embeddingData = await this.baiduEmbeddingsService.toEmbeddings('测试文本');

    // 接受多个文本数组传参
    const embeddingData2 = await this.baiduEmbeddingsService.toEmbeddings(['测试文本1', '测试文本2']);

    // 接受指定模型，默认为 embedding-v1
    // 目前支持：embedding-v1，bge-large-zh，bge-large-en，tao-8k
    // 注意每个模型对文本数量和长度的限制，参考上述文档
    const embeddingData3 = await this.baiduEmbeddingsService.toEmbeddings('测试文本', 'bge-large-zh');
  }
}
```

返回值为 baidu 接口的返回值的 data 项，参考[文档](https://cloud.baidu.com/doc/WENXINWORKSHOP/s/alj562vvu)，结构如下：

```js
[
  {
    "object": "embedding",
    "embedding": [...],
    "index": 0
  },
  ...
]
```

其中 embedding 数组就是所需的向量值，有多少个文本就对应多少数组项。
npm package: @maogo/milvus
Description: midwayjs的milvus向量数据库的orm组件
Latest version: 1.1.4

### 该组件为midayjs的milvus ORM组件，部分对应milvus版本为2.4.x

### 安装@maogo/milvus
```bash
$ npm i @maogo/milvus
```

### 启用组件

```javascript
// src/configuration.ts
import * as milvus from '@maogo/milvus';
@Configuration({
  imports: [
    milvus,
    {
      component: info,
      enabledEnvironment: ['local'],
    },
  ],
  importConfigs: [join(__dirname, './config')],
})
```

### 配置组件

```javascript
// src/config/config.default.ts
import * as milvus from '@maogo/milvus';

export default {
  milvus: {
    dataSource: {
      default: {
        host: 'localhost',
        port: '19530',
        username: 'root',
        password: '',
        ssl: false,
        token: '',
        entities: ['entity'],
        database: 'book',
      },
    },
  },
}
```

### 创建实体类

```javascript
// src/entity/book.ts
import { DataType, Column, PrimaryColumn, Entity } from '@maogo/milvus';

@Entity('Book', {
  indexParams: {
    field_name: 'intro',
    extra_params: {
      index_type: 'AUTOINDEX',
      metric_type: 'L2',
    },
  },
})
export class Book {
  @PrimaryColumn({ dataType: DataType.Int64 })
  id: number;

  @Column({ dataType: DataType.FloatVector, dim: 2 })
  intro: string;

  @Column({ dataType: DataType.VarChar, maxLength: 256 })
  name: string;
}
```

### 注入实体类并实现milvus的增删改查

```javascript
import { Provide } from '@midwayjs/core';
import { InjectEntityModel, Repository } from '@maogo/milvus';
import { Book } from '../entity/book';

@Provide()
export class APiService {
  @InjectEntityModel(Book)
  bookModel: Repository<Book>;

  // 新增数据
  insert() {
    this.bookModel.insert({
      partition_name: '', // 分区名称，不传时默认未defalut
      fields_data: []
    })
  }

  // 插入数据
  insert() {
    this.bookModel.insert({
      partition_name: '', // 分区名称，不传时默认未defalut
      fields_data: []
    })
  }

  // 删除数据
  delete() {
    this.bookModel.delete({
      expr: '',
      partition_name: ''
    })
  }

  // 查询数据
  search() {
    this.bookModel.search({})
  }

  // 混合搜索
  hybridSearch() {
    this.bookModel.hybridSearch({})
  }

  // 检索数据
  query() {
    this.bookModel.query({})
  }

  // 创建分区
  createPartition() {
    this.bookModel.createPartition({
      partition_name: '', // 分区名称
    })
  }
}
```
npm package: @maogo/openai
Description: midwayjs的openai在线模型组件
Latest version: 0.0.9

### 该组件为midayjs的智普大模型组件

### 安装@maogo/zhipu
```bash
$ npm i @maogo/zhipu
```

### 启用组件

```javascript
// src/configuration.ts
import * as zhipu from '@maogo/zhipu';
@Configuration({
  imports: [
    zhipu,
    {
      component: info,
      enabledEnvironment: ['local'],
    },
  ],
  importConfigs: [join(__dirname, './config')],
})
```

### 配置组件

```javascript
// src/config/config.default.ts
import * as zhipu from '@maogo/zhipu';

export default {
  zhipu: {
    client: {
      apiKey: ''
    },
  },
}
```

### 创建一个对话

```javascript
// src/service/zhipu.ts
import { Provide } from '@midwayjs/core';
import { ZhipuService } from '@maogo/zhipu';

@Provide()
export class ZhipuService {
  @Inject()
  zhipuService: ZhipuService;

  async dialogue() {
    return await this.zhipuService.createCompletions({
        model: "glm-4",
        messages: [
            {"role": "user", "content": "你好"},
            {"role": "assistant", "content": "我是人工智能助手"},
            {"role": "user", "content": "你叫什么名字"},
            {"role": "assistant", "content": "我叫chatGLM"},
            {"role": "user", "content": "你都可以做些什么事"}
        ],
        // 如果为 true data 就是一个 stream 对象，要通过 on('data', (buffer) => void) 读取数据
        stream: false,
    })
  }
}

```

### 生成一个图片

```javascript
// src/service/zhipu.ts
import { Provide } from '@midwayjs/core';
import { ZhipuService } from '@maogo/zhipu';

@Provide()
export class ZhipuService {
  @Inject()
  zhipuService: ZhipuService;

  async createIamge() {
    return await this.zhipuService.createImages({
        model: "cogview-3",
        prompt: "一只可爱的小猫咪"
    })

  }
}

```

### 创建向量

```javascript
// src/service/zhipu.ts
import { Provide } from '@midwayjs/core';
import { ZhipuService } from '@maogo/zhipu';

@Provide()
export class ZhipuService {
  @Inject()
  zhipuService: ZhipuService;

  async createEmbeddings() {
    return await this.zhipuService.createEmbeddings({
        model: "embedding-2",
        input: "你好"
    })

  }
}

```

### 文件管理

```javascript
// src/service/zhipu.ts
import { Provide } from '@midwayjs/core';
import { ZhipuService } from '@maogo/zhipu';
import { openAsBlob } from 'fs';

@Provide()
export class ZhipuService {
  @Inject()
  zhipuService: ZhipuService;

  async filesOperations() {
    const result = await this.zhipuService.createFiles({
        file: await openAsBlob("file path"),
        purpose: "test"
    })

    const fileList = await this.zhipuService.findFiles(
        purpose?: string;
        limit?: number;
        after?: string;
        order?: "desc" | "asc";
    )

    return {
      result,
      fileList
    }
  }
}

```
npm package: @maogo/rag-file
Description: This is a midway component sample
Latest version: 0.0.8

## 调试相关的代码

config:

```typescript
// config.default.ts
import { MidwayConfig } from '@midwayjs/core';
import { uploadWhiteList } from '@midwayjs/upload';

export default {
  // use for cookie sign key, should change to your own and keep security
  keys: '1710008275436_4273',
  koa: {
    port: 7001,
  },
  upload: {
    mode: 'stream',
    whitelist: uploadWhiteList.concat(['.txt', '.log']),
  },
} as MidwayConfig;

// configuration.ts
import * as maogoUpload from '@maogo/upload';
import * as upload from '@midwayjs/upload';

imports: [
  // ...
  upload,
  maogoUpload,
]
// ...
```

controller:

```typescript
import { Controller, Get, Query, Inject, Post, Files, Fields } from '@midwayjs/core';
import { Context } from '@midwayjs/koa';
import { UploadService as MaogoUploadService } from '@maogo/upload';

@Controller('/')
export class HomeController {
  @Inject()
  ctx: Context;

  @Inject()
  maogoUploadService: MaogoUploadService;

  @Get('/text')
  async text(@Query('text') text: string): Promise<any> {
    console.log('----------- 收到请求 ----------');
    const result = await this.maogoUploadService.textSplit(text, {chunkSize: 10, chunkOverlap: 1});
    console.log('text result: ', result);

    return result;
  }

  @Post('/upload')
  async upload(@Files() files, @Fields() fields): Promise<any> {
    console.log({files, fields});
    return await this.maogoUploadService.fileSplitAndUpload(files[0].data, files[0].filename);
  }
}

```

## 调用

- `/upload` 上传文本文件，form-data，key 为 file，value 选择文件，返回 cosLink 为腾讯云存储的存储地址。
- `/text` 直接使用文本，目前还没存储为文件。
npm package: @maogo/zhipu
Description: midwayjs的智普在线模型组件
Latest version: 0.0.6

### 该组件为midayjs的智普大模型组件

### 安装@maogo/zhipu
```bash
$ npm i @maogo/zhipu
```

### 启用组件

```javascript
// src/configuration.ts
import * as zhipu from '@maogo/zhipu';
@Configuration({
  imports: [
    zhipu,
    {
      component: info,
      enabledEnvironment: ['local'],
    },
  ],
  importConfigs: [join(__dirname, './config')],
})
```

### 配置组件

```javascript
// src/config/config.default.ts
import * as zhipu from '@maogo/zhipu';

export default {
  zhipu: {
    client: {
      apiKey: ''
    },
  },
}
```

### 创建一个对话

```javascript
// src/service/zhipu.ts
import { Provide } from '@midwayjs/core';
import { ZhipuService } from '@maogo/zhipu';

@Provide()
export class ZhipuService {
  @Inject()
  zhipuService: ZhipuService;

  async dialogue() {
    return await this.zhipuService.createCompletions({
        model: "glm-4",
        messages: [
            {"role": "user", "content": "你好"},
            {"role": "assistant", "content": "我是人工智能助手"},
            {"role": "user", "content": "你叫什么名字"},
            {"role": "assistant", "content": "我叫chatGLM"},
            {"role": "user", "content": "你都可以做些什么事"}
        ],
        // 如果为 true data 就是一个 stream 对象，要通过 on('data', (buffer) => void) 读取数据
        stream: false,
    })
  }
}

```

### 生成一个图片

```javascript
// src/service/zhipu.ts
import { Provide } from '@midwayjs/core';
import { ZhipuService } from '@maogo/zhipu';

@Provide()
export class ZhipuService {
  @Inject()
  zhipuService: ZhipuService;

  async createIamge() {
    return await this.zhipuService.createImages({
        model: "cogview-3",
        prompt: "一只可爱的小猫咪"
    })

  }
}

```

### 创建向量

```javascript
// src/service/zhipu.ts
import { Provide } from '@midwayjs/core';
import { ZhipuService } from '@maogo/zhipu';

@Provide()
export class ZhipuService {
  @Inject()
  zhipuService: ZhipuService;

  async createEmbeddings() {
    return await this.zhipuService.createEmbeddings({
        model: "embedding-2",
        input: "你好"
    })

  }
}

```

### 文件管理

```javascript
// src/service/zhipu.ts
import { Provide } from '@midwayjs/core';
import { ZhipuService } from '@maogo/zhipu';
import { openAsBlob } from 'fs';

@Provide()
export class ZhipuService {
  @Inject()
  zhipuService: ZhipuService;

  async filesOperations() {
    const result = await this.zhipuService.createFiles({
        file: await openAsBlob("file path"),
        purpose: "test"
    })

    const fileList = await this.zhipuService.findFiles(
        purpose?: string;
        limit?: number;
        after?: string;
        order?: "desc" | "asc";
    )

    return {
      result,
      fileList
    }
  }
}

```
npm package: @maoism/reactivity
Description: @maoism/reactivity
Author: Evan You
Latest version: 3.4.13

# @maoism/reactivity

## Usage Note

This package is inlined into Global & Browser ESM builds of user-facing renderers (e.g. `@maoism/runtime-dom`), but also published as a package that can be used standalone. The standalone build should not be used alongside a pre-bundled build of a user-facing renderer, as they will have different internal storage for reactivity connections. A user-facing renderer should re-export all APIs from this package.

For full exposed APIs, see `src/index.ts`.

## Credits

The implementation of this module is inspired by the following prior art in the JavaScript ecosystem:

- [Meteor Tracker](https://docs.meteor.com/api/tracker.html)
- [nx-js/observer-util](https://github.com/nx-js/observer-util)
- [salesforce/observable-membrane](https://github.com/salesforce/observable-membrane)

## Caveats

- Built-in objects are not observed except for `Array`, `Map`, `WeakMap`, `Set` and `WeakSet`.
npm package: @maoism/runtime-core
Description: @maoism/runtime-core
Author: Evan You
Latest version: 3.4.13

# @maoism/runtime-core

> This package is published only for typing and building custom renderers. It is NOT meant to be used in applications.

For full exposed APIs, see `src/index.ts`.

## Building a Custom Renderer

```ts
import { createRenderer } from '@maoism/runtime-core'

const { render, createApp } = createRenderer({
  patchProp,
  insert,
  remove,
  createElement
  // ...
})

// `render` is the low-level API
// `createApp` returns an app instance with configurable context shared
// by the entire app tree.
export { render, createApp }

export * from '@maoism/runtime-core'
```

See `@maoism/runtime-dom` for how a DOM-targeting renderer is implemented.
npm package: @maoism/runtime-dom
Description: @maoism/runtime-dom
Author: Evan You
Latest version: 3.4.13

# @maoism/runtime-dom

``` js
import { h, createApp } from '@maoism/runtime-dom'

const RootComponent = {
  render() {
    return h('div', 'hello world')
  }
}

createApp(RootComponent).mount('#app')
```
npm package: @maol-1997/weatherapi-mcp
Description: WeatherAPI MCP server - MCP tool for weather data
Author: maol-1997
Latest version: 1.0.0

# WeatherAPI MCP Server

An MCP server that provides current weather data using WeatherAPI.

## Features

- Get current weather data for any city
- Support for API key via environment variable or command argument
- Easy integration with Claude Desktop App, Windsurf IDE, Cursor IDE, and other MCP clients

## Getting Started

### Get WeatherAPI Key

1. Go to [WeatherAPI.com](https://www.weatherapi.com)
2. Sign up for a free account
3. After signing in, go to your dashboard
4. Copy your API key from the "API Keys" section

### Installation

```bash
npm install -g @maol/weatherapi-mcp
```

### MCP Configuration

Add the following configuration to your MCP config file:

#### Option 1: Using environment variable
```json
{
  "mcpServers": {
    "weather": {
      "command": "npx",
      "args": ["-y", "@maol/weatherapi-mcp"],
      "env": {
        "WEATHER_API_KEY": "YOUR_API_KEY_HERE"
      }
    }
  }
}
```

#### Option 2: Using command argument
```json
{
  "mcpServers": {
    "weather": {
      "command": "npx",
      "args": ["-y", "@maol/weatherapi-mcp", "YOUR_API_KEY_HERE"]
    }
  }
}
```

Replace `YOUR_API_KEY_HERE` with the API key you obtained from WeatherAPI.com.

### Tools

#### get_weather

Get current weather data for a specified city.

Parameters:
- `location` (string): City name

Example response:
```json
{
  "location": "London",
  "country": "United Kingdom",
  "temp_c": 15.0,
  "condition": "Partly cloudy",
  "humidity": 71,
  "wind_kph": 14.4
}
```

### Repository

[WeatherAPI MCP Server](https://github.com/Maol-1997/weatherapi-mcp)

## Author

maol

## License

MIT