open-index/open-npm huggingface dataset:
npm package: @sdh100shaun/octaherd-rename-repos
Description: a octoherd script for renaming repos 
Author: Shaun Hare - shaun@shaunhare.co.uk
Latest version: 1.0.4

# script-octoherd-repo-rename


> Renames a repository using find and replace 


## Usage

Note: Your GitHub account must have owner or admin permission in order to rename the repository

*WARNING* Can do a partial rename across multiple repositories if find is matched.

Minimal usage

```js
npx sdh100shaun/script-octoherd-repo-rename
```

Pass all options as CLI flags to avoid user prompts

```js
npx sdh100shaun/script-octoherd-repo-rename \
  -T ghp_0123456789abcdefghjklwxyzA \
  -R "sdh100shaun/*"
  --find 'old-repo-name'
  --replace 'new-repo-name'
  --octoherd-bypass-confirms true
```

## Options

| option                       | type             | description                                                                                                                                                                                                                                 |
| ---------------------------- | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--octoherd-token`, `-T`     | string           | A personal access token ([create](https://github.com/settings/tokens/new?scopes=repo)). Script will create one if option is not set                                                                                                         |
| `--octoherd-repos`, `-R`     | array of strings | One or multiple space-separated repositories in the form of `repo-owner/repo-name`. `repo-owner/*` will find all repositories for one owner. `*` will find all repositories the user has access to. Will prompt for repositories if not set |
| `--find` |string |  text to find in repository name |
| `--replace` |string |  text to replace in repository name |
| `--octoherd-bypass-confirms` | boolean          | Bypass prompts to confirm mutating requests                                                                                                                                                                                                 |

## Contributing

See [CONTRIBUTING.md](CONTRIBUTING.md)

## About Octoherd

[@octoherd](https://github.com/octoherd/) is project to help you keep your GitHub repositories in line.

## License

[MIT](LICENSE.md)
npm package: @sdjz/ai-sdk
Description: Lightweight AI SDK with agent loop, tools, middleware, and provider orchestration.
Latest version: 0.1.0

# @sdjz/ai-sdk

Lightweight AI SDK for JavaScript/TypeScript.

## Installation

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

## Usage

```ts
import { createAI } from '@sdjz/ai-sdk'
import { openai } from '@sdjz/ai-sdk-provider-openai'

const provider = openai({
  apiKey: process.env.OPENAI_API_KEY!,
  model: 'gpt-4o-mini',
})

const ai = createAI({ provider })
const result = await ai.chat('Hello')

console.log(result.text)
```

## API

- `createAI(options)`
- `generateText(options)`
- `streamText(options)`

## License

MIT
npm package: @sdjz/ai-sdk-provider-nvidia-nim
Description: NVIDIA NIM provider for @sdjz/ai-sdk (OpenAI-compatible /v1 API).
Latest version: 0.1.0

# @sdjz/ai-sdk-provider-nvidia-nim

NVIDIA NIM provider for `@sdjz/ai-sdk`.

Default base URL: `https://integrate.api.nvidia.com/v1`

## Installation

```bash
npm install @sdjz/ai-sdk @sdjz/ai-sdk-provider-openai @sdjz/ai-sdk-provider-nvidia-nim
```

## Usage

```ts
import { createAI } from '@sdjz/ai-sdk'
import { nvidiaNim } from '@sdjz/ai-sdk-provider-nvidia-nim'

const provider = nvidiaNim({
  apiKey: process.env.NVIDIA_API_KEY,
  model: 'meta/llama-3.1-8b-instruct',
})

const ai = createAI({ provider })
const result = await ai.chat('Hello')

console.log(result.text)
```

## API Key Resolution

1. `options.apiKey`
2. `NVIDIA_API_KEY`
3. `NGC_API_KEY`

## List Models

```ts
const models = await provider.models()
console.log(models.map((m) => m.id))
```

## License

MIT
npm package: @sdjz/ai-sdk-provider-openai
Description: OpenAI provider for @sdjz/ai-sdk, compatible with OpenAI-style baseURL endpoints.
Latest version: 0.1.0

# @sdjz/ai-sdk-provider-openai

OpenAI provider for `@sdjz/ai-sdk`.

## Installation

```bash
npm install @sdjz/ai-sdk @sdjz/ai-sdk-provider-openai
```

## Usage

```ts
import { createAI } from '@sdjz/ai-sdk'
import { openai } from '@sdjz/ai-sdk-provider-openai'

const provider = openai({
  apiKey: process.env.OPENAI_API_KEY!,
  model: 'gpt-4o-mini',
})

const ai = createAI({ provider })
const result = await ai.chat('Hello')

console.log(result.text)
```

## Custom Base URL

```ts
const provider = openai({
  apiKey: process.env.OPENAI_API_KEY!,
  baseURL: 'https://your-proxy.example.com/v1',
  model: 'gpt-4o-mini',
})
```

## License

MIT
npm package: @sdjz/balacer
Description: Vercel Edge/Node compatible SOTA load balancer (P2C + PeakEWMA)
Latest version: 0.1.0

# @sdjz/balacer

A **Vercel Edge / Vercel Serverless / Node 18+** compatible load balancer library.

Core strategy:

- **P2C (Power of Two Choices)**: O(1) selection with near-optimal distribution quality.
- **Peak EWMA** latency: reacts quickly to tail latency spikes.
- **inflight (least-loaded)**: avoids pushing traffic to already-queued instances.
- **Error EWMA + Circuit Breaker**: penalize unhealthy instances and open circuits with exponential backoff.
- **Soft stickiness (Jump Consistent Hash)**: session affinity that still escapes slow/unhealthy nodes.

## Install

```bash
npm i @sdjz/balacer
```

## Usage (HTTP / fetch)

```ts
import { LoadBalancer } from '@sdjz/balacer';

const balancer = new LoadBalancer([
  { id: 'a', url: 'https://a.example.com', weight: 2, maxInflight: 64, pools: ['chat'] },
  { id: 'b', url: 'https://b.example.com', weight: 1, maxInflight: 32, pools: ['chat'] },
]);

export default async function handler(req: Request): Promise<Response> {
  const userId = req.headers.get('x-user-id') ?? 'anon';
  const body = await req.text();

  return balancer.fetch(
    { key: userId, pool: 'chat' },
    '/v1/infer',
    { method: 'POST', headers: { 'content-type': 'application/json' }, body },
    { timeoutMs: 20_000, retries: 1, hedgeAfterMs: 400 }
  );
}
```

## Usage (custom task)

```ts
const out = await balancer.run(
  { key: 'user-123' },
  async (backend, { signal }) => {
    return myRpcCall(backend.meta?.endpoint as string, { signal });
  },
  { maxAttempts: 2, timeoutMs: 10_000 }
);
```

## Build

```bash
npm run build
```

## Test

```bash
npm test
```

MIT License.
npm package: @sdjz/kkp
Description: Fast cross-platform CLI to find and kill processes by port
Latest version: 1.1.1

# kkp

Kill processes by port. Fast.

![kkp 3000](demo.png)

## Install

```bash
# npm
npm i -g @sdjz/kkp

# pnpm
pnpm add -g @sdjz/kkp

# bun
bun add -g @sdjz/kkp
```

## Usage

```bash
kkp 3000              # kill port 3000
kkp 3000 5173         # kill multiple
kkp node              # kill all listeners by process name
kkp --list            # list all listeners
kkp                   # interactive TUI
```

<details>
<summary>More screenshots</summary>

**List all listeners**

![kkp --list](list.png)

**Interactive TUI**

![kkp interactive](tui.gif)

</details>

## Why kkp?

- **Fast** — uses `ss` on Linux, `lsof` on macOS, `netstat` on Windows
- **Safe** — protects system processes, requires `--force` to override
- **Simple** — one command, zero config, single dependency

## Options

```
--list, -l       list listeners
--json, -j       JSON output
--dry-run        preview without killing
--force, -f      kill protected processes
--tcp / --udp    filter by protocol
```

## License

MIT
npm package: @sdjz/usql
Description: Query any database from your terminal. SQLite, Postgres, MySQL, DuckDB, Parquet.
Author: sdjz
Latest version: 0.1.2

# usql

Query any database from terminal. Feed your database to LLMs.

![usql](demo.png)

```bash
npm i -g @sdjz/usql
```

## AI Integration

Generate a token-optimized schema dump for ChatGPT, Claude, or any LLM:

```bash
usql inspect ./myapp.db
```

```json
{"v":1,"d":"sqlite","t":{"users":{"c":{"id":"s","name":"s","email":"s"},"pk":["id"],"fk":[],"s":[{"id":"1","name":"Alice"}]}}}
```

Paste this into your AI chat. It now understands your schema, relationships, and sample data.

```bash
usql inspect postgres://localhost/prod --pretty   # Human-readable
usql inspect ./app.db --rows 5                    # More sample rows
```

## Quick Start

```bash
# Query any database
usql ./data.db "SELECT * FROM users"
usql postgres://user:pass@host/db "SELECT now()"
usql mysql://user:pass@host/db "SHOW TABLES"

# Use -c for complex SQL (avoids shell quote issues)
usql ./data.db -c "SELECT * FROM logs WHERE msg LIKE '%error%'"

# Output formats
usql ./data.db "SELECT * FROM users" --format=csv
usql ./data.db "SELECT * FROM users" --format=json
usql ./data.db "SELECT * FROM users" --full  # No truncation
```

Drivers auto-install on first use. Zero config.

## Supported Databases

| Database | Connection |
|----------|------------|
| SQLite | `./file.db` |
| PostgreSQL | `postgres://user:pass@host/db` |
| MySQL | `mysql://user:pass@host/db` |
| DuckDB | `duckdb:./file.duckdb` |
| Parquet | `./file.parquet` |
| MySQL Dump | `./dump.sql` (auto-cached) |

## Interactive REPL

```bash
usql ./app.db
```

```
sqlite> .tables
users orders

sqlite> .schema users
column_name  data_type
----------- ----------
id           INTEGER
name         TEXT
email        TEXT

sqlite> .sample users
id  name   email
--- ------ -----------------
1   Alice  alice@example.com
2   Bob    bob@example.com

sqlite> .inspect
{"v":1,"d":"sqlite",...}   # Paste to AI!
```

### REPL Commands

| Command | Description |
|---------|-------------|
| `.tables` | List all tables |
| `.schema <t>` | Show table structure |
| `.sample <t>` | Preview first 5 rows |
| `.count <t>` | Count rows |
| `.indexes <t>` | Show indexes |
| `.inspect` | AI schema dump |
| `.full` | Toggle full display |
| `.time` | Toggle query timing |
| `.export csv\|json` | Export last result |

## CLI Options

```
-c, --command <sql>    Execute SQL and exit
--format <fmt>         Output: table (default), csv, json
--full, --no-truncate  Show full content
-q, --quiet            Minimal output
--json                 JSON output (auto when piped)
```

## Pipe to Anything

Output is JSON when piped:

```bash
usql ./app.db "SELECT * FROM users" | jq '.rows | length'
usql ./app.db "SELECT * FROM users" --format=csv > export.csv
```

---

MIT