open-index/open-npm huggingface dataset:
npm package: @gensx/claude-md
Description: CLAUDE.md templates for GenSX projects.
Latest version: 0.1.8
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# @gensx/claude-md

This package provides a CLAUDE.md template for GenSX projects.

## Installation and Usage

You can install the CLAUDE.md template directly from npm without adding the package as a dependency:

```bash
# Run directly with npx to install the template
npx @gensx/claude-md
```

Alternatively, you can install it as a dependency:

```bash
npm install --save-dev @gensx/claude-md
# or
pnpm add -D @gensx/claude-md
```

Then run the CLI:

```bash
npx gensx-claude-md
```

## What is CLAUDE.md?

CLAUDE.md serves as persistent memory for Claude when working with GenSX projects. It contains:

- Common project commands
- Code style preferences
- Project structure overview
- Common patterns and examples for GenSX components
- LLM provider configuration examples
- A section for project-specific notes

This file helps Claude remember important information about your project, making it easier to provide accurate and contextual assistance.

## Customization and Updates

The CLAUDE.md file includes clearly marked managed and custom sections:

```md
<!-- BEGIN_MANAGED_SECTION -->

... Template content that will be updated automatically ...

<!-- END_MANAGED_SECTION -->

## Custom Project Information

... Your custom content here ...
```

When you update the template:

1. Only the content between the managed section markers will be updated
2. Any content outside these markers will be preserved
3. If you're updating from a previous version without managed sections, your old file will be backed up

This approach allows you to both:

- Receive updates to the template content (like new patterns or examples)
- Keep your project-specific customizations intact

## License

Apache-2.0
npm package: @gensx/cline-rules
Description: Cline rules for GenSX projects.
Latest version: 0.1.8
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# @gensx/cline-rules

This package installs a `.clinerules` file to your project, providing project-specific instructions for Cline editor when working with GenSX projects.

## Overview

Cline's `.clinerules` file provides project-specific instructions that are automatically appended to your custom instructions and referenced in Cline's system prompt, ensuring they influence all interactions within the project context.

## Installation and Usage

You can install the Cline rules directly from npm without adding the package as a dependency:

```bash
# Run directly with npx to install the rules
npx @gensx/cline-rules
```

Alternatively, you can install it as a dependency:

```bash
npm install --save-dev @gensx/cline-rules
# or
yarn add -D @gensx/cline-rules
# or
pnpm add -D @gensx/cline-rules
```

Then run the CLI:

```bash
npx gensx-cline-rules
```

## Features

- Installs a `.clinerules` file to your project root
- Provides project-specific guidance to Cline for working with GenSX projects
- Uses managed sections to preserve your customizations during updates
- Creates backups of existing files when making updates

## What's Included

The included `.clinerules` file contains:

- Common GenSX coding patterns and conventions
- Code style preferences
- GenSX component patterns with code examples
- Provider usage examples
- Testing and documentation standards

## Managed Sections

The `.clinerules` file uses managed sections delimited by HTML comments:

```
<!-- BEGIN_MANAGED_SECTION -->
... managed content that will be updated ...
<!-- END_MANAGED_SECTION -->
```

When upgrading or reinstalling the rules, only the content within these markers will be updated, preserving any custom content you've added outside of the managed section.

## Customization

Add your custom project information outside the managed section to preserve it during updates.

A section at the bottom of the file is provided specifically for your custom content.

## License

Apache-2.0
npm package: @gensx/core
Description: Build AI workflows using JSX.
Author: GenSX Team
Latest version: 0.5.5
Deprecated: Service has been deprecated and is offline.

# GenSX ⚡️

GenSX is a framework for building LLM workflows and AI agents with TypeScript. Every GenSX component is a pure function, and thus easily shareable by default.

## Getting started

### 📦 Installing

```bash
pnpm install @gensx/core
```

```bash
yarn add @gensx/core
```

```bash
npm install @gensx/core
```

## Building a workflow

```ts
import * as gensx from "@gensx/core";
import { openai } from "@ai-sdk/openai";
import { generateText } from "@gensx/vercel-ai";

// input interface
interface WriteDraftInput {
  research: string[];
  prompt: string;
}

// components are pure functions that are reusable by default
const WriteDraft = gensx.Component(
  "WriteDraft",
  async ({ prompt, research }: WriteDraftInput) => {
    const systemMessage = `You're an expert technical writer.
    Use the information when responding to users: ${research.join("\n")}`;

    const result = await generateText({
      messages: [
        {
          role: "system",
          content: systemMessage,
        },
        {
          role: "user",
          content: `Write a blog post about ${prompt}`,
        },
      ],
      model: openai("gpt-4.1-mini"),
    });

    return result.text;
  },
);
```

Components can be composed together to create more complex agents and workflows:

```ts
import * as gensx from "@gensx/core";
import { OpenAIProvider } from "gensx/openai";
import { Research, WriteDraft, EditDraft } from "./writeBlog";

interface WriteBlogInput {
  title: string;
  description: string;
}

const WriteBlog = gensx.Workflow(
  "WriteBlog",
  async ({ title, description }: WriteBlogInput) => {
    const queries = await GenerateQueries({
      title,
      description,
    });
    const research = await ResearchBlog({ queries });
    const draft = await WriteDraft({ title, context: research });
    const final = await EditDraft({ title, content: draft });
    return final;
  },
);

const result = await WriteBlog({
  title: "How AI broke modern infra",
  description: "Long-running workflows require a new approach to infra",
});
```
npm package: @gensx/cursor-rules
Description: Cursor rules for GenSX projects.
Latest version: 0.1.8
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# @gensx/cursor-rules

This package provides cursor rules for GenSX projects.

## Installation and Usage

You can install the cursor rules directly from npm without adding the package as a dependency:

```bash
# Run directly with npx to install the rules
npx @gensx/cursor-rules
```

Alternatively, you can install it as a dependency:

```bash
npm install --save-dev @gensx/cursor-rules
# or
pnpm add -D @gensx/cursor-rules
```

Then run the CLI:

```bash
npx gensx-cursor-rules
```

## What are cursor rules?

Cursor rules provide documentation and code snippets for GenSX components, which can be surfaced by IDEs and development tools that integrate with [Cursor](https://cursor.sh/).

These rules help with:

- Providing accurate code examples for GenSX components
- Showing proper parameter usage for LLM providers
- Enabling proper code completion for GenSX workflows

## Included Rules

This package includes rules for:

- `gensx.mdc` - Core GenSX concepts and syntax
- `gensx-openai.mdc` - OpenAI integration
- `gensx-anthropic.mdc` - Anthropic integration
- `gensx-ai-sdk.mdc` - Vercel AI SDK integration

## Custom rules

You can add your own custom rules by creating additional `.mdc` files in your project's `.cursor` directory. Your custom rules will be preserved when updating this package.

## License

Apache-2.0
npm package: @gensx/gensx-cloud-mcp
Description: Model Context Protocol server for GenSX Cloud.
Author: GenSX Team
Latest version: 0.0.22
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# @gensx/gensx-cloud-mcp

Model Context Protocol server for [GenSX Cloud](https://gensx.com/docs/cloud) workflows. Connect your GenSX Cloud workflows to MCP-compatible tools like Claude desktop, Cursor, and more.

![Running a GenSX workflow from Claude desktop](./claude-desktop.png)

## Usage

Once you have run [`gensx deploy`](https://www.gensx.com/docs/cli-reference/deploy) to deploy your project to the [GenSX Cloud serverless runtime](https://www.gensx.com/docs/cloud/serverless-deployments), you can consume those workflows via the `@gensx/gensx-cloud-mcp` server.

MCP-compatible tools use a standard JSON file to configure available MCP servers.

Update your MCP config file for your tool of choice to include the following:

```json
{
  "mcpServers": {
    "gensx": {
      "command": "npx",
      "args": [
        "-y",
        "@gensx/gensx-cloud-mcp",
        "you_org_name",
        "your_project_name",
        "your_environment_name"
      ]
    }
  }
}
```

Your MCP client will run this command automatically at startup and handle acquiring the GenSX Cloud MCP server on your behalf. See the [Claude desktop](https://modelcontextprotocol.io/quickstart/user), and [Cursor docs](https://docs.cursor.com/context/model-context-protocol) on configuring MCP servers for more details.

By default, the server reads your API credentials from the config saved by running the `gensx login` command. Alternatively, you can specify your GenSX API key as an environment variable in your MCP config:

```json
{
  "mcpServers": {
    "gensx": {
      "command": "npx",
      "args": [
        "@gensx/gensx-cloud-mcp",
        "you_org_name",
        "your_project_name",
        "your_environment_name"
      ],
      "env": {
        "GENSX_API_KEY": "my_api_key"
      }
    }
  }
}
```

The GenSX build process automatically extracts input and output schemas from your typescript types, so no additional configuration or manual `zod` schema is required to consume your workflows from an MCP server.
npm package: @gensx/openai
Description: A wrapper around the OpenAI SDK for GenSX.
Author: GenSX Team
Latest version: 0.3.5
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# @gensx/openai

A pre-wrapped version of the OpenAI SDK for GenSX. This package provides a simple way to use OpenAI's API with GenSX components.

## Installation

```bash
npm install @gensx/openai openai
```

## Usage

You can use this package in two ways:

### 1. Drop-in Replacement (Recommended)

Simply replace your OpenAI import with the GenSX version:

```ts
// Instead of:
// import { OpenAI } from 'openai';

// Use:
import { OpenAI } from "@gensx/openai";

// Create a client as usual
const client = new OpenAI({
  apiKey: "your-api-key",
});

// All methods are automatically wrapped with GenSX functionality
const completion = await client.chat.completions.create({
  model: "gpt-4",
  messages: [{ role: "user", content: "Hello!" }],
});

// Use embeddings
const embedding = await client.embeddings.create({
  model: "text-embedding-ada-002",
  input: "Hello world!",
});

// Use responses
const response = await client.responses.create({
  model: "gpt-4",
  messages: [{ role: "user", content: "Hello!" }],
});
```

### 2. Wrap an Existing Instance

If you already have an OpenAI instance, you can wrap it with GenSX functionality:

```ts
import { OpenAI } from "openai";
import { wrapOpenAI } from "@gensx/openai";

// Create your OpenAI instance as usual
const client = wrapOpenAI(
  new OpenAI({
    apiKey: "your-api-key",
  }),
);

// Now all methods are wrapped with GenSX functionality
const completion = await client.chat.completions.create({
  model: "gpt-4",
  messages: [{ role: "user", content: "Hello!" }],
});
```

## API

The package exports:

1. `OpenAI` - A drop-in replacement for the OpenAI client that automatically wraps all methods with GenSX functionality
2. `wrapOpenAI` - A function to manually wrap an OpenAI instance with GenSX functionality

## License

Apache-2.0
npm package: @gensx/vercel-ai
Description: Vercel AI SDK for GenSX.
Author: GenSX Team
Latest version: 0.4.2
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# @gensx/vercel-ai

Vercel AI SDK for [GenSX](https://github.com/gensx-inc/gensx/packages/gensx-vercel-ai)

## Installation

```bash
npm install @gensx/vercel-ai
```

### Requires `@gensx/core`

This package requires `@gensx/core` to be installed as a peer dependency.

```bash
npm install @gensx/core
```

## Usage

```tsx
import * as gensx from "@gensx/core";
import { generateText } from "@gensx/vercel-ai";
import { openai } from "@ai-sdk/openai";

export const BasicChat = gensx.Workflow(
  "BasicChat",
  async ({ userInput }: { userInput: string }): Promise<string> => {
    const result = await generateText({
      messages: [
        { role: "system", content: "You are a helpful assistant." },
        { role: "user", content: userInput },
      ],
      model: openai("gpt-4.1-mini"),
    });
    return result.text;
  },
);
```

## Using Frontend Tools with GenSX ToolBox

This package provides utilities to convert GenSX ToolBox definitions to Vercel AI SDK ToolSet format for use with AI models.

### Converting ToolBox to ToolSet

```tsx
import { createToolBox } from "@gensx/core";
import { asToolSet } from "@gensx/vercel-ai";
import { generateText } from "@gensx/vercel-ai";
import { openai } from "@ai-sdk/openai";
import { z } from "zod";

// Define a ToolBox using GenSX's createToolBox
const myToolBox = createToolBox({
  weather: {
    params: z.object({
      location: z.string().describe("The location to get weather for"),
    }),
    result: z.object({
      temperature: z.number(),
      condition: z.string(),
    }),
  },
});

const toolSet = asToolSet(myToolBox);

// Use with Vercel AI SDK
const result = await generateText({
  messages: [
    {
      role: "system",
      content: "You are a helpful assistant that can use tools.",
    },
    { role: "user", content: "What's the weather like in Seattle?" },
  ],
  model: openai("gpt-4.1-mini"),
  tools: toolSet, // Use the converted ToolSet
});
```

The `asToolSet` function converts GenSX ToolBox definitions to Vercel AI SDK Tool format, automatically handling the integration with GenSX's `executeExternalTool` function for proper workflow execution.

## Available Functions

This package provides many of the functions available in the [Vercel AI SDK](https://vercel.com/docs/ai-sdk).

- **`generateText`** - Generate text responses from AI models
- **`streamText`** - Stream text responses in real-time
- **`generateObject`** - Generate structured JSON objects with schema validation
- **`streamObject`** - Stream structured JSON objects in real-time
- **`embed`** - Generate embeddings for text
- **`embedMany`** - Generate embeddings for multiple texts
- **`generateImage`** - Generate images from text prompts
npm package: @gensx/vercel-ai-sdk
Description: Vercel AI SDK for GenSX.
Author: GenSX Team
Latest version: 0.1.17
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# @gensx/vercel-ai-sdk

Vercel AI SDK for [GenSX](https://github.com/gensx-inc/gensx/packages/gensx-vercel-ai-sdk)

## Installation

```bash
npm install @gensx/vercel-ai-sdk
```

### Requires `gensx`

This package requires `gensx` to be installed as a peer dependency.

```bash
npm install gensx
```

## Usage

```tsx
import * as gensx from "@gensx/core";
import { GenerateText, StreamText } from "@gensx/vercel-ai-sdk";

const ChatBot = gensx.Component(async ({ userInput }) => {
  return (
    <GenerateText
      messages={[
        { role: "system", content: "You are a helpful assistant." },
        { role: "user", content: userInput },
      ]}
      model="gpt-4o"
      temperature={0.7}
    />
  );
});

// Use with streaming
const StreamingChat = gensx.Component(async ({ userInput }) => {
  return (
    <StreamText
      messages={[
        { role: "system", content: "You are a helpful assistant." },
        { role: "user", content: userInput },
      ]}
      stream={true}
    >
      {async (stream) => {
        for await (const token of stream) {
          process.stdout.write(token);
        }
      }}
    </StreamText>
  );
});
```
npm package: @gensx/windsurf-rules
Description: Windsurf rules for GenSX projects
Author: GenSX Inc.
Latest version: 0.1.8
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# @gensx/windsurf-rules

This package installs a `.windsurfrules` file to your project, providing project-specific instructions for Windsurf's Cascade AI when working with GenSX projects.

## Overview

Windsurf's `.windsurfrules` file provides project-specific instructions that are automatically applied to Cascade AI in your workspace, ensuring it has proper context for working with GenSX projects.

## Installation and Usage

You can install the Windsurf rules directly from npm without adding the package as a dependency:

```bash
# Run directly with npx to install the rules
npx @gensx/windsurf-rules
```

Alternatively, you can install it as a dependency:

```bash
npm install --save-dev @gensx/windsurf-rules
# or
yarn add -D @gensx/windsurf-rules
# or
pnpm add -D @gensx/windsurf-rules
```

Then run the CLI:

```bash
npx gensx-windsurf-rules
```

## Features

- Installs a `.windsurfrules` file to your project root
- Provides project-specific guidance to Windsurf's Cascade AI for working with GenSX projects
- Uses managed sections to preserve your customizations during updates
- Creates backups of existing files when making updates

## What's Included

The included `.windsurfrules` file contains:

- Common GenSX coding patterns and conventions
- Code style preferences
- GenSX component patterns with code examples
- Provider usage examples
- Testing and documentation standards

## Managed Sections

The `.windsurfrules` file uses managed sections delimited by HTML comments:

```
<!-- BEGIN_MANAGED_SECTION -->
... managed content that will be updated ...
<!-- END_MANAGED_SECTION -->
```

When upgrading or reinstalling the rules, only the content within these markers will be updated, preserving any custom content you've added outside of the managed section.

## Customization

Add your custom project information outside the managed section to preserve it during updates.

A section at the bottom of the file is provided specifically for your custom content.

## Note

As mentioned in the Windsurf documentation, you may want to add `.windsurfrules` to your project's `.gitignore` to ensure that the rules are only applied to your local project.

## License

Apache-2.0