open-index/open-npm huggingface dataset:
npm package: @heiwa4126/hello
Description: NPM package tutorial
Author: heiwa4126
Latest version: 1.1.1

# npm-hello (@heiwa4126/hello)

npm パッケージの練習。最初は CommonJS のみで始める。

"Hello, NPM package!" を返すだけの関数。

## インストール

```sh
npm install @heiwa4126/hello
```

CLI として `heiwa4126-hello` がインストールされる。

## 使用例

```javascript
const { hello } = require("@heiwa4126/hello");

console.log(hello());
```

output:

```text
Hello, NPM package!
```

または

```sh
npx @heiwa4126/hello
```

## 開発メモ

ソースには run-scripts に

- `npm test` - [tape](https://www.npmjs.com/package/tape) によるテスト
- `npm run lint` - [biome](https://www.npmjs.com/package/@biomejs/biome) による lint
- `npm run fix` - biome による [安全な修正(Safe fixes)](https://biomejs.dev/ja/linter/#%E5%AE%89%E5%85%A8%E3%81%AA%E4%BF%AE%E6%AD%A3safe-fixes)
- `npm run lint:package` - [npm-package-json-lint](https://www.npmjs.com/package/npm-package-json-lint) による package.json の lint
- `npm run linklocal` - 自分自身のリンクを node_modules の下に作る。Python の editable mode (`pip install -e`) に相当する。多分 Linux でしか動かない

が書いてあります。

レポジトリからクローンしたら

```sh
npm i
npm run linklocal  # オプション
```

で始めて作業してください。

また数字のみの git タグ(例:"v1.0.0","v1.0.0-0"など)をつけて、
main ブランチを
GitHub に `git push --tags` すると
GitHub Packages が生成される
GitHub Actions が書いてあります
([release-package.yml](.github/workflows/release-package.yml))。

GitHub Packages については
[GitHub Packages のクイックスタート - GitHub Docs](https://docs.github.com/ja/packages/quickstart)
を参照してください。
npm package: @heiwa4126/hello4
Description: TypeScript hello world library with dual ES modules/CommonJS support. Features GitHub Actions trusted publishing to npmjs with Sigstore attestation.
Author: heiwa4126
Latest version: 0.0.14

# @heiwa4126/hello4

[![npm version](https://img.shields.io/npm/v/@heiwa4126/hello4.svg)](https://www.npmjs.com/package/@heiwa4126/hello4)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![TypeScript](https://img.shields.io/badge/TypeScript-007ACC?logo=typescript&logoColor=white)](https://www.typescriptlang.org/)
[![Node.js](https://img.shields.io/badge/Node.js-18%2B-green.svg)](https://nodejs.org/)

TypeScript hello world library with dual ES modules/CommonJS support. Features GitHub Actions trusted publishing to npmjs with Sigstore attestation.

## Installation

```bash
npm install @heiwa4126/hello4
```

## Usage

### As a library

#### ES Modules (MJS)

```typescript
import { hello } from "@heiwa4126/hello4";

console.log(hello()); // "Hello!"
```

#### CommonJS (CJS)

```javascript
const { hello } = require("@heiwa4126/hello4");

console.log(hello()); // "Hello!"
```

#### TypeScript

```typescript
import { hello } from "@heiwa4126/hello4";

console.log(hello()); // "Hello!"
```

### As a CLI tool

After installation, you can use the CLI command:

```bash
heiwa4126-hello4
```

## Development

```bash
# Install dependencies
npm install

# Build the project
npm run build

# Run tests
npm test

# Clean build artifacts
npm run clean
```

## Build Output

The project builds to both ES modules and CommonJS formats:

- `dist/esm/` - ES modules
- `dist/cjs/` - CommonJS

## Scripts

- `npm run build` - Build both ESM and CJS versions
- `npm run build:esm` - Build ES modules only
- `npm run build:cjs` - Build CommonJS only
- `npm run test:watch` - Run tests in watch mode
- `npm test` - Run tests once
- `npm run clean` - Remove build artifacts

## License

MIT

## Note

[NOTE-ja.md](https://github.com/heiwa4126/heiwa4126-hello4/blob/main/NOTE-ja.md) (on GitHub)
これがこのプロジェクトの本体。
npm package: @heiwa4126/vite-plugin-minify-html
Description: Vite plugin to minify index.html and inline scripts (including importmap JSON).
Author: heiwa4126
Latest version: 0.0.2

# @heiwa4126/vite-plugin-minify-html

English | [日本語](README-ja.md)

[![npm version](https://img.shields.io/npm/v/@heiwa4126/vite-plugin-minify-html.svg)](https://www.npmjs.com/package/@heiwa4126/vite-plugin-minify-html)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![TypeScript](https://img.shields.io/badge/TypeScript-007ACC?logo=typescript&logoColor=white)](https://www.typescriptlang.org/)
[![Node.js](https://img.shields.io/badge/Node.js-18%2B-green.svg)](https://nodejs.org/)

Vite plugin for build-time HTML minification.
It minifies `index.html`, handles inline scripts, and safely compacts `importmap` JSON.

It is mostly a thin wrapper around [html-minifier-terser](https://www.npmjs.com/package/html-minifier-terser), but it also works on Vite 8 (Rolldown).

## Installation

```bash
pnpm add -D @heiwa4126/vite-plugin-minify-html
```

## Usage

```ts
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import { minifyHtml } from "@heiwa4126/vite-plugin-minify-html";

export default defineConfig({
	plugins: [react(), minifyHtml()],
});
```

## API

```ts
minifyHtml({
  dropConsole?: boolean; // default: true
  dropDebugger?: boolean; // default: true
});
```

## Development

```bash
pnpm install
pnpm test
pnpm build
```

## Build Output

- ESM: `dist/index.mjs`
- CJS: `dist/index.cjs`
- Types: `dist/index.d.mts` / `dist/index.d.cts`

## License

MIT
npm package: @hej-ai/crawler
Description: Scrape any webpage into clean markdown
Latest version: 0.1.0

# @hej-ai/crawler

Scrape any webpage into clean markdown.

## Install

```bash
npm install @hej-ai/crawler
```

## Usage

```typescript
import {crawler} from "@hej-ai/crawler"

const {scrape} = crawler("your-api-key")

const page = await scrape("https://example.com")
console.log(page.title)    // "Example Domain"
console.log(page.markdown) // clean markdown content
console.log(page.links)    // internal links found on the page
```

### Scraping modes

```typescript
// Fast HTTP fetch + Readability extraction
await scrape("https://example.com", "static")

// Full headless browser render (default)
await scrape("https://example.com", "playwright")

// Tries static first, uses browser if content differs significantly
await scrape("https://example.com", "scout")
```

### Response

```typescript
{
  url: string      // final URL after redirects
  title: string    // page title
  markdown: string // page content as markdown
  links: string[]  // internal links found
  mode: string     // mode used to produce the result
}
```

## License

MIT
npm package: @hejaz/ai-cli
Description: Hejaz AI CLI — Claude Code-like terminal AI assistant with OS Agent, MCP, and knowledge base integration
Author: Hejaz AI Gateway Team
Latest version: 1.0.0

# @hejaz/ai-cli

A Claude Code-like terminal AI assistant powered by the Hejaz AI Gateway.

## Features

- **Streaming Chat** — Real-time SSE streaming with tool call display
- **OS Agent** — Read/write/edit files, search code (glob/grep), execute shell commands
- **MCP Integration** — Connect to Model Context Protocol servers (stdio transport)
- **Knowledge Base** — Bind and query enterprise knowledge bases
- **Sub-Agent Display** — Parallel agent execution visualization
- **Slash Commands** — `/model`, `/kb`, `/mcp`, `/session`, `/config`, `/help`
- **Permission System** — Three-level access control (auto/confirm/dangerous)

## Install

```bash
npm install -g @hejaz/ai-cli
```

## Quick Start

```bash
# Start with API key
hejaz --api-key gw_YOUR_KEY --base-url https://your-gateway.com

# Or configure once
hejaz --api-key gw_YOUR_KEY --base-url https://your-gateway.com
# Config saved to ~/.hejaz/config.json — subsequent runs just:
hejaz
```

## Usage

```bash
# Chat with AI
> Tell me about this project structure

# Use slash commands
> /model gemini-3-flash-preview
> /kb islamic-knowledge, sales
> /session new
> /help

# AI can use OS tools (with permission prompts)
> Read the package.json and suggest improvements
> Search for all TODO comments in src/
> Run the test suite
```

## CLI Options

| Flag | Short | Description |
|------|-------|-------------|
| `--api-key` | `-k` | Gateway API key |
| `--base-url` | `-u` | Gateway URL (default: http://localhost:8080) |
| `--model` | `-m` | Default model |
| `--tenant-id` | `-t` | Tenant identifier |
| `--kb` | | Knowledge base IDs (comma-separated) |
| `--version` | `-v` | Show version |
| `--help` | | Show help |

## OS Agent Tools

| Tool | Permission | Description |
|------|-----------|-------------|
| `read_file` | Auto | Read file with line numbers |
| `glob` | Auto | File pattern search |
| `grep` | Auto | Content regex search |
| `list_dir` | Auto | Directory listing |
| `tree` | Auto | Directory tree |
| `write_file` | Confirm | Create/overwrite file |
| `edit_file` | Confirm | Exact string replacement |
| `bash` | Dangerous | Shell command execution |

## Configuration

```
~/.hejaz/
├── config.json          # API key, model, base URL
├── permissions.json     # File access rules
├── mcp_servers.json     # MCP server configs
└── sessions/            # Session cache
```

## License

MIT
npm package: @hejk/affix
Description: 固钉组件
Latest version: 0.0.1

# viewer
基于vue2的资源预览控件，支持放大、缩小、旋转、拖拽，支持远程图片预览、调起下载、打印，支持多图预览。

## 更新说明

`v0.2.1`
1. 优化:允许在绑定到全局时传人参数`vue.use(Viewer,options)`,单独使用组件时不生效。
`v0.2.0`
1. 新增 ***pdf-viewer*** pdf预览组件支持支持函数预览
`v0.1.1`
1. 修改下载方法，目前只保留模拟a下载的逻辑
1. 新增`downloadFN`允许自定义下载方法
`v0.1.0`
1. 图片预览控件

## 兼容
+ chrome //谷歌
+ ie11 //IE
+ safari //mac safari
+ firefox // 火狐

## 目录说明

+ build 项目脚手架配置 
+ lib 生产用代码
+ src 源码
+ index.html demo

## 命令

进行开发
```bash
npm start
```

打包出生产版本 commonjs 版本
```bash
npm run build:common

``` 

### 发布代码

```bash
  npm version <newversion> | major | minor | patch]
```

```bash
 npm publish
```

## 安装

```bash
npm i @heisea/viewer
```

## 初始化

```js

import Viewer from '@heisea/viewer'
Vue.use(Viewer,{
    props: {
        fileId: 'id',
        fileName: 'originalFileName',
        fileSuffix: 'ext',
        fileUrl: 'url',
        data: 'data'
    },
    http: {
        filePath: 'http://hxgw.heisea.cn/base/fe/info'
    }
}); // 当前组件
Vue.prototype.$fetch = fetch; // 当传参数时会调用当前获得文件

```
注意pdf预览，必须设置拷贝资源文件vendors~pdfjsWorker.common.js 到根目录
```js
new CopyWebpackPlugin({
        patterns: [
            {
                from: path.resolve(__dirname, '../node_modules/@heisea/viewer/lib/vendors~pdfjsWorker.common.js'),
                to: path.resolve(__dirname, '../dist/')
            }]
    }),

```

## 使用
1.当组件使用
```js
<template>
     <img-viewer v-bind="cfg" />
</template>
<script>
export default {
    data() {
        return {
            cfg: {
                mode: 'img',
                value: 'http://bucket-cert-test.oss-cn-shanghai.aliyuncs.com/2019/10/51df3ed3-fa5f-4334-9963-6767fe63aa06.jpg'
            },
        };
    }
};
</script>

```
2.函数调用 this.$viewer({value:url,options})
支持单独配置配置当前预览器
```js
    // 直接打开图片
    this.$viewer('http://bucket-cert-test.oss-cn-shanghai.aliyuncs.com/2019/10/51df3ed3-fa5f-4334-9963-6767fe63aa06.jpg');
    // 直接打开id对应的资源
    this.$viewer('1182133098524016641,1182222336212881410');
```

## 配置

属性名 | 类型 | 说明
--- | --- | --- 
mode|String|显示状态`node:不显示，btn:按钮，img:图片`
value|Auto|显示的内容`object:作为资源对象，Array:多个资源对象，String：资源地址（支持用‘,’分割多个）`
btnLabel|String、Function|`mode:btn`时使用修改显示内容，默认：“查看文件”,同时支持直接
http | Object | 请求配置，必须配置`$fetch`
http.filePath | String | 文件请求地址
props| Object | 配置字段
extend | Object | 站位节点属性配置
downloadFN | Function | 自定义资源下载逻辑（url,fileName）