open-index/open-npm huggingface dataset:
npm package: @stanlemon/app-template
Description: A template for creating apps using the webdev package.
Author: Stan Lemon
Latest version: 0.4.27
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# App

A web application built with [React](http://reactjs.org) using [@stanlemon/webdev](https://www.npmjs.com/package/@stanlemon/webdev).
npm package: @stanlemon/cli
Description: A command tool to make all of my things easier.
Author: Stan Lemon
Latest version: 0.1.30
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# Lemon Command Line Tool

[![npm version](https://badge.fury.io/js/%40stanlemon%2Fcli.svg)](https://badge.fury.io/js/%40stanlemon%2Fcli)

Everyone needs their own command line tool!

There is currently one command, `create` which will create a copy of `@stanlemon/app-template` in the directory you specify.

You can use it like this:

```shell
npx @stanlemon/cli@latest create my-awesome-webapp
```

Some day there may be more, so stay tuned!
npm package: @stanlemon/eslint-config
Description: My typical eslint setup, but without all the copy and paste.
Author: Stan Lemon
Latest version: 3.0.72
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# ESLint Config

[![npm version](https://badge.fury.io/js/%40stanlemon%2Feslint-config.svg)](https://badge.fury.io/js/%40stanlemon%2Feslint-config)

ESLint is great, but it takes a lot to setup! This is my attempt to create a package that contains all of the dependencies I need, plus a simple config to use.

To use this, simply create the following file:

.eslintrc.json
```json
{
  "extends": [
    "@stanlemon"
  ]
}
```

For the most part this config utilizes `create-react-app` with support for `typescript` (only in typescript files) and is consistent with `prettier` formatting.

If you don't like it, use something else. ;)
npm package: @stanlemon/react-pouchdb-example
Description: A react app using pouchdb built in typescript
Author: Stan Lemon
Latest version: 0.3.32
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# Example App

A react app using pouchdb written in typescript.

This repository is a personal playground for setting up and configuring some of the libraries written by [Stan Lemon](https://stanlemon.com).

To get started:

```shell
npm install
```

To run the app:

```shell
npm start
```

To run the tests:

```shell
npm test
```
npm package: @stanlemon/server
Description: A basic express web server setup.
Author: Stan Lemon
Latest version: 0.4.25
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# Express App Server

[![npm version](https://badge.fury.io/js/%40stanlemon%2Fserver.svg)](https://badge.fury.io/js/%40stanlemon%2Fserver)

This is a base express app server that is wired up with sensible defaults, like compression, json support and serving the `dist` folder statically.

It also include a function called `asyncJsonHandler` which is a wrapper for most express requests. It standardizes input/output as JSON, accepting camel case properties and snake casing them for output. It also covers a bunch of standard error behaviors.

When `NODE_ENV=development` the server will also proxy requests to webpack.

This library goes well with [@stanlemon/webdev](../webdev/README.md).

```javascript
import {
  createAppServer,
  asyncJsonHandler as handler,
  NotFoundException,
} from "@stanlemon/server";

const app = createAppServer({ port: 3003 });

// curl http://localhost:3003/hello?name=Stanley
app.get(
  "/hello",
  handler(({ name }) => ({ hello: name || "Stan" }))
);

// curl http://localhost:3003/hello/Stan
app.get(
  "/hello/Stan",
  // Promises are handled correctly
  handler(() => {
    // This is the same as just hitting /hello, so we'll demonstrate the exception handling
    throw new NotFoundException();
  })
);

// curl http://localhost:3003/hello/Stanley
app.get(
  "/hello/:name",
  // Promises are handled correctly
  handler(({ name }) => Promise.resolve({ hello: name || "Stan" }))
);

// curl -X POST http://localhost:3003/hello -H 'Content-Type: application/json' -d '{"name": "Stanley"}'
app.post(
  "/hello",
  // You can also use async/await
  handler(async ({ name }) => await Promise.resolve({ hello: name || "Stan" }))
);
```
npm package: @stanlemon/server-with-auth
Description: A basic express web server setup with authentication baked in.
Author: Stan Lemon
Latest version: 0.4.21
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# Express App Server with Authentication

[![npm version](https://badge.fury.io/js/%40stanlemon%2Fserver-with-auth.svg)](https://badge.fury.io/js/%40stanlemon%2Fserver-with-auth)

This is a base express app server that is wired up with sensible defaults, like compression, json support and serving the `dist` folder statically and also includes basic authentication support. It builds off of the [@stanlemon/server](../server/README.md) package.

This package includes authentication against secure endpoints using JWT. There are endpoints for logging in and signing up, as well as basic user management flows such as updating a profile, verifying a user and resetting a password.

When `NODE_ENV=development` the server will also proxy requests to webpack.

This library goes well with [@stanlemon/webdev](../webdev/README.md). You can see this package, along with [@stanlemon/webdev] in action by using the [@stanlemon/app-template](../../apps/template/README.md) package.

```javascript
import {
  createAppServer,
  asyncJsonHandler as handler,
  NotFoundException,
  LowDBUserDao,
  createLowDb
} from "@stanlemon/server-with-auth";
import  from "./src/data/lowdb-user-dao.js";

const db = createLowDb();
const dao = new LowDBUserDao(db);

const app = createAppServer({
  port: 3003,secure: ["/api/"],
  schemas,
  dao,
 });


// Insecure endpoint
app.get(
  "/",
  handler(() => ({ hello: "world" }))
);

// Secure endpoint
app.get(
  "/api/users",
  handler(() => ({
    users: db.data.users.map((u) =>
      omit(u, ["password", "verification_token"])
    ),
  }))
);
```
npm package: @stanlemon/types-pouchdb-core
Description: Alternative Typescript types for use with PouchDB, forked from DefinitelyTyped.
Author: Stan Lemon
Latest version: 0.0.3
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# Alternative PouchDB Types for TypeScript

If you are using Typescript in your project, the PouchDB types `@types/pouchdb` can be problematic because they declare several types in the global namespace that exist in `@types/node`. This package is a fork of []`@types/pouchdb-core`](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/pouchdb-core) that removes the `Buffer` type from the global namespace, thus making it usable in modern Typescript projects.

This issue is pretty documented, for example [here](https://github.com/DefinitelyTyped/DefinitelyTyped/discussions/62134) and [here](https://stackoverflow.com/questions/68833139/cannot-export-buffer-only-local-declarations-can-be-exported-from-a-module).

**I did not create these types, please check out the original package for all the details.**

## Usage

You can use these alternative types by adding the following to your package.json to override `@types/pouchdb-core` where the problem exists.

```json
{
  "devDependencies": {
    "@types/pouchdb": "^6.4.2",
    "@types/debug": "^4.1.12"
  },
  "overrides": {
    "@types/pouchdb-core": "npm:@stanlemon/types-pouchdb-core@^0.0.3"
  }
}
```
npm package: @stanlemon/webdev
Description: My typical web development setup, but without all the copy and paste.
Author: Stan Lemon
Latest version: 0.2.78

# Webdev

[![npm version](https://badge.fury.io/js/%40stanlemon%2Fwebdev.svg)](https://badge.fury.io/js/%40stanlemon%2Fwebdev)

This repository contains all of my usual environment setup for babel, webpack and jest for developing React apps. I got tired of copying and pasting the same config files everywhere, so I put this together.

To get started, create these files:

package.json
```json
{
  "type": "module",
  "scripts": {
    "start": "webpack serve",
    "build": "NODE_ENV=production webpack",
    "test": "jest",
    "lint": "biome check .",
    "lint:fix": "biome check --write ."
  },
  "devDependencies": {
    "@biomejs/biome": "^2.4.10",
    "@stanlemon/webdev": "*"
  }
}
```

webpack.config.js
```javascript
export { default } from "@stanlemon/webdev/webpack.config.js";
```

jest.config.js
```javascript
export { default } from "@stanlemon/webdev/jest.config.js";
```

biome.json
```json
{
  "files": {
    "includes": [
      "**",
      "!**/dist",
      "!**/node_modules",
      "!**/.git"
    ]
  },
  "assist": {
    "enabled": false
  },
  "formatter": {
    "indentStyle": "space",
    "indentWidth": 2
  },
  "javascript": {
    "formatter": {
      "trailingCommas": "es5"
    },
    "jsxRuntime": "transparent"
  },
  "linter": {
    "domains": {
      "react": "recommended",
      "test": "recommended"
    },
    "rules": {
      "complexity": {
        "useOptionalChain": "off"
      },
      "correctness": {
        "noUnusedVariables": "warn"
      },
      "style": {
        "useNodejsImportProtocol": "off"
      },
      "suspicious": {
        "noConsole": {
          "level": "warn",
          "options": {
            "allow": [
              "warn",
              "error"
            ]
          }
        },
        "noDoubleEquals": {
          "level": "error",
          "options": {
            "ignoreNull": false
          }
        }
      }
    }
  }
}
```

Then run `npm install` and start coding!

If you need the old full-stack starter app, use the historical snapshot at [deprecate-2026-03-app-template-hello-world-servers](https://github.com/stanlemon/javascript/tree/deprecate-2026-03-app-template-hello-world-servers/apps/template).

_Eventually I'll add some CLI tooling to streamline this further._
npm package: @stanley2058/hackmd-mcp
Description: A Model Context Protocol (MCP) server for interacting with HackMD API.
Latest version: 1.0.4

# hackmd-mcp

A Model Context Protocol (MCP) server for interacting with HackMD API.

## Features

- Get workspace notes (personal or team)
- Get single note details
- Create/update notes
- Delete notes

## Prerequisites

- HackMD API key (obtain from HackMD settings)

## Installation

### Using npx (Recommended)

No installation required! Run directly with:

```bash
npx -y @stanley2058/hackmd-mcp
```

### For Development

```bash
npm install
# or
bun install
```

## Configuration

### Environment Variables

**Required:**

- `HACKMD_API_KEY`: Your HackMD API key (obtain from HackMD settings)

**Optional:**

- `PORT`: HTTP server port (default: `3000`, only used in HTTP mode)

## Usage

This MCP server supports two modes: `stdio` and `http`.

### stdio Mode (Default)

Run the server in stdio mode for direct MCP client integration:

Using npx:

```bash
HACKMD_API_KEY=your_api_key npx -y @stanley2058/hackmd-mcp
```

Or from source:

```bash
HACKMD_API_KEY=your_api_key node dist/index.js
# or
HACKMD_API_KEY=your_api_key bun run index.ts
```

### HTTP Mode

Run the server in HTTP mode to expose an HTTP endpoint:

Using npx:

```bash
HACKMD_API_KEY=your_api_key npx -y @stanley2058/hackmd-mcp --http
```

Or from source:

```bash
HACKMD_API_KEY=your_api_key node dist/index.js --http
# or
HACKMD_API_KEY=your_api_key bun run index.ts --http
```

The server will start on `http://localhost:3000/mcp` by default. Change the port using the `PORT` environment variable:

```bash
HACKMD_API_KEY=your_api_key PORT=8080 npx -y @stanley2058/hackmd-mcp --http
```

## Building

```bash
bun run build
```

## License

MIT
npm package: @stanley2058/local-reflect-mcp
Description: This is a simple tool to reflect server side tool calls for multilayer tool calling.
Latest version: 1.0.0

# local-reflect-mcp

This is a simple tool to reflect server side tool calls for multilayer tool calling.

If you are like me and have the following requirement:

1. You have a server with tools.
2. You have a client also with tools.
3. You want to be able to call both client and server tools without shadowing any of them.

On your server you can replace reflect tool calls with the actual tool name to make the model think it's calling the correct tool. Example code using AI-SDK:

```ts
type ReflectIOShape = {
  id: string;
  name: string;
  input: unknown;
  output: unknown;
};
function convertServerSideToolCallsWithReflection(
  messages: ModelMessage[],
  reflectionToolName: string,
) {
  const toolResultMap = new Map<string, ReflectIOShape>();
  const output = structuredClone(messages);
  for (let i = 0; i < output.length; i++) {
    const message = output[i]!;
    if (message.role === "assistant") {
      if (typeof message.content === "string") continue;
      for (let j = 0; j < message.content.length; j++) {
        const content = message.content[j]!;
        if (content.type === "tool-call") {
          if (content.toolName !== reflectionToolName) continue;
          const payload = content.input as ReflectIOShape;
          toolResultMap.set(payload.id, payload);

          content.toolName = payload.name;
          content.input = payload.input;
        }
        if (content.type === "tool-result") {
          if (content.output.type !== "text") continue;
          if (content.toolName !== reflectionToolName) continue;

          const payload = toolResultMap.get(content.toolCallId);
          if (!payload) continue;

          content.toolName = payload.name;
          content.output = {
            type: "text",
            value: JSON.stringify(payload.output),
          };
        }
      }
    }

    if (message.role === "tool") {
      for (let j = 0; j < message.content.length; j++) {
        const content = message.content[j]!;

        if (content.output.type !== "text") continue;
        if (content.toolName !== reflectionToolName) continue;
        const payload = toolResultMap.get(content.toolCallId);
        if (!payload) continue;
        content.toolName = payload.name;
        content.output = {
          type: "text",
          value: JSON.stringify(payload.output),
        };
      }
    }
  }
  return output;
}
```
npm package: @stanley2058/simple-module-logger
Description: To install dependencies:
Latest version: 0.0.4

# simple-module-logger

To install dependencies:

```bash
bun install
```

To run:

```bash
bun run index.ts
```

This project was created using `bun init` in bun v1.3.5. [Bun](https://bun.com) is a fast all-in-one JavaScript runtime.
npm package: @stanley2058/xcli
Description: Simple CLI for the X API v2 (currently read-only).
Latest version: 0.0.4

# xcli

Simple CLI for the X API v2 (currently read-only).

## Install

```bash
npm i -g @stanley2058/xcli
# or
bun i -g @stanley2058/xcli

xcli --help
```

Or run:

```bash
npx @stanley2058/xcli --help
# or
bunx @stanley2058/xcli --help
```

## Usage

Examples:

```bash
# User lookup (inferred)
X_API_BEARER_TOKEN=... bun run xcli -- users XDevelopers
X_API_BEARER_TOKEN=... bun run xcli -- users 2244994945
X_API_BEARER_TOKEN=... bun run xcli -- users https://x.com/XDevelopers

# Post lookup (inferred)
X_API_BEARER_TOKEN=... bun run xcli -- posts 1228393702244134912
X_API_BEARER_TOKEN=... bun run xcli -- posts https://x.com/XDevelopers/status/1228393702244134912

# Download post attachment files (when media URLs are available)
X_API_BEARER_TOKEN=... bun run xcli -- posts 1228393702244134912 --download-media
X_API_BEARER_TOKEN=... bun run xcli -- posts 1228393702244134912 --expansions attachments.media_keys --media-fields media_key,type,url,preview_image_url --download-media

# Post search (recent or full archive)
X_API_BEARER_TOKEN=... bun run xcli -- posts search recent --query "from:XDevelopers -is:retweet"
X_API_BEARER_TOKEN=... bun run xcli -- posts search all --query "lang:en #ai -is:retweet"

# User search
X_API_BEARER_TOKEN=... bun run xcli -- users search --query "python developer"

# Trends by WOEID
X_API_BEARER_TOKEN=... bun run xcli -- trends 1
X_API_BEARER_TOKEN=... bun run xcli -- trends "new york"

# WOEID lookup (fuzzy)
bun run xcli -- trends search "new york"

# Explicit subcommands still supported
X_API_BEARER_TOKEN=... bun run xcli -- users by-username XDevelopers

# JSON output modes
X_API_BEARER_TOKEN=... bun run xcli -- users XDevelopers --json
X_API_BEARER_TOKEN=... bun run xcli -- users XDevelopers --json-pretty

# Field references
bun run xcli -- fields users
bun run xcli -- fields trends
```

Persistent config:

```json
{
  "bearerToken": "YOUR_X_API_BEARER_TOKEN"
}
```

- Save as `~/.config/xcli/config.json`.
- Precedence is: `--bearer-token` > env vars (`X_API_BEARER_TOKEN`, `BEARER_TOKEN`) > config file.

Notes:

- Default output is human-readable tables.
- Color output honors TTY, `NO_COLOR`, and `FORCE_COLOR`.
- Post tables include `Media`, `DL` (downloadable/total), and `Quote` (`false` or quoted post ID).
- In post text, media/quote `t.co` links are rewritten to placeholders like `[img1]` and `[quote]`.
- `trends search` uses a public WOEID index, fetched on demand and cached locally.
- Optional: set `XCLI_WOEID_CACHE_PATH` to override the default cache file path.

## Development

To install dependencies:

```bash
bun install
```

To run:

```bash
bun run xcli -- --help
```
npm package: @stanleyoos/randomid-generator
Description: returns ID randomly generated from capital letters takes one parameter which is length or returned value
Latest version: 1.1.0

# randomID-generator

returns ID randomly generated from capital letters
takes one parameter which is length or returned value

## Use the package manager 

```bash
yarn add @stanleyoos/randomid-generator
```

or 

```bash
npm i @stanleyoos/randomid-generator
```

## Usage

```js
const randomId = require("@stanleyoos/randomid-generator")

# returns 'ABC'
randomId(3)

# returns 'HDYABWNEJD'
randomId(10)

```