open-index/open-npm huggingface dataset:
npm package: @kirdock/discordjs-voice-recorder
Description: Voice recorder or more like a replay buffer for discord.js. Base functionality is "save last x minutes". The output format can be determined to just be a single `.mp3` file or a `.zip` file that contains one audio track per user.
Author: Klaus Striessnig
Latest version: 1.1.1

# Voice recorder for discord.js
Voice recorder or more like a replay buffer for discord.js. Base functionality is "save last x minutes".
The output format can be determined to just be a single `.mp3` file or a `.zip` file that contains one audio track per user.

[![npm version](https://img.shields.io/npm/v/%40kirdock%2Fdiscordjs-voice-recorder)](https://www.npmjs.com/package/@kirdock/discordjs-voice-recorder)

## Difference to other voice recording solutions
You get the track as you would hear it in the voice channel. It's not just the chunks when someone is talking. => The time when someone is not speaking is added.

## Requirements
- `ffmpeg` has to be installed

**Disclaimer**

I suggest not using Windows (or just use WSL). Reason: `sodium` is cumbersome to install.

## How to install
Simply run `npm install @kirdock/discordjs-voice-recorder` or `yarn add @kirdock/discordjs-voice-recorder`

## How to use

```ts
import { VoiceRecorder } from '@kirdock/discordjs-voice-recorder';

const voiceRecorder = new VoiceRecorder();
// optionally provide your Discord client as second parameter in order to have ${username}.mp3 for .zip export rather than ${userId}.mp3


// start recording on a specific connection
voiceRecorder.startRecording(myVoiceConnection);

// save last 5 minutes as .mp3
await voiceRecorder.getRecordedVoice(yourWriteStream, guildId, 'single', 5);
// {yourWriteStream} can be any writeStream. E.g. response object of express or just fs.createWriteStream('myFile.mp3')

// save last 5 minutes as .zip
await voiceRecorder.getRecordedVoice(yourWriteStream, guildId, 'separate', 5);
// {yourWriteStream} can be any writeStream. E.g. response object of express or just fs.createWriteStream('myFile.zip')

// optionally you can provide a dict {[userId]: volume} to adjust the user volume of specific users
await voiceRecorder.getRecordedVoice(yourWriteStream, guildId, 'single', 5, {['1234567']: 80}); // 80%

// stop recording on a specific connection
voiceRecorder.stopRecording(myVoiceConnection);
```

# Implementation example
https://github.com/Kirdock/recordy

## Why is voice recording with discord.js such a big pain?
Because Discord just provides audio chunks (20ms per chunk I guess) when a user is speaking.
Problems are
1. We don't have a single track for a voice channel. Each user has its own stream.
2. We don't have the delay when a user stops and starts speaking again.

=> We have to manually sync the user streams and manually add the delays when a user is speaking.
npm package: @kireapp/kire-viewer-test
Description: Webcomponent kire-viewer following open-wc recommendations
Author: kire-viewer
Latest version: 0.0.5

# \<kire-viewer>

This webcomponent follows the [open-wc](https://github.com/open-wc/open-wc) recommendation.

## Installation

```bash
npm i kire-viewer
```

## Usage

```html
<script type="module">
  import 'kire-viewer/kire-viewer.js';
</script>

<kire-viewer></kire-viewer>
```

## Testing with Web Test Runner

To execute a single test run:

```bash
npm run test
```

To run the tests in interactive watch mode run:

```bash
npm run test:watch
```


## Tooling configs

For most of the tools, the configuration is in the `package.json` to reduce the amount of files in your project.

If you customize the configuration a lot, you can consider moving them to individual files.

## Local Demo with `web-dev-server`

```bash
npm start
```

To run a local development server that serves the basic demo located in `demo/index.html`
npm package: @kireapp/typescript-rollup
Description: This project is a prototype of a Single-page Application using latest and modern web tools.
Latest version: 1.0.0

## A Single-Page Application(SPA) using TypeScript, Rollup.js and Web Dev Server

This project is a prototype of a Single-page Application using latest and modern web tools.

## Quickstart

To get started, install dependencies:

```bash
npm install
```

Serve the Application

```bash
npm run start
```

Build the Application

```bash
npm run build
```
npm package: @kireapp/viewer-test
Description: This project is a prototype of a Single-page Application using latest and modern web tools.
Latest version: 1.0.8

## A Single-Page Application(SPA) using TypeScript, Rollup.js and Web Dev Server

This project is a prototype of a Single-page Application using latest and modern web tools.

## Quickstart

To get started, install dependencies:

```bash
npm install
```

Serve the Application

```bash
npm run start
```

Build the Application

```bash
npm run build
```
npm package: @kirei/hmr-api
Description: @kirei/hmr-api ==========================
Author: iFaxity
Latest version: 2.0.0
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

@kirei/hmr-api
==========================

[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/ifaxity/kirei/Test%20and%20Deploy?style=for-the-badge&logo=github)](https://github.com/iFaxity/kirei/actions)
[![Codecov](https://img.shields.io/codecov/c/github/ifaxity/kirei?style=for-the-badge&logo=codecov)](https://codecov.io/gh/iFaxity/kirei)
[![Codacy grade](https://img.shields.io/codacy/grade/dbdf69a34ba64733ace9d8aa204248ab?style=for-the-badge&logo=codacy)](https://app.codacy.com/manual/iFaxity/kirei/dashboard)
[![Codacy coverage](https://img.shields.io/codacy/coverage/dbdf69a34ba64733ace9d8aa204248ab?style=for-the-badge&logo=codacy)](https://app.codacy.com/manual/iFaxity/kirei/dashboard)
[![npm (scoped)](https://img.shields.io/npm/v/@kirei/hmr-api?style=for-the-badge&logo=npm)](https://npmjs.org/package/@kirei/hmr-api)
[![npm bundle size (scoped)](https://img.shields.io/bundlephobia/min/@kirei/hmr-api?label=Bundle%20size&style=for-the-badge)](https://npmjs.org/package/@kirei/hmr-api)
[![npm bundle size (scoped)](https://img.shields.io/bundlephobia/minzip/@kirei/hmr-api?label=Bundle%20size%20%28gzip%29&style=for-the-badge)](https://npmjs.org/package/@kirei/hmr-api)

Hot Module Replacement API for Kirei Component. This only includes the API and does not offer any automatic instrumentation. Consider using the babel plugin instead (babel-plugin-kirei).

Installation
--------------------------
`npm i @kirei/hmr-api`

or if you use yarn

`yarn add @kirei/hmr-api`

API
--------------------------

```js
import * as hmr from '@kirei/hmr-api';
```

### [hmr.create( filename, opts )](#create)

Solely creates a new component, if component already exists, it will return its constructor.

**Returns:** Component constructor

**Parameters:**
* `filename {string}` - Filename where component was defined
* `opts {ComponentOptions}` - Options to define component with

### [hmr.update( filename, opts )](#update)

Updates element options and all of its instances.

**Returns:** Component constructor

**Parameters:**
* `filename {string}` - Filename where component was defined
* `opts {ComponentOptions}` - Options to update component with

### [hmr.createOrUpdate( filename, opts )](#createOrUpdate)

Stores a component to cache or updates it and all of its active instances

**Returns:** Component constructor

**Parameters:**
* `filename {string}` - Filename where component was defined
* `opts {ComponentOptions}` - Options to update

### [hmr.has( filename, opts )](#has)

Checks if HMR already has component with the same id stored.

**Returns:** True if instance is already in the cache.

**Parameters:**
* `filename {string}` - Filename where component was defined
* `opts {ComponentOptions}` - Component options

License
--------------------------

[MIT](./LICENSE)
npm package: @kirei/shared
Description: @kirei/shared ==========================
Author: iFaxity
Latest version: 2.0.0
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

@kirei/shared
==========================

[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/ifaxity/kirei/Test%20and%20Deploy?style=for-the-badge&logo=github)](https://github.com/iFaxity/kirei/actions)
[![Codecov](https://img.shields.io/codecov/c/github/ifaxity/kirei?style=for-the-badge&logo=codecov)](https://codecov.io/gh/iFaxity/kirei)
[![Codacy grade](https://img.shields.io/codacy/grade/dbdf69a34ba64733ace9d8aa204248ab?style=for-the-badge&logo=codacy)](https://app.codacy.com/manual/iFaxity/kirei/dashboard)
[![Codacy coverage](https://img.shields.io/codacy/coverage/dbdf69a34ba64733ace9d8aa204248ab?style=for-the-badge&logo=codacy)](https://app.codacy.com/manual/iFaxity/kirei/dashboard)
[![npm (scoped)](https://img.shields.io/npm/v/@kirei/shared?style=for-the-badge&logo=npm)](https://npmjs.org/package/@kirei/shared)
[![npm bundle size (scoped)](https://img.shields.io/bundlephobia/min/@kirei/shared?label=Bundle%20size&style=for-the-badge)](https://npmjs.org/package/@kirei/shared)
[![npm bundle size (scoped)](https://img.shields.io/bundlephobia/minzip/@kirei/shared?label=Bundle%20size%20%28gzip%29&style=for-the-badge)](https://npmjs.org/package/@kirei/shared)

Utility functions shared between different packages in the Kirei ecosystem. Link to documentation will deploy as soon as possible.

Installation
--------------------------
`npm i @kirei/shared`

or if you use yarn

`yarn add @kirei/shared`

License
--------------------------

[MIT](./LICENSE)
npm package: @kirei/vite-plugin
Description: @kirei/vite-plugin ==========================
Author: iFaxity
Latest version: 2.0.1
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

@kirei/vite-plugin
==========================

[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/ifaxity/kirei/Test%20and%20Deploy?style=for-the-badge&logo=github)](https://github.com/iFaxity/kirei/actions)
[![Codecov](https://img.shields.io/codecov/c/github/ifaxity/kirei?style=for-the-badge&logo=codecov)](https://codecov.io/gh/iFaxity/kirei)
[![Codacy grade](https://img.shields.io/codacy/grade/dbdf69a34ba64733ace9d8aa204248ab?style=for-the-badge&logo=codacy)](https://app.codacy.com/manual/iFaxity/kirei/dashboard)
[![Codacy coverage](https://img.shields.io/codacy/coverage/dbdf69a34ba64733ace9d8aa204248ab?style=for-the-badge&logo=codacy)](https://app.codacy.com/manual/iFaxity/kirei/dashboard)
[![npm (scoped)](https://img.shields.io/npm/v/@kirei/vite-plugin?style=for-the-badge&logo=npm)](https://npmjs.org/package/@kirei/vite-plugin)
[![npm bundle size (scoped)](https://img.shields.io/bundlephobia/min/@kirei/vite-plugin?label=Bundle%20size&style=for-the-badge)](https://npmjs.org/package/@kirei/vite-plugin)
[![npm bundle size (scoped)](https://img.shields.io/bundlephobia/minzip/@kirei/vite-plugin?label=Bundle%20size%20%28gzip%29&style=for-the-badge)](https://npmjs.org/package/@kirei/vite-plugin)

Vite plugin for Kirei to instrument Kirei elements to add Hot Module Replacement via Babel (babel-plugin-kirei).

Installation
--------------------------
`npm i -D @kirei/vite-plugin`

or if you use yarn

`yarn add -D @kirei/vite-plugin`

API
--------------------------

```js
import kireiPlugin from '@kirei/vite-plugin';
```

### [kireiPlugin( [ opts ] )](#kirei-plugin)

Constructs the vite plugin from a set of optional plugin options.

**Returns:** Vite Plugin

**Parameters:**
* `opts {KireiPluginOptions}` - Object of optional options to pass to the plugin
  * `include {string|string[]}` - Optional string or array of strings of glob patterns to include
  * `exclude {string|string[]}` - Optional string or array of strings of glob patterns to exclude
  * `extension {string|string[]}` - Optional string or array of strings of extensions to include (dot prefixed like .js or .ts)

Examples
--------------------------

To use this plugin define it using vite.config.js

```js
// vite.config.js
const kirei = require('@kirei/vite-plugin');
const kireiOptions = {
  include: 'src/*',
  extension: [ '.js', '.ts' ],
};

module.exports = {
  // ...options
  plugins: [
    kirei(kireiOptions),
  ],
};
```

Testing (TODO: not yet finished)
--------------------------

`npm run test`

License
--------------------------

[MIT](./LICENSE)
npm package: @kirejs/assets
Description: Assets management plugin for Kire.
Author: drysius
Latest version: 0.1.8

# @kirejs/assets

Asset management utilities for Kire applications. Helps with injecting scripts, styles, and managing static resources.

## Features

- **Asset Injection**: Helpers to include CSS and JS files.
- **Versioning**: Support for cache-busting strategies.

## Installation

```bash
npm install @kirejs/assets
# or
bun add @kirejs/assets
```

## License

MIT
npm package: @kirejs/auth
Description: Authentication directives for Kire.
Author: drysius
Latest version: 0.1.8

# @kirejs/auth

Authentication directives and helpers for Kire. Simplifies handling user states in your templates.

## Features

- **@auth / @guest**: Conditionally render content based on authentication state.
- **Role/Permission Checks**: (If configured) Directives for checking user roles.

## Installation

```bash
npm install @kirejs/auth
# or
bun add @kirejs/auth
```

## Usage

```html
@auth
  <p>Welcome back, {{ user.name }}!</p>
@else
  <a href="/login">Login</a>
@end
```

## License

MIT
npm package: @kirejs/iconify
Description: Iconify integration for Kire.
Author: drysius
Latest version: 0.1.8

# @kirejs/iconify

Integration with Iconify for Kire templates. Allows you to easily render thousands of icons from various icon sets directly in your server-rendered views.

## Features

- **Icon Directive/Component**: Easy syntax to include icons.
- **On-demand Loading**: Efficiently loads icon data.

## Installation

```bash
npm install @kirejs/iconify
# or
bun add @kirejs/iconify
```

## Usage

```html
<!-- Example usage assuming a directive or component is provided -->
<kire:icon name="mdi:home" />
```

## License

MIT
npm package: @kirejs/markdown
Description: Markdown plugin for Kire.
Author: drysius
Latest version: 0.1.8

# @kirejs/markdown

Adds Markdown rendering capabilities directly to Kire templates.

## Features

- **@markdown Directive**: Render markdown blocks seamlessly.
- **Configurable**: Support for common markdown options.

## Installation

```bash
npm install @kirejs/markdown
# or
bun add @kirejs/markdown
```

## Usage

```html
@markdown
# Hello World

This is **bold** text rendered from markdown.
@end
```

## License

MIT
npm package: @kirejs/tailwind
Description: Tailwind plugin for Kire.
Author: drysius
Latest version: 0.1.8

# @kirejs/tailwind

Tailwind CSS integration helpers for Kire. Streamlines the usage of utility classes and conditional styling within Kire templates.

## Features

- **Directives**: Simplifies conditional class merging.
- **Integration**: Designed to work seamlessly with standard Tailwind CSS setups.

## Installation

```bash
npm install @kirejs/tailwind
# or
bun add @kirejs/tailwind
```

## License

MIT
npm package: @kirejs/utils
Description: A collection of Laravel-like utilities (Route, Html, etc.) for Kire templates.
Author: drysius
Latest version: 0.1.8

# @kirejs/utils

A collection of Laravel-like utilities (`Route`, `Html`, `Str`, `Arr`, etc.) for Kire templates.

## Installation

```bash
npm install @kirejs/utils
```

## Usage

Register the plugin in your Kire instance:

```typescript
import { Kire } from 'kire';
import KireUtils from '@kirejs/utils';

const kire = new Kire();
kire.plugin(KireUtils);

// Per-request setup (e.g., in Express middleware) using fork()
const fkire = kire.fork();

// Initialize utilities for this request
fkire.route(new URL('http://localhost/admin/dashboard'), 'admin.dashboard');

const html = await fkire.render(`
  @if(Route.is('admin.*'))
    <h1>Admin Area</h1>
  @endif

  <!-- Using Html Helper -->
  {{{ Html.style('css/app.css') }}}
  {{{ Html.script('js/app.js') }}}
  
  <!-- URL Helper -->
  <a href="{{ url('profile') }}">Profile</a>
  
  <!-- Str Helper -->
  <p>{{ Str.limit(description, 50) }}</p>
`);
```

## API

### `kire.route(url: string | URL, name?: string): this`
Initializes the `Route` and `Html` helpers for the current Kire instance (usually a fork).

### Template Helpers

#### `Route`
- **`Route.is(pattern: string | RegExp): boolean`**: Checks if the current request URI matches a given pattern. Supports wildcards (*) or Regex objects.
- **`Route.current(): string`**: Get the current request URI path.
- **`Route.url(): string`**: Get the full URL.
- **`Route.to(path): string`**: Generate absolute URL.
- **`Route.currentRouteName(): string | null`**: Get the name of the current route.

#### `Html`
- **`Html.style(href, attrs)`**: Generates `<link rel="stylesheet">`.
- **`Html.script(src, attrs)`**: Generates `<script>`.
- **`Html.image(src, alt, attrs)`**: Generates `<img>`.
- **`Html.favicon(href)`**: Generates favicon link.
- **`Html.meta(attrs)`**: Generates `<meta>` tag.
- **`Html.link(href, text, attrs)`**: Generates `<a>`.

#### `Str`
- **`Str.limit(string, limit, end)`**
- **`Str.slug(string)`**
- **`Str.title(string)`**
- **`Str.lower(string)`**
- **`Str.upper(string)`**
- **`Str.contains(string, needles)`**

#### `Arr`
- **`Arr.get(array, key, default)`**: Dot notation access.
- **`Arr.has(array, key)`**
- **`Arr.random(array)`**
- **`Arr.wrap(value)`**

#### Context Functions
- **`url(path)`**: Generates an absolute URL.
- **`old(key, default)`**: Retrieves old input (flashed data).
npm package: @kirekov/try-monad
Description: Typescript Try monad
Latest version: 1.1.1

# Try Monad

Typescript Try monad

## Status

[![npm (scoped)](https://img.shields.io/npm/v/@kirekov/try-monad)](https://www.npmjs.com/package/@kirekov/try-monad)
[![Build Status](https://travis-ci.com/SimonHarmonicMinor/try-monad.svg?branch=master)](https://travis-ci.com/SimonHarmonicMinor/try-monad)
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=SimonHarmonicMinor_try-monad&metric=coverage)](https://sonarcloud.io/dashboard?id=SimonHarmonicMinor_try-monad)
[![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=SimonHarmonicMinor_try-monad&metric=code_smells)](https://sonarcloud.io/dashboard?id=SimonHarmonicMinor_try-monad)
[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=SimonHarmonicMinor_try-monad&metric=bugs)](https://sonarcloud.io/dashboard?id=SimonHarmonicMinor_try-monad)
![NPM](https://img.shields.io/npm/l/@kirekov/try-monad)

## Quick Start

```shell
npm install @kirekov/try-monad
```

or

```shell
yarn add @kirekov/try-monad
```

## Usage

The monad purpose is to build a pipeline of computations that might fail.

```typescript
const result =
    Try.of(() => fetchUserCard(userId))
       .filter(card => card.isAccessible)
       .map(card => ({login: card.login, name: card.name, lastName: card.lastName}))
       .flatMap(card => Try.of(() => withUserPermissions(card)))
       .orElse(STUB_USER_CARD);
```

The monad acts *lazily*. So, all computations deffer until terminal operations call
(`orElse`, `orElseGet`, `orElseThrow`).

```typescript
const tryMonad =
    Try.of<UserDTO>(() => JSON.parse(value))
       .map(user => {
         console.log('parsed user', user);
         return user.name;
       });
const name = tryMonad.orElse('default name');
// print happens after 'orElse' call
```

Besides, it is possible to retrieve the first succeeded result.

```typescript
const tryMonad =
    Try.of<string>(() => {
      throw new Error();
    }).orElseTry(() => "right token")
      .orElseTry(() => "wrong token");
const token = tryMonad.orElse("default");
// token === 'right token'
```
npm package: @kirha/ai-sdk
Description: AI SDK tools for Kirha Search API
Author: Kirha
Latest version: 0.1.1

<p align="center">
  <img src="./assets/banner.png" alt="Kirha SDK" />
</p>

<p align="center">
  <a href="https://www.npmjs.com/package/@kirha/ai-sdk"><img src="https://img.shields.io/npm/v/@kirha/ai-sdk" alt="npm version" /></a>
  <a href="https://github.com/kirha-ai/ai-sdk/actions/workflows/ci.yml"><img src="https://github.com/kirha-ai/ai-sdk/actions/workflows/ci.yml/badge.svg" alt="CI" /></a>
  <a href="https://www.npmjs.com/package/@kirha/ai-sdk"><img src="https://img.shields.io/npm/dm/kirha" alt="npm downloads" /></a>
</p>

<p align="center">
  <a href="https://kirha.com"><b>🦋 Kirha</b></a> •
  <a href="https://github.com/kirha-ai/kirha-sdk-typescript"><b>📚 Kirha SDK</b></a> •
  <a href="https://app.kirha.com/auth/register"><b>🔑 Get an API key</b></a>
</p>

# @kirha/ai-sdk

AI SDK tools for [Kirha](https://kirha.ai) search. Compatible with AI SDK v5 and v6.
The tools are based on the [Kirha Typescript SDK](https://github.com/kirha-ai/kirha-sdk-typescript).

## Installation

```bash
npm install @kirha/ai-sdk
```

## Quick Start

```typescript
import { generateText, stepCountIs } from "ai";
import { google } from "@ai-sdk/google";
import { searchTool } from "@kirha/ai-sdk";

// Set KIRHA_API_KEY environment variable
const result = await generateText({
  model: google("gemini-2.0-flash"),
  tools: { search: searchTool() },
  stopWhen: stepCountIs(3),
  prompt: "What are the top crypto trends today?",
});

console.log(result.text);
```

## Configuration

All options are optional:

```typescript
import { searchTool } from "@kirha/ai-sdk";

const tool = searchTool({
  apiKey: "...",                    // defaults to KIRHA_API_KEY env var
  vertical: "crypto",               // focus search on a specific vertical
  summarization: "kirha-flash",     // enable summarization
  includeData: true,             // include raw data in results
  description: "Search for cryptocurrency data",
});
```

## Options

| Option | Type | Default | Description |
|--------|------|---------|-------------|
| `apiKey` | `string` | `KIRHA_API_KEY` env var | API key |
| `vertical` | `string` | - | Data vertical to search |
| `summarization` | `"kirha" \| "kirha-flash" \| { model, instruction? }` | - | Summarization config |
| `includeData` | `boolean` | `true` | Include raw data |
| `includePlanning` | `boolean` | `false` | Include planning info |
| `description` | `string` | Default | Custom tool description |

## Development

```bash
# Install dependencies
bun install

# Run tests
bun test

# Run integration tests (requires API key)
KIRHA_API_KEY=your-key bun test

# Run examples
GOOGLE_GENERATIVE_AI_API_KEY=your-gemini-api-key KIRHA_API_KEY=your-key bun run ./examples/basic-search.ts

# Build
bun run build
```

## License

MIT