open-index/open-npm huggingface dataset:
npm package: @loggo/state
Description: State Management for React
Author: Milad Majidi
Latest version: 1.0.10

# findingnemo
State Management for React

This is a library, which uses "localStorage" for State Management in React. The Idea is to minimalize the complexity of State Management in React.

https://www.youtube.com/watch?v=W-NSDE3Rhlk

#### 1. Install a fresh reacte-react-app or use your existing React Application
#### 2. In you index.js, generally under /src/index.js

```js
// 1. importing the Library
import State from 'findingnemo'

ReactDOM.render(<App />, document.getElementById('root'), function() {
    // 2. Initialize the Library
    State.init()
});
```

#### 3. In your Component A set your Initial State, finally connect the State (in componentDidMount)

```js
import React from 'react'
import State from 'findingnemo'

export default class ComponentA extends React.Component {
    constructor() {
        super()
        // 1. Initial State
        this.state = {
            place: State.getItem('place') || {name: 'Hamburg'}
        }
    }

    componentDidMount() {
        // 2. Connect the State
        // Always if you do: State.setItem('place', {name: 'Berlin'}), the State of this Component changes!
        State.connect(this, 'place')
    }

    render() {
        return this.state.place.name
    }
}
```

#### 4. Now in Component B you can change the place with State.setItem(), the State changes, and all Components which are connected to place change

```js
import React from 'react'
import State from 'findingnemo'

export default class ComponentB extends React.Component {

    render() {
        return (
            <div>
                <button onClick={() => {State.setItem('place', {name: 'Berlin'})}}>Berlin</button>
                <button onClick={() => {State.setItem('place', {name: 'Hamburg'})}}>Hamburg</button>
            </div>
            )
    }
}
```

#### Initial State

State.init({
    place: {
        name: 'Berlin'
    }
})

## Develop and Build

We are going to use rollup for build the main.js:

```
    npm install --global rollup
```

Just run ```npm run build``` for building the bundle.js.


## Roadmap: What is coming in Next Version?

1. State.removeItem() or State.resetItem() Should set to initialState again.
2. A proposal structure to store the actions of the Application in a MVC way!
3. Offline first, independet views from loading data
npm package: @loggo/tiles
Description: tiles.css is a simple, small and innovative SASS framework, and can be integrated in any project using SASS.
Author: Milad Majidi
Latest version: 1.0.4


# tiles.css

tiles.css is a simple, small and innovative SASS framework, and can be integrated in any project using SASS.

### Features:

* _util.sass
* _responsive.sass
* _tiles.sass
* _spacing.sass
* _color.sass

### _tiles.sass

![Getting Started](https://raw.githubusercontent.com/asropaten/loggo.tiles/master/doc/Preview.png "Getting Started")
npm package: @loggregator/pino-adapter
Description: Pino plugin for loggregator.co
Author: Nico
Latest version: 1.0.0

# `@loggregator/pino-adapter`

Send logs to loggregator using [pino](https://www.npmjs.com/package/pino).

## Install

```
npm i @loggregator/pino-adapter
pnpm add @loggregator/pino-adapter
bun add @loggregator/pino-adapter
yarn add @loggregator/pino-adapter
```

## Usage
An example of using the adapter can be found [here](./example/src/index.ts).

#### Options

When you create your transport through pino, you are able to pass an options object. The following fields can be included in the options object:

| Field | Type | Description |
| --- | --- | --- |
| token | string | The token to use for authentication with loggregator |
| apiURL | string (optional) | The API URL for loggregator, if you have a custom instance. Defaults to the prod hosted version. |

## License

This adapter is licensed under the MIT license. See [LICENSE](./LICENSE) for more details.
npm package: @loggydev/loggy-cli
Description: CLI tool for setting up Loggy in your projects
Author: Loggy
Latest version: 0.1.3

# Loggy CLI

The official CLI tool for setting up [Loggy](https://loggy.dev) in your projects.

## Quick Start

```bash
npx @loggydev/loggy-cli init
```

That's it! The CLI will:

1. 🔍 **Detect your framework** (Next.js, Astro, Remix, Express, etc.)
2. 📦 **Install the SDK** using your package manager
3. 🔑 **Authenticate you** via browser
4. 📝 **Create a project** on Loggy
5. 🚀 **Set up instrumentation** with a ready-to-use utility file

## What It Does

```bash
$ npx @loggydev/loggy-cli init

🚀 Welcome to Loggy!
   Let's get your project set up in under 60 seconds.

✔ Project detected!
   Framework: Next.js
   Package manager: npm
   Project name: my-app

✔ SDK installed!

📦 Let's connect to Loggy:

? How would you like to authenticate?
  ❯ Open browser to sign up / log in
    I already have a project token

✔ Authenticated as kevin@example.com
✔ Project created!
   Project ID: 123

✔ Token saved to .env.local
✔ Instrumentation added!
   ✓ Created src/lib/loggy.ts

✅ Done! Loggy is ready to go.

   Your logs will appear at:
   https://loggy.dev/dash

   Try it out:
   import { loggy } from '@/lib/loggy';
   loggy.info('Hello from Loggy! 🎉');
```

## Supported Frameworks

| Framework   | Detected By        | Env File     | Lib Path            |
| ----------- | ------------------ | ------------ | ------------------- |
| Next.js     | `next`             | `.env.local` | `src/lib/loggy.ts`  |
| Astro       | `astro`            | `.env`       | `src/lib/loggy.ts`  |
| Remix       | `@remix-run/*`     | `.env`       | `app/lib/loggy.ts`  |
| SvelteKit   | `@sveltejs/kit`    | `.env`       | `src/lib/loggy.ts`  |
| Nuxt        | `nuxt`             | `.env`       | `lib/loggy.ts`      |
| Express     | `express`          | `.env`       | `lib/loggy.ts`      |
| Fastify     | `fastify`          | `.env`       | `lib/loggy.ts`      |
| Hono        | `hono`             | `.env`       | `lib/loggy.ts`      |
| Node.js     | (default)          | `.env`       | `lib/loggy.ts`      |

## Options

```bash
npx @loggydev/loggy-cli init [options]

Options:
  --skip-install    Skip SDK installation
  --skip-config     Skip config file modifications
  --token <token>   Use existing project token
  -h, --help        Display help
```

## Manual Installation

If you prefer to set up manually:

1. Install the SDK:
   ```bash
   npm install @loggydev/loggy-node
   ```

2. Create a utility file (e.g., `lib/loggy.ts`):
   ```typescript
   import { CreateLoggy } from "@loggydev/loggy-node";

   export const loggy = CreateLoggy({
     identifier: "my-app",
     remote: {
       token: process.env.LOGGY_TOKEN || "",
     },
   });
   ```

3. Add your token to `.env`:
   ```
   LOGGY_TOKEN=your-project-token
   ```

4. Use it anywhere:
   ```typescript
   import { loggy } from "@/lib/loggy";

   loggy.info("Hello from Loggy!");
   ```

## Development

```bash
# Install dependencies
npm install

# Build
npm run build

# Run locally
node dist/index.js init
```

## License

MIT
# loggy-cli
npm package: @loggydev/mcp-server
Description: MCP server for Loggy - manage heartbeats, status pages, uptime monitors, and more via AI assistants
Author: Loggy
Latest version: 0.1.0

# @loggydev/mcp-server

MCP (Model Context Protocol) server for Loggy. Manage heartbeats, status pages, uptime monitors, feature flags, and more directly from your AI coding assistant.

## Installation

```bash
npm install -g @loggydev/mcp-server
```

Or use directly with npx:

```bash
npx @loggydev/mcp-server
```

## Configuration

### Environment Variables

| Variable | Required | Description |
|----------|----------|-------------|
| `LOGGY_API_TOKEN` | Yes | Your Loggy API token (get one from Settings → API Tokens) |
| `LOGGY_API_URL` | No | API URL (default: `https://loggy.dev`) |

### Claude Desktop

Add to your `~/.config/claude/claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "loggy": {
      "command": "npx",
      "args": ["@loggydev/mcp-server"],
      "env": {
        "LOGGY_API_TOKEN": "lgky_your_token_here",
        "LOGGY_API_URL": "https://loggy.dev"
      }
    }
  }
}
```

### Windsurf / Cascade

Add to your MCP configuration:

```json
{
  "mcpServers": {
    "loggy": {
      "command": "npx",
      "args": ["@loggydev/mcp-server"],
      "env": {
        "LOGGY_API_TOKEN": "lgky_your_token_here",
        "LOGGY_API_URL": "https://loggy.dev"
      }
    }
  }
}
```

## Available Tools

### Heartbeats

- **list_heartbeats** - List all heartbeat monitors
- **create_heartbeat** - Create a new heartbeat monitor
- **get_heartbeat** - Get details of a specific heartbeat
- **delete_heartbeat** - Delete a heartbeat monitor

### Uptime Monitors

- **list_uptime_monitors** - List all uptime monitors
- **create_uptime_monitor** - Create a new uptime monitor
- **delete_uptime_monitor** - Delete an uptime monitor

### Status Pages

- **list_status_pages** - List all status pages
- **create_status_page** - Create a new public status page

### Feature Flags

- **list_feature_flags** - List all feature flags
- **create_feature_flag** - Create a new feature flag
- **toggle_feature_flag** - Enable/disable a feature flag

### Alerts

- **list_alerts** - List recent alerts

### Projects & Logs

- **list_projects** - List all projects
- **get_project_logs** - Get recent logs for a project

## Example Usage

Once configured, you can use natural language with your AI assistant:

- "Create a heartbeat called 'daily-backup' that expects a ping every 24 hours"
- "Set up an uptime monitor for api.myapp.com/health that checks every 5 minutes"
- "Create a feature flag called 'new-dashboard' and enable it for 25% of users"
- "Show me the last 10 error logs from my payment-service project"
- "List all my heartbeats and their current status"

## Requirements

- Node.js 18+
- Loggy Team subscription (API tokens are a Team feature)

## Getting an API Token

1. Go to [loggy.dev/settings#api-tokens](https://loggy.dev/settings#api-tokens)
2. Click "Create Token"
3. Give it a name like "MCP Server"
4. Set permissions (use "Set All Write" for full access)
5. Copy the token immediately (it's only shown once)

## License

MIT
npm package: @logharetm/project-name-generator
Description: Based on the work of [aceakash](https://github.com/aceakash/project-name-generator) with minor changes:
Author: Abdelrahman Awad
Latest version: 1.0.2

# README

Based on the work of [aceakash](https://github.com/aceakash/project-name-generator) with minor changes:

- Rewritten in TS with minor changes
- Changed lodash dependency to use lodash-es
npm package: @loghead/core
Description: Core API and Database for Loghead
Latest version: 0.1.36

# @loghead/core

Core API and Database for Loghead

## Overview

`@loghead/core` provides the foundational components for the Loghead logging platform, including:
- **API Server** - Express-based REST API for managing logs
- **Database Client** - SQLite database integration with vector search capabilities
- **CLI Interface** - Command-line tools for starting the server and UI
- **Authentication** - JWT-based authentication service
- **Ollama Integration** - Integration with Ollama for AI/ML capabilities

## Installation

```bash
npm install @loghead/core
```

## Usage

### CLI Commands

Start the Loghead server:
```bash
loghead start
```

Launch the web UI:
```bash
loghead ui
```

### As a Module

```javascript
import { /* exported functions */ } from '@loghead/core';
```

## Package Contents

### Files Included

This package includes:
- **`dist/`** - Compiled JavaScript output ready for production
- **`build/npm/`** - NPM-specific build artifacts

### Dependencies

#### Production
- `better-sqlite3` - SQLite database driver
- `chalk` - Terminal styling
- `cli-table3` - CLI table formatting
- `cors` - CORS middleware
- `dotenv` - Environment variable management
- `express` - Web framework
- `inquirer` - Interactive CLI prompts
- `jsonwebtoken` - JWT authentication
- `ollama` - Ollama AI integration
- `open` - Open URLs/files
- `sqlite-vec` - Vector search for SQLite
- `yargs` - CLI argument parsing

#### Development
- `@types/*` - TypeScript type definitions
- `tsx` - TypeScript executor

## Entry Points

- **Main Export**: `dist/index.js`
- **CLI Entry Point**: `dist/cli_main.js`
- **Binary**: `loghead` command

## Building

```bash
npm run build
```

This runs:
1. Frontend build: `npm run build:frontend`
2. TypeScript compilation: `tsc`

## Development

```bash
npm run dev
```

Watch mode for continuous development with `tsx watch`.

## Scripts

- `npm start` - Start the server
- `npm run ui` - Launch the UI
- `npm run build` - Build the project
- `npm run dev` - Development mode with watch
- `npm run deploy` - Publish to npm registry

## Repository

- **GitHub**: https://github.com/onvo-ai/loghead
- **Issues**: https://github.com/onvo-ai/loghead/issues
- **Homepage**: https://github.com/onvo-ai/loghead#readme

## License

See LICENSE file in repository.
npm package: @loghole/consensus
Description: tabs consensus
Author: loghole
Latest version: 1.0.2

# Consensus

[![npm version](https://img.shields.io/npm/v/@loghole/consensus.svg?style=flat-square)](https://www.npmjs.com/package/@loghole/consensus)

Allows to select the primary tab among the open. Can use this together with server-sent events.

## Installation

Using npm:

```sh
npm i @loghole/consensus
```

Using yarn:

```sh
yarn add @loghole/consensus
```

## Example

Base:
```javascript
import Consensus from "@loghole/consensus";

const consensus = new Consensus("example")

consensus.init(
    () => { // notification about this tab is primary.
      console.log("is primary")
    },
    () => { // notification about this tab is replica.
      console.log("is replica")
    },
)

window.addEventListener('unload', () => {
  consensus.destroy()
})
```

Simple example with server-sent events:
```javascript
import Consensus from "@loghole/consensus";

const consensus = new Consensus("sse-example", { debug: true });
const broadcast = new BroadcastChannel("broadcast-bus");

let source = undefined;

broadcast.addEventListener("message", ({ data }) => {
  console.log(`received sse event from broadcast: ${data}`);
});

function initSSE() {
  source = new EventSource(`/sse`, {
    withCredentials: true,
  });

  source.addEventListener("example", ({ data }) => {
    console.log(`received sse event: ${data}`);

    broadcast.postMessage({ data: data });
  });
}

function closeSSE() {
  if (source) {
    source.close();
    source = undefined;
  }
}

consensus.init(
  () => { initSSE(); },
  () => { closeSSE(); }
);

window.addEventListener("unload", () => {
  consensus.destroy();
});
```

## Browser Support
* [BroadcastChannel](https://developer.mozilla.org/en-US/docs/Web/API/BroadcastChannel) support required. [Check](https://caniuse.com/broadcastchannel).
npm package: @loghouse/pino-browser
Description: A transmit for pino that sends browser logs to the Loghouse.io
Latest version: 1.0.0

# loghouse-pino-browser

This package provides a transport for [pino][pino] that forwards browser logs to the [Loghouse][loghouse].

## Installation

```bash
$ npm install @loghouse/pino-browser
```

## Configuration

Example:

```js
const { writeBrowserLog } = require('@loghouse/pino-browser')

const logger = require('pino')({
  browser: {
    write: writeBrowserLog({
      accessToken: "${ACCESS_TOKEN}",
      bucketId: "${BUCKET_ID}",
      enabledConsoleOutput: true | false
    })
  }
})

logger.info('test log')
```

#### accessToken

Type: `String` _(required)_

Access token, found on your team's Loghouse page.

#### bucketId

Type: `String` _(required)_

Bucket id, located on your team's Loghouse page, opposite the bucket name.

#### enabledConsoleOutput

Type: `Boolean`

This parameter is responsible for outputting logs to the browser console.

[pino]: https://www.npmjs.com/package/pino
[loghouse]: https://loghouse.io/
npm package: @logi-dx/inject
Description: A relatively simplistic dependency injection library.
Author: Joseph Evans
Latest version: 1.0.1

# Logi-DX Injection

The purpose of this library is rather simplistic in the sense that it's designed to simply 
enable typescript applications to use some degree of dependency injection through the use 
of a series of decorators. 

## Inject 

The ```@Inject``` decorator is intended to decorate class properties, just to help clear up 
the likes of any mess that might accumulate within the constructor & so on. 

An example of how you might consume this might look something along the lines of:

```typescript

interface IUsersRepository {
    // Some interface for the users repository.
}

@Injectable()
class UsersRepository implements IUsersRepository {
    // Some code associated with users & persistent storage.
}

class UsersController {
    @Inject(UsersRepository)
    private repo: IUsersRepository;
}
```

## Injectable 

Since the example above references, I thought it might be wise to simply 
specify the intention of this decorator. The ```@Injectable``` decorator 
is intended to be a class decorator, in doing so, you're informing the 
IOC container that a given class can be injected elsewhere in the code
base. 

## Singleton
The ```@Singleton``` decorator is very similar to the ```@Injectable```
decorator, the difference being that you're informing the IOC container 
that you'd like to create the given dependency as a singleton as opposed 
to creating a new instance of the class every time you want to reference 
the given dependency. 

```typescript
interface IUserManager {
    addUser(): void;
    removeUser(): void;
    countUsers(): number
}

@Singleton()
class UserManager implements IUserManager {
    // Some silly example. 
    private userCount: number;

    public constructor() {
        this.userCount = 0;
    }

    public addUser(): void {
        this.userCount ++;
    }

    public removeUser(): void {
        this.userCount --;
    }

    public countUsers(): number {
        return this.userCount;
    }
}

class Application {
    @Inject(UserManager)
    private manager: IUserManager;
    
    public main() {
        manager.addUser();
        manager.addUser();
        console.log('Example #1', manager.countUsers());
    }
}

class Demo {
    @Inject(UserManager)
    private manager: IUserManager;
    
    public main() {
        manager.addUser();
        manager.addUser();
        console.log('Example #2', manager.countUsers());
    }
}

// Just to run the above code. 
new Application().main();
new Demo().main();
```
npm package: @logic-panda/sdk
Description: LogicPanda AI + Javascript SDK
Author: Misael Borges
Latest version: 1.2.2

[![Build Status](https://img.shields.io/travis/@logic-panda/sdk.svg?branch=master&style=flat-square)](https://travis-ci.org/logic-panda/sdk)
[![NPM Version](https://img.shields.io/npm/v/@logic-panda/sdk.svg?style=flat-square)](https://www.npmjs.com/package/@logic-panda/sdk)
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](http://standardjs.com/)

# LogicPanda AI + Javascript SDK

[logicpanda.app](https://logicpanda.app/)

> Easily create text bots that humans can chat with on their preferred messaging platform.
>
> -- <cite>ai.logicpanda.app</cite>

## Installation

```js
$ npm install @logic-panda/sdk
```

## Integrations

#### Telegraf integration example
  
```js
import Telegraf from 'telegraf';
import { TelegrafPanda } from '@logic-panda/sdk/integrations'

const telegraf = new Telegraf(BOT_TOKEN)
const panda = new TelegrafPanda(APP_KEY)

telegraf.on('text', (ctx) => {
  return panda.getMeaning(ctx.message.text)
    .then((result) => {
      // reply to user with wit result
      return ctx.reply(JSON.stringify(result, null, 2))
    })
})

telegraf.startPolling()

```


There are some other [examples](https://github.com/logic-panda/pdai-javascript-sdk/tree/master/examples).


## Error Handling

To perform custom error-handling, you can set `onError` handler:

```js
panda.on('error', (ctx) => {
  console.error('error', err)
}
```