open-index/open-npm huggingface dataset:
npm package: @hp4k1h5/bucket_queue
Description: typescript bucket queue
Author: hp4k1h5
Latest version: 0.0.4

# bucket_queue 

## purpose

This library facilitates the maintenance of _n_ concurrent processes.

It is best suited for cases where the number of processes to execute is potentially unlimited. For example, web crawlers may have an infinite number of webpages to crawl. Maintaining a steady number of concurrent requests allows for smooth overall request distribution and can prevent very long requests from halting the overall program flow. 

# usage

The primary export `supervise` accepts an array of `async function`s, or a function returning an array of `async function`s. `supervise` will execute these concurrently up to the max concurrency limit, replenishing the active execution queue sequentially from the array of requests provided to the asynchronous queue manager, an async generator function.

```javascript
await supervise(queue, 20)
```

The process underneath is roughly:

1) The `queue` provides an array or series of arrays to the `queue manager`
2) the `queue manager feeds them, one-by-one to the `bucket supervisor`
3) the `bucket supervisor` maintains up to the max number of simultaneous processes

See [src/example.js](src/example.js)

Finding the right max for concurrent processes will be system and workload dependent. In cpu intensive workloads, it might be best to limit max concurrent to the number of cores available to the program. In request based workloads, the network latency might allow for thousands of concurrent requests on relatively modest architectures.

For example, [these tests](test/supervise.spec.ts) demonstrate the relative potential of various workloads.

### Observational Results of random sleeps

```
100 "requests" / 10 workers * Math.random() * 50ms sleep
 ~= 250ms total runtime
```

```
1,000 "requests" / 100 workers * Math.random() * 50 ms sleep
 ~= 250ms total runtime
```

You can theoretically execute 1,000 calls as fast as 100, provided you also increase the concurrent worker pool to 100 concurrent workers. Also, you can limit overall resource usage.

### Usage

Run a demonstration [`example.js`](./example.js):

```bash
yarn example
```

### Caveats

Actual usage with network latency type response time distribution would likely show different results.

The test examples are void of any real work being done, and as such, the tests are not indicative of what actual results would show in a live environment under load. In general, if this package is used

I have not experimented with it much beyond the examples in the test cases and `example.js`.
npm package: @hpbyte/h-codex-cli
Description: CLI for h-codex - semantic code search tool
Author: Htoo Pyae Lwin
Latest version: 0.1.2

# h-codex CLI

Command-line interface for h-codex semantic code search.

<img width="1265" height="808" alt="h-codex-cli" src="https://github.com/user-attachments/assets/659b6489-2ba5-4250-b1b7-0a84a1417803" />

## Installation

```bash
npm install -g @hpbyte/h-codex-cli
```

## Setup

Run the setup wizard to configure your API key:

```bash
h-codex init
```

This creates `~/.config/h-codex/config.json` with your settings.

## Configuration

The config file at `~/.config/h-codex/config.json` contains:

```json
{
  "apiKey": "your-api-key",
  "dbConnectionString": "postgresql://localhost:5432/h-codex",
  "baseURL": "https://api.openai.com/v1",
  "model": "text-embedding-3-small",
  "chunkSize": 1000,
  "searchResultsLimit": 10,
  "similarityThreshold": 0.5
}
```

## Commands

```bash
# Index a directory
h-codex index ./src

# List indexed projects
h-codex list

# Clear project's indexed data
h-codex clear project-name
```

## Requirements

- Node.js 18+
- OpenAI API key
- PostgreSQL database
npm package: @hpbyte/h-codex-mcp
Description: Model Context Protocol for h-codexx
Author: Htoo Pyae Lwin
Latest version: 0.2.2

# @hpbyte/h-codex-mcp

Model Context Protocol server for h-codex, providing AI assistants with tools to interact with code indexing and search functionality.

## ✨ Features

- Multiple Projects Support: Index and search multiple projects
- **Semantic Search**: Find relevant code snippets using natural language queries
- **Code Indexing**: Index repositories for semantic code search
- **AI Assistant Integration**: Seamlessly works with AI assistants that support MCP
- **Simple Setup**: Easy configuration with common AI coding tools

## 🚀 Getting started

h-codex MCP server can be integrated with various AI assistants that support the Model Context Protocol:

### Claude Desktop

```json
{
  "mcpServers": {
    "h-codex": {
      "command": "npx",
      "args": ["@hpbyte/h-codex-mcp"],
      "env": {
        "LLM_API_KEY": "your_llm_api_key_here",
        "LLM_BASE_URL": "your_llm_base_url_here (default is openai baseurl: https://api.openai.com/v1)",
        "DB_CONNECTION_STRING": "postgresql://postgres:password@localhost:5432/h-codex"
      }
    }
  }
}
```

### Cursor

1. Navigate to **Settings → MCP Servers → Add Server**
2. Fill in the server details:
   - **Name**: `h-codex`
   - **Type**: `STDIO`
   - **Command**: `npx`
   - **Arguments**: `["@hpbyte/h-codex-mcp"]`
   - **Environment Variables**:
     _ `LLM_API_KEY`: `your-llm-api-key`
     _ `LLM_BASE_URL`: `your_llm_base_url_here (default is openai baseurl: https://api.openai.com/v1)`
     _ And any additional database configuration variables

### Other MCP Clients

The server uses stdio transport and follows the standard MCP protocol. It can be integrated with any MCP-compatible client.

## 🛠️ Available Tools

| Tool Name     | Description                                | Parameters                                      |
| ------------- | ------------------------------------------ | ----------------------------------------------- |
| `code-clear`  | Clear the indexed information of project   | `project`: String - The project to clear index  |
| `code-search` | Semantically search through indexed code   | `query`: String - The search query text         |
| `code-index`  | Index a directory/repository for searching | `path`: String - Path to the directory to index |

### Example Usage

With Claude or other AI assistants, you can use these tools like:

```
Please search the codebase for "database connection implementation"
```

Or:

```
Please index the src directory for me
```

## 🧑‍💻 Development

### Getting Started

```bash
# Clone repository
git clone https://github.com/hpbyte/h-codex.git
cd h-codex

# Install dependencies
pnpm install

# Start development server with hot reload
pnpm --filter @hpbyte/h-codex-mcp dev
```

### Building

```bash
# Build for production
pnpm --filter @hpbyte/h-codex-mcp build
```

## 🔮 Upcoming Features

- [ ] Enhanced code analysis tools
- [ ] Dependency graph analysis

## 📄 License

This project is licensed under the MIT License.