open-index/open-npm huggingface dataset:
npm package: @mkproject-code/cmdscript.js
Description: Simple CLI command manager for NodeJS
Author: Mat4B
Latest version: 1.2.4

# CmdScript.js

- Simple CLI command manager for NodeJS.
- Easily create your own commands for your NodeJS project!
- Ready for production.

## Install

```shell
# For NPM
npm install @mkproject-code/cmdscript.js

# For Yarn
yarn add @mkproject-code/cmdscript.js
```

## Requirements

If you want to run your script in TypeScript you need to install `ts-node`:

```shell
# For NPM
npm install --save-dev ts-node

# For Yarn
yarn add --dev ts-node
```

## Usage

```shell
cs <your_command> [your_subcommand] [your_subsubcommand] # and an infinite number of sub sub sub... commands

# example
cs my_command my_subcommand
# or you can use with parameters
cs my_command --param1=value --param2=value
# or
cs my_command --param1=value --param2="value is \"here\" :)"
```

### 1. Create your script file.

For example `script.ts`:

```ts
import {CmdScriptManager} from '@mkproject-code/cmdscript.js'

const cmdManager = new CmdScriptManager({
  commands: [
    {
      command: 'schema',
      description: 'Operations on the database schema.',
      children: [
        {
          command: 'create',
          description: 'Create missing arrays in the database.',
          execute: (params) => {
            console.log('Created!', params)
          },
          children: [ /* there may be more children here :) */ ]
        },
        {
          command: 'update',
          description: 'Create new or update existing tables in the database. This will also remove unused tables from the database!',
          execute: (params) => {
            console.log('Updated!', params)
          },
        },
      ],
    },
  ]
})

// by default it passes all arguments from the CLI (process.argv.slice(2))
cmdManager.performCommand()
// you can pass your own arguments, then only what you pass will be executed
cmdManager.performCommand(['schema','create'])
```

### 2. Specify the path to the script in `package.json`

Add `cmdscript`:

```json lines
{
  //...
  "cmdscript": "src/cmd/scripts.ts" // supports .js or .ts file
}
```

### 3. Run your commands

Type `cs` at the command line and enjoy the working script! :)

Example:

```shell
$ cs schema create --param1=some_value
Created! { param1: 'some_value' }
```
npm package: @mkrabset/krabzcnc-view2d
Description: A xy-plane component with zoom/pan
Author: Marius Krabset
Latest version: 2.0.5

### krabzcnc-view2d

A xy coordinate system canvas with zoom/pan for React.

