Skip to main content

Installation

npm install -g @jam-nodes/playground

Commands

list

List all available jam-nodes.
jam list [options]
OptionDescription
--category <cat>Filter by category: logic, transform, integration, action
--jsonOutput as JSON
Examples:
# List all nodes
jam list

# Filter by category
jam list --category logic
jam list --category integration

# JSON output for scripting
jam list --json | jq '.[] | select(.category == "action")'

run

Run a jam-node interactively.
jam run [node-type] [options]
OptionDescription
-i, --input <json>JSON input data
--mockReturn sample data without API calls
--no-confirmSkip confirmation prompt
Examples:
# Interactive mode (select node from list)
jam run

# Run with mock data (no credentials needed)
jam run delay --mock

# Run with JSON input
jam run delay -i '{"durationMs": 1000}'

# Run without confirmation
jam run conditional --mock --no-confirm
When --input is not provided, the CLI prompts for each required field interactively.
Mock Mode: Mock mode returns schema-valid sample data without making actual API calls. Use this to:
  • Explore node behavior without credentials
  • Test input validation
  • Generate example outputs for documentation
# All these work without any API keys
jam run map --mock
jam run filter --mock
jam run conditional --mock

init

Generate a .env template with all credential placeholders.
jam init [options]
OptionDescription
--path <path>Output path (default: ./.env)
--forceOverwrite existing file
Example:
# Create .env template
jam init

# Custom location
jam init --path ./config/.env

# Overwrite existing
jam init --force
The generated template includes placeholders for:
  • Apollo.io, Hunter.io
  • OpenAI, Anthropic
  • Twitter/X, Reddit, LinkedIn
  • DataForSEO, SendGrid, and more

credentials

Manage saved credentials.
jam credentials <subcommand>
SubcommandDescription
listShow all saved credentials
pathShow credential store location
set <service>Save credentials interactively
check <service>Check if credentials exist
delete <service>Remove saved credentials
clearDelete all saved credentials
Examples:
# List saved credentials
jam credentials list

# Show store location
jam credentials path
# Output: /Users/you/Library/Preferences/jam-nodes-playground-nodejs/config.json

# Save credentials interactively
jam credentials set apollo

# Check if credentials exist
jam credentials check apollo
# Output: ✓ apollo credentials found (encrypted)

# Delete specific credentials
jam credentials delete apollo

# Clear all
jam credentials clear

Credential Sources

The CLI checks credentials in this order:
  1. Environment variables - JAM_<SERVICE>_API_KEY
  2. Encrypted local storage - Saved via credentials set
  3. Runtime prompt - Asked during run if not found

Environment Variables

The CLI loads credentials from a .env file in the project root or from environment variables:
ServiceVariable
Apollo.ioAPOLLO_API_KEY
OpenAIOPENAI_API_KEY
AnthropicANTHROPIC_API_KEY
Twitter (TwitterAPI.io)TWITTERAPI_IO_KEY
LinkedIn (ForumScout)FORUMSCOUT_API_KEY
DataForSEODATAFORSEO_API_TOKEN (Base64 encoded login:password)
Example .env file:
APOLLO_API_KEY=your-apollo-key
ANTHROPIC_API_KEY=sk-ant-...
TWITTERAPI_IO_KEY=your-twitter-key
FORUMSCOUT_API_KEY=your-forumscout-key
DATAFORSEO_API_TOKEN=base64-encoded-credentials
OPENAI_API_KEY=sk-...
Use jam init to generate a template with all variables.

Error Handling

The CLI provides clear error messages:
# Unknown node type
jam run unknown_node
# Error: Unknown node type: unknown_node
# Use "jam list" to see available nodes

# Invalid JSON
jam run delay -i 'not json'
# Error: Invalid JSON input

# Missing required fields
jam run conditional -i '{}'
# Error: Required field "condition" is missing

Scripting

Use JSON output and jq for scripting:
# Get all integration nodes
jam list --json | jq '.[] | select(.category == "integration") | .type'

# Count nodes by category
jam list --json | jq 'group_by(.category) | map({category: .[0].category, count: length})'

Exit Codes

CodeMeaning
0Success
1Error (invalid input, missing credentials, execution failed)