> ## Documentation Index
> Fetch the complete documentation index at: https://docs.spreadjam.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Playground

> Test and experiment with jam-nodes without building a full application.

The jam-nodes Playground provides two ways to test nodes interactively:

* **CLI** - A command-line tool for quick testing during development
* **Web** - A browser-based UI for visual exploration and demos

## When to Use Each

| Use Case                         | CLI      | Web      |
| -------------------------------- | -------- | -------- |
| Testing nodes during development | **Best** | Good     |
| Exploring node inputs/outputs    | Good     | **Best** |
| CI/CD or scripted testing        | **Best** | -        |
| Demos and presentations          | -        | **Best** |
| Learning the node API            | Good     | **Best** |

## Installation

```bash theme={null}
npm install -g @jam-nodes/playground
```

```bash theme={null}
npx @jam-nodes/playground list
```

```bash theme={null}
git clone https://github.com/wespreadjam/jam-nodes
cd jam-nodes/packages/playground-web
npm install && npm run dev
```

## Quick Examples

**List all available nodes:**

```bash theme={null}
jam list
```

**Run a node with mock data (no API keys needed):**

```bash theme={null}
jam run delay --mock
```

**Run a node with JSON input:**

```bash theme={null}
jam run conditional -i '{"condition":{"type":"equals","variableName":"x","value":"y"},"trueNodeId":"a","falseNodeId":"b"}'
```

## Credential Management

Both CLI and Web interfaces support three credential sources:

1. **Environment variables** - Most secure, recommended for production
2. **Encrypted local storage** - Convenient for development
3. **Runtime prompts** - One-off testing

Use `jam init` to generate an `.env` template with all supported credentials.

## Next Steps

<CardGroup cols={2}>
  <Card title="CLI Reference" href="/playground/cli">
    Full command reference for the CLI tool.
  </Card>

  <Card title="Web Playground" href="/playground/web">
    Guide to the browser-based playground.
  </Card>
</CardGroup>