[Storybook](https://mkrabset.github.io/pages/krabzcnc/krabzcnc-view2d/2.0.0/storybook/)

```npm install @mkrabset/krabzcnc-view2d```
npm package: @mkraina/eslint-config-base
Description: To install used plugins run ``` yarn add -D @prettier/plugin-xml @shopify/eslint-plugin @typescript-eslint/eslint-plugin eslint-plugin-import eslint-plugin-jest eslint-plugin-prefer-arrow eslint-plugin-prettier eslint-plugin-react eslint-plugin-react-perf
Author: Martin Kraina
Latest version: 1.0.2

To install used plugins run
```
yarn add -D @prettier/plugin-xml @shopify/eslint-plugin @typescript-eslint/eslint-plugin eslint-plugin-import eslint-plugin-jest eslint-plugin-prefer-arrow eslint-plugin-prettier eslint-plugin-react eslint-plugin-react-perf eslint-plugin-simple-import-sort eslint-plugin-typescript-enum eslint-plugin-typescript-sort-keys
```
npm package: @mkrainbow/rtio-led-switch-demo
Description: control-led via mcp.
Author: MKRAINBOW
Latest version: 0.0.6

# RTIO MCP Demo

RTIO has REST-like features (such as immediate return of device call results), making it extremely simple for LLM to remotely control devices through MCP (Model Context Protocol). The following demonstrates remote control of an LED via the MCP protocol.

## Available Tools

- `rtio_led_switch`
  - Turn LED on or off via RTIO service。
  - Input: `on` or `off` (string)
  - Returns: The result of turning the LED on or off, or an error message.

## Prompts

Prompts:

- Turn LED on via RTIO service.
- Turn LED off via RTIO service.

## Installation

### NPX

```json
{
  "mcpServers": {
    "google-maps": {
      "command": "npx",
      "args": ["-y", "@mkrainbow/rtio-led-switch-demo"],
      "env": {
        "RTIO_DEVICE_URL": "http(s)://<YOUR_RTIO_SERVICE>/<YOUR_DEVICE_ID>"
      }
    }
  }
}
```

- RTIO_DEVICE_URL - The RTIO server address and deviceID needs to be set.

### Fast-Agent Example

```yaml
mcp:
    servers:
        rtio_led_switch:
            command: "npx"
            args: ["-y", "@mkrainbow/rtio-led-switch-demo"]
            env: 
                RTIO_DEVICE_URL: "http://localhost:17917/cfa09baa-4913-4ad7-a936-3e26f9671b10"

```

## More

Learn more: [LLM-Based Remote LED Control](https://mkrainbow.com/blog/esp32_mcp_led/)

## License

This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository.
npm package: @mkrause/constructor
Description: Create JavaScript constructors using declarative schema definitions.
Author: mkrause
Latest version: 1.0.2


# constructor.js

Utility library to create JavaScript constructors based on a declarative schema.


## Usage:

Example:

```js
    import constructor from '@mkrause/constructor';
    
    const MyConstructor = constructor({ x: String, y: Number });
    const myInstance = MyConstructor({ x: "foo", y: 42 });
    myInstance instanceof MyConstructor; // true
    
    MyConstructor({ x: "foo", y: "42" }); // Throws `InvalidInstanceException`
```

Each instance stores the validated value in a property accessed through a special symbol `constructor.internal`:

```js
    const Person = constructor({ name: String, score: Number });
    const john = Person({ name: "John", score: 101 });
    
    john[constructor.internal]; // { name: "John", score: 101 }
```

This internal property is not supposed to be accessed by the consumer directly. Instead, a constructor should specify a public API through `extend()`:

```js
    const Person = constructor({ name: String, score: Number })
        .extend({
            get name() { return this[constructor.internal].name; },
            get score() { return this[constructor.internal].score; },
        });
    
    const john = Person({ name: "John", score: 101 });
    john.name; // "John"
```

Any JS constructor can be used as type in a schema, including other constructors defined using `constructor()`:

```js
    const Post = constructor({ author: Person, submitted: Date });
    const post = Post({ author: john, submitted: new Date("2017-01-01") });
```


## Similar libraries

- https://github.com/molnarg/js-schema
npm package: @mkrause/react-form
Description: React form component
Author: mkrause
Latest version: 0.2.0


# React form library

Basic React form library. Features a fully consumer controlled form state.


## Usage

```js
import * as ReactForm from '@mkrause/react-form';

const MyForm = () => {
  const [formBuffer, setFormBuffer] = React.useState({ name: '', email: '' });
  
  const validate = React.useCallback(({ name, email }) => {
    const errors = {};
    
    if (name.trim() === '') { errors.name = 'Required'; }
    if (email.trim() === '') { errors.email = 'Required'; }
    else if (!email.includes('@')) { errors.email = 'Invalid email'; }
    
    return errors;
  }, []);
  
  const handleSubmit = React.useCallback(() => {
    // Handle form submit
  }, []);
  
  return (
    <ReactForm.Provider
      buffer={formBuffer}
      onUpdate={setFormBuffer}
      validate={validate}
      onSubmit={handleSubmit}
    >
      {({ errors, submit }) =>
        <form onSubmit={submit}>
          <ReactForm.Field
            accessor="name"
          />
          <ReactForm.Field
            accessor="email"
          />
          
          <button type="submit">Submit</button>
        </form>
      }
    </ReactForm.Provider>
  );
};
```
npm package: @mkrman/sdk
Description: 🛠 An SDK for building applications on top of ZSwap.
Latest version: 2.4.15

# ZSwap SDK

Forked from the [Uniswap SDK](https://github.com/Uniswap/uniswap-v2-sdk/commit/a88048e9c4198a5bdaea00883ca00c8c8e582605).

You can refer to the Uniswap SDK documentation [uniswap.org](https://uniswap.org/docs/v2/SDK/getting-started/).

## 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/mkrman/sdk.git
```

Move into the zswap-sdk working directory

```sh
cd 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: @mkropat/eslint-config
Description: An opinionated set of style rules
Author: Michael Kropat
Latest version: 0.1.1

# @mkropat/eslint-config

*An opinionated set of style rules*

## How to add to a new project

1. Install packages:

    ```
    npm install --save-dev eslint @mkropat/eslint-config
    ```

2. Add the following entry to your eslintrc file:

    ```javascript
    {
      "extends": "@mkropat"
    }
    ```

    <details><summary>Example <code>~/.eslintrc.json</code> starter file</summary>

    ```javascript
    {
      "env": {
        "browser": true,
        "node": true,
        "es2021": true
      },
      "extends": "@mkropat",
      "parserOptions": {
        "ecmaVersion": "latest",
        "sourceType": "module"
      }
    }
    ```

    </details>

## How to update the config

1. Make the change
2. Commit the change
3. Run: `npm publish --access=public`
npm package: @mkrz/cocon
Description: Clone npm package source code for agentic coding tool context
Author: mkreuzmayr
Latest version: 0.0.4

# Cocon

`cocon` is a Bun + TypeScript tool that fetches npm package source code repositories into a shared cache to give agentic coding tools better context.

It has two runtime surfaces:

- A terminal CLI (`cocon`)
- An MCP server binary (`cocon-mcp`)

Package sources are always stored in `~/.cocon/packages`.
When you pull for a project, `cocon` also creates symlinks in `./node_modules/.cocon` so the project has local entry points into the shared cache.

## CLI commands

### `pull`

Pull and cache package repository source.

```bash
cocon pull <packages...>
```

### `sync`

Prefetch and cache repository sources for all dependencies in `package.json` in parallel.
Uses resolved project versions (installed version when available).

```bash
cocon sync
```

### `status`

Show installed vs cached versions, missing targets, and the version each package should pull.

```bash
cocon status
```

### `prune`

Remove old/unused cached versions while honoring keep rules.

```bash
cocon prune [--keep-latest <count>] [--no-keep-project-dependencies] [--keep <package@version...>] [--dry-run]
```

### `list`

List all cached package versions in the shared cache.

```bash
cocon list
```

### `get`

Get cached source info for one package in the shared cache (without downloading).
If multiple versions are cached, all matches are returned unless `--version` is supplied.

```bash
cocon get [--version <version>] <packageName>
```

## MCP tools

- `get_package_source`: resolve installed version from a project and fetch source if needed
- `sync_project_dependencies`: prefetch cache for all project dependencies in parallel
- `get_cache_status`: show installed vs cached versions and missing target cache entries
- `prune_cache`: prune old/unused cache versions with keep rules
- `list_cached_package_sources`: list all package cache entries in the shared cache
- `get_cached_package_source`: inspect existing cached package entries in the shared cache
npm package: @mks-soft/kalia
Description: Payement gateway system
Latest version: 2.0.5

# @mks-soft/kalia

![npm (scoped)](https://img.shields.io/npm/v/@mks-soft/kalia)
![npm bundle size (scoped version)](https://img.shields.io/bundlephobia/min/@mks-soft/kalia/2.0.4)

payement available all over affrica solution

## Install

```
$ npm install @mks-soft/kalia
```

## Usage

```js
//soon
npm package: @mks2508/opentui-image
Description: Image rendering library for OpenTUI - Display images in terminal using half-block characters
Author: MKS2508
Latest version: 0.2.3

# core

To install dependencies:

```bash
bun install
```

To run:

```bash
bun dev
```

This project was created using `bun create tui`. [create-tui](https://git.new/create-tui) is the easiest way to get started with OpenTUI.
npm package: @mks2508/theme-manager-cli
Description: CLI para automatizar la integración del Theme Manager en proyectos Astro
Author: MKS2508
Latest version: 1.0.9

# react

To install dependencies:

```bash
bun install
```

To run:

```bash
bun run src/index.tsx
```

This project was created using `bun init` in bun v1.2.20. [Bun](https://bun.com) is a fast all-in-one JavaScript runtime.
npm package: @mksasi/datepicker
Description: Angular 2+ Simple and minimal datepicker component, added support for Angular 9 (Forked from bleenco/ng2-datepicker)
Latest version: 16.0.0

# datepicker

Angular 2+ Simple and minimal datepicker component, added support for Angular 9
(Forked from bleenco/ng2-datepicker)

## Installation

1. Install package from `npm`.

```sh
npm install @mksasi/datepicker --save
```

2. Include NgDatepickerModule into your application.

```ts
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { NgDatepickerModule } from 'ng2-datepicker';

@NgModule({
  imports: [
    BrowserModule,
    NgDatepickerModule
  ],
  declarations: [ AppComponent ],
  exports: [ AppComponent ]
})
export class AppModule {}
```

## Example
```html
  <ng-datepicker [(ngModel)]="date" />
```

## Additional attributes
|Name|Type|Default|Description|
| --- | --- | --- | --- |
|`headless`|boolean|`false`|Disable datepicker's input|
|`isOpened`|boolean|`false`|Show or hide datepicker|
|`position`|string|`bottom-right`|Dropdown position (`bottom-left`, `bottom-right`, `top-left`, `top-right`)|

## Options
```ts
import { DatepickerOptions } from 'ng2-datepicker';
import * as frLocale from 'date-fns/locale/fr';

options: DatepickerOptions = {
  minYear: 1970,
  maxYear: 2030,
  displayFormat: 'MMM D[,] YYYY',
  barTitleFormat: 'MMMM YYYY',
  dayNamesFormat: 'dd',
  firstCalendarDay: 0, // 0 - Sunday, 1 - Monday
  locale: frLocale,
  minDate: new Date(Date.now()), // Minimal selectable date
  maxDate: new Date(Date.now()),  // Maximal selectable date
  barTitleIfEmpty: 'Click to select a date',
  placeholder: 'Click to select a date', // HTML input placeholder attribute (default: '')
  addClass: 'form-control', // Optional, value to pass on to [ngClass] on the input field
  addStyle: {}, // Optional, value to pass to [ngStyle] on the input field
  fieldId: 'my-date-picker', // ID to assign to the input field. Defaults to datepicker-<counter>
  useEmptyBarTitle: false, // Defaults to true. If set to false then barTitleIfEmpty will be disregarded and a date will always be shown 
};
```

For available `format` options check out [here](https://date-fns.org/docs/format).

In case you want to initialize with an empty value, just assign null to the model attribute you're storing the date and you can customize the message in the bar with the property `barTitleIfEmpty`.

## Run Included Demo

1. Clone this repository

```sh
git clone https://github.com/jkuri/ng2-datepicker.git
cd ng2-datepicker
```

2. Install packages

```sh
npm install
```

3. Run Demo

```sh
npm start
```

## Licence

MIT
npm package: @mksasi/ng2-material-dropdown
Description: Angular material-like dropdown component
Author: Giancarlo Buomprisco
Latest version: 16.0.0

# Angular2 Dropdown Component

Material-like dropdown component for Angular2.

NB: This repository is currently unmaintained. Please fork or use Angular Material's module, it's better.

## Install

    npm install ng2-material-dropdown --save

## Usage

Once installed, import the directives and use it them your container component:

```html
<ng2-dropdown>
    <ng2-dropdown-button>
        Open Menu
    </ng2-dropdown-button>
    <ng2-dropdown-menu>
        <ng2-menu-item *ngFor="let page of pages">
            {{ page }}
        </ng2-menu-item>

        <div class='ng2-menu-divider'></div>

        <ng2-menu-item>
            With Divider
        </ng2-menu-item>
    </ng2-dropdown-menu>
</ng2-dropdown>
```

```javascript
// import module
import { Ng2DropdownModule } from 'ng2-material-dropdown';

@NgModule({
    imports: [ Ng2DropdownModule ]
    // ..
})
export class MyModule {}
```

## API

`ng2-dropdown`
- **`dynamicUpdate`** - **`[?boolean]`** : option to disable the dynamic update of the position on scroll events (defaults to `true`)
- **`onItemSelected()`** - **`[(onItemSelected($event)]`** : event that emits the currently selected/hovered item
- **`onItemClicked()`** - **`[(onItemClicked($event)]`** : event that emits the item clicked on
- **`onShow()`** - **`[(onItemClicked($event)]`** : event that emits when the dropdown gets shown
- **`onHide()`** - **`[(onItemClicked($event)]`** : event that emits when the dropdown gets hidden

`ng2-dropdown-menu`
- **`focusFirstElement`** - **`[?boolean]`** : by default the first element is immediately focused. You can disable by setting this option to false
- **`width`** - **`[?number]`**: this determines the width of the menu. Possible values are 2, 4 and 6. By default, this is set to 4
- **`offset`** - **`[?string]`**: offset to adjust the position of the dropdown with absolute values
- **`appendToBody`** - **`[?boolean]`** : by default the dropdown is appended to the body, but you can disable this by setting it to `false`


`ng2-dropdown-button`
- **`showCaret`** - **`[?boolean]`** : if present, a caret will be appended to the button's text

`ng2-menu-item`
- **`preventClose`** - `[?boolean]` : if present, this attribute prevents the menu to hide when the menu item is clicked
- **`value` - `[?any]`** : any value that you may want to attach to a menu item. Useful for using this component with other components.
npm package: @mksudo/ts-builder
Description: A type aware builder for typescript projects
Author: mksudo
Latest version: 1.0.2

## Typescript Builder

A type safe builder for typescript projects

## Examples

1. Use declaration merging to declare builder schema

```ts
declare module "@mksudo/ts-builder" {
  interface Schemas {
    expr: {
      key: string;
      operator: "=" | ">" | ">=" | "<" | "<=";
      value: string | number | boolean;
    };
  }
}
```

2. Register the builder, this will dynamically create a new class corresponding to the supplied schema key, and each method will be created with a `$` prefix (in order to hack the code suggestion order)

```ts
register("expr", ["key", "operator", "value"]);
```

3. Use the builder

- Builder instance can be retrieved using the `get` method, each builder from the method will be a new instance of the builder class.

```ts
const builder = get("expr");

// {key: "age", operator: "=", value: 18}
const expr = builder.$key("age").$operator("=").$value(18).build();
```

- Builder can be reused, and the values will be copied when the next builder method is called

```ts
const person = builder.$key("name").$operator("=");
// {key: "name", operator: "=", value: "peter"}
const person1 = person.$value("peter").build();
// {key: "name", operator: "=", value: "james"}
const person2 = person.$value("james").build();
```

- Type of each builder method can be overwritten using the `transform` method, which does nothing except refreshing the type of the builder

```ts
const restrictedBuilder = builder.transform<{ key: "population" }>();

// {key: "population", operator: ">", value: 1000}
const people = restrictedBuilder
  .$key("population")
  .$operator(">")
  .$value(1000)
  .build();
// invalid type: "age" is not assignable to parameter of type "population"
const invalid = restrictedBuilder.$key("age");
```
npm package: @mksudo/ts-result
Description: A typescript library which provides rust-like result api to projects
Author: mksudo
Latest version: 1.0.1

# Description
A simple library that provides a result model (Inspired by Rust Result) for projects.

# Usage
+ Create results
```ts
const successfulResult = ok(1);
const unsuccessfulResult = err('oops');
```
+ Check if a result is successful
```ts
const isSuccessful = isOk(result);
const isUnsuccessful = isErr(result);
```
+ Get the value of a result
```ts
const data = expect(result, 'custom error message');
const data = unwrap(result);
const data = unwrapOrDefault(result, defaultValue);
const data = unwrapOrElse(result, func);
const data = unwrapOrUndefined(result);
const data = unwrapOrNull(result);
```
+ Transform a result
```ts
const result = mapResultData(result, func);
const result = mapResultDataOrDefault(result, func, defaultValue);
const result = mapResultError(result, func);
```