Skip to main content

CLI Command Reference

The NeuroLink CLI mirrors the SDK. Every command shares consistent options and outputs so you can prototype in the terminal and port the workflow to code later.

Install or Run Ad-hoc

# Run without installation
npx @juspay/neurolink --help

# Install globally
npm install -g @juspay/neurolink

# Local project dependency
npm install @juspay/neurolink

Command Map

CommandDescriptionExample
generate / genOne-shot content generation with optional multimodal input.npx @juspay/neurolink generate "Draft release notes" --image ./before.png
streamReal-time streaming output with tool support.npx @juspay/neurolink stream "Narrate sprint demo" --enableAnalytics
batchProcess multiple prompts from a file.npx @juspay/neurolink batch prompts.txt --format json
loopInteractive session with persistent variables & memory.npx @juspay/neurolink loop --auto-redis
auth <subcommand>Manage provider authentication (API key or OAuth).npx @juspay/neurolink auth login anthropic --method oauth
setup / sGuided provider onboarding and validation.npx @juspay/neurolink setup --provider openai
statusHealth check for configured providers.npx @juspay/neurolink status --verbose
get-best-providerShow the best available AI provider.npx @juspay/neurolink get-best-provider --format json
models listInspect available models and capabilities.npx @juspay/neurolink models list --capability vision
config <subcommand>Initialise, validate, export, or reset configuration.npx @juspay/neurolink config validate
memory <subcommand>View, export, or clear conversation history.npx @juspay/neurolink memory history NL_x3yr --format json
mcp <subcommand>Manage Model Context Protocol servers/tools.npx @juspay/neurolink mcp list
ollama <subcommand>Manage Ollama local AI models.npx @juspay/neurolink ollama list-models
sagemaker <command>Manage Amazon SageMaker endpoints and models.npx @juspay/neurolink sagemaker status
server <subcommand>Manage NeuroLink HTTP servernpx @juspay/neurolink server start --port 3000
serveStart server in foreground modenpx @juspay/neurolink serve --port 3000
proxy <subcommand>Manage the Claude multi-account proxy and its local telemetry.npx @juspay/neurolink proxy telemetry setup
rag <subcommand>RAG document processing (chunk, index, query).npx @juspay/neurolink rag chunk ./docs/guide.md
workflow <sub>Manage and execute AI workflows.npx @juspay/neurolink workflow list
observabilityObservability and telemetry management (aliases: obs, otel).npx @juspay/neurolink observability status
telemetryTelemetry and exporter management (alias: tel).npx @juspay/neurolink telemetry status
docsStart the NeuroLink documentation MCP server.npx @juspay/neurolink docs --transport http --port 3001
validateAlias for config validate.npx @juspay/neurolink validate
completionGenerate shell completion script.npx @juspay/neurolink completion > ~/.neurolink-completion.sh

Primary Commands

generate <input>

npx @juspay/neurolink generate "Summarise design doc" \
--provider google-ai --model gemini-2.5-pro \
--image ./screenshots/ui.png --enableAnalytics --enableEvaluation

Key flags:

  • --provider, -p – provider slug (default auto).
  • --model, -m – model name for the chosen provider.
  • --image, -i – attach one or more image files/URLs for multimodal prompts.
  • --pdf – attach one or more PDF files for document analysis.
  • --csv, -c – attach one or more CSV files for data analysis.
  • --file – attach any supported file type (auto-detected: Excel, Word, RTF, JSON, YAML, XML, HTML, SVG, Markdown, code files, and more).
  • --temperature, -t – creativity (default 0.7).
  • --maxTokens, --max – response limit (default 1000).
  • --system, -s – system prompt.
  • --format, -f, --output-formattext (default), json, or table.
  • --output, -o – write response to file.
  • --imageOutput, --image-output – custom path for generated image (default: generated-images/image-<timestamp>.png).
  • --enableAnalytics / --enableEvaluation – capture metrics & quality scores.
  • --evaluationDomain – domain hint for the judge model.
  • --domainAware – use domain-aware evaluation (default false).
  • --context – JSON string appended to analytics/evaluation context.
  • --domain, -d – domain type for specialized processing: healthcare, finance, analytics, ecommerce, education, legal, technology, generic, auto.
  • --disableTools – bypass MCP tools for this call.
  • --timeout – seconds before aborting the request (default 120).
  • --region, -r – Vertex AI region (e.g., us-central1, europe-west1, asia-northeast1).
  • --debug, -v, --verbose – verbose logging and full JSON payloads.
  • --quiet, -q – suppress non-essential output (default true).

CSV Options:

  • --csvMaxRows – maximum number of CSV rows to process (default 1000).
  • --csvFormat – CSV output format: raw (default), markdown, json.

Video Input (Analysis):

  • --video – attach video file for analysis (MP4, WebM, MOV, AVI, MKV).
  • --video-frames – number of frames to extract (default 8).
  • --video-quality – frame quality 0–100 (default 85).
  • --video-format – frame format: jpeg (default) or png.
  • --transcribe-audio – extract and transcribe audio from video (default false).

Text-to-Speech (TTS):

  • --tts – enable text-to-speech output (default false).
  • --ttsVoice – TTS voice to use (e.g., en-US-Neural2-C).
  • --ttsFormat – audio output format: mp3 (default), wav, ogg, opus.
  • --ttsSpeed – speaking rate 0.25–4.0 (default 1.0).
  • --ttsQuality – audio quality level: standard (default) or hd.
  • --ttsOutput – save TTS audio to file (supports absolute and relative paths).
  • --ttsPlay – auto-play generated audio (default false).

Extended Thinking:

  • --thinking, --think – enable extended thinking/reasoning capability (default false).
  • --thinkingBudget – token budget for extended thinking (5000–100000, default 10000). Supported by Anthropic Claude and Gemini 2.5+ models.
  • --thinkingLevel – thinking level for extended reasoning (Anthropic Claude, Gemini 2.5+, Gemini 3): minimal, low, medium, high.

Anthropic Subscription Options:

  • --auth-method – authentication method: api-key or oauth. Overrides auto-detection.
  • --subscription-tier – subscription tier: free, pro, max, max_5, max_20, or api. Overrides auto-detection from token/env.
  • --enable-beta – enable Anthropic beta features (experimental capabilities, computer use, etc.). Default false.
# Generate with explicit subscription tier
npx @juspay/neurolink generate "Explain quantum computing" \
--provider anthropic --subscription-tier pro

# Generate with OAuth auth method
npx @juspay/neurolink generate "Write a poem" \
--provider anthropic --authMethod oauth --enableBeta

# Stream with max tier
npx @juspay/neurolink stream "Tell me a story" \
--provider anthropic --subscriptionTier max

File Input Examples:

# Attach multiple file types
npx @juspay/neurolink generate "Analyze this data" \
--file ./report.xlsx \
--file ./config.yaml \
--file ./diagram.svg

# Mix file types with images and PDFs
npx @juspay/neurolink generate "Compare architecture" \
--file ./main.ts \
--pdf ./spec.pdf \
--image ./screenshot.png

See File Processors Guide for all 17+ supported file types.

Video Generation (Veo 3.1):

  • --outputMode – output mode: text (default) or video.
  • --image – path to input image file (required for video generation, e.g., ./input.jpg).
  • --videoOutput, -vo – path to save generated video file.
  • --videoResolution720p or 1080p (default 720p).
  • --videoLength – duration: 4, 6, or 8 seconds (default 4).
  • --videoAspectRatio9:16 (portrait) or 16:9 (landscape, default 16:9).
  • --videoAudio – include synchronized audio (default true).

Note: Video generation requires Vertex AI provider (vertex) and Veo 3.1 model (veo-3.1). The provider auto-switches to Vertex when --outputMode video is specified. Supported image formats: PNG, JPEG, WebP (max 20MB).

Presentation Generation (PPT):

  • --outputMode ppt – switch to presentation generation mode. Alternatively, any --ppt* flag automatically activates PPT mode.
  • --pptPages, --pages – number of slides to generate (5-50, default 10 when PPT mode is enabled).
  • --pptTheme – presentation theme/style: modern, corporate, creative, minimal, dark (default: AI selects based on topic).
  • --pptAudience – target audience: business, students, technical, general (default: AI selects based on topic).
  • --pptTone – presentation tone: professional, casual, educational, persuasive (default: AI selects based on topic).
  • --pptOutput, --po – path to save generated PPTX file (e.g., ./output.pptx).
  • --pptAspectRatio – slide aspect ratio: 16:9 or 4:3 (default: 16:9 when PPT mode is enabled).
  • --pptNoImages – disable AI image generation for slides (default false).
# Generate a presentation
npx @juspay/neurolink generate "Quarterly business review for Q4 2025" \
--outputMode ppt --pptPages 15 --pptTheme corporate --pptOutput ./q4-review.pptx

# Generate with audience and tone
npx @juspay/neurolink generate "Introduction to machine learning" \
--pptPages 20 --pptAudience students --pptTone educational --pptOutput ./ml-intro.pptx

# Minimal presentation without AI images
npx @juspay/neurolink generate "Project status update" \
--outputMode ppt --pptNoImages --pptOutput ./status.pptx

gen is a short alias with the same options.

stream <input>

npx @juspay/neurolink stream "Walk through the timeline" \
--provider openai --model gpt-4o --enableEvaluation

stream shares the same flags as generate and adds chunked output for live UIs. Evaluation results are emitted after the stream completes when --enableEvaluation is set.

batch <file>

Process multiple prompts from a file in sequence.

# Process prompts from a file
npx @juspay/neurolink batch prompts.txt

# Export results as JSON
npx @juspay/neurolink batch questions.txt --format json

# Use Vertex AI with 2s delay between requests
npx @juspay/neurolink batch tasks.txt -p vertex --delay 2000

# Save results to file
npx @juspay/neurolink batch batch.txt --output results.json

batch shares the same flags as generate. The input file should contain one prompt per line. Results are returned as an array of { prompt, response } objects. A default 1-second delay is applied between requests; override with --delay <ms>.


Model Evaluation

Evaluate AI model outputs for quality, accuracy, and safety using NeuroLink's built-in evaluation engine.

Via generate/stream commands:

# Enable evaluation on any command
npx @juspay/neurolink generate "Write a product description" \
--enableEvaluation \
--evaluationDomain "e-commerce"

Evaluation Output:

{
"response": "...",
"evaluation": {
"score": 0.85,
"metrics": {
"accuracy": 0.9,
"safety": 1.0,
"relevance": 0.8
},
"judge_model": "gpt-4o",
"feedback": "High quality response with clear structure"
}
}

Key Evaluation Flags:

  • --enableEvaluation – Activate quality scoring
  • --evaluationDomain <domain> – Context hint for the judge (e.g., "medical", "legal", "technical")
  • --context <json> – Additional context for evaluation

Judge Models:

NeuroLink uses GPT-4o by default as the judge model, but you can configure different models for evaluation in your SDK configuration.

Use Cases:

  • Quality assurance for production outputs
  • A/B testing different prompts
  • Safety validation before deployment
  • Compliance checking for regulated industries

Learn more: Auto Evaluation Guide


loop

Interactive session mode with persistent state, conversation memory, and session variables. Perfect for iterative workflows and experimentation.

# Start loop with Redis-backed conversation memory
npx @juspay/neurolink loop --enable-conversation-memory --auto-redis

# Start loop without Redis auto-detection
npx @juspay/neurolink loop --enable-conversation-memory --no-auto-redis

# Force start a new conversation (skip selection menu)
npx @juspay/neurolink loop --new

# Resume a specific conversation by session ID
npx @juspay/neurolink loop --resume abc123def456

# List available conversations and exit
npx @juspay/neurolink loop --list-conversations

# Use in-memory storage only
npx @juspay/neurolink loop --no-auto-redis

Loop-specific flags:

FlagAliasTypeDefaultDescription
--enable-conversation-memorybooleantrueEnable conversation memory for the loop session
--max-sessionsnumber50Maximum number of conversation sessions to keep
--max-turns-per-sessionnumber20Maximum turns per conversation session
--auto-redisbooleantrueAutomatically use Redis if available
--resume-rstringDirectly resume a specific conversation by session ID
--new-nbooleanForce start a new conversation (skip selection menu)
--list-conversations-lbooleanList available conversations and exit
--compact-thresholdnumber0.8Context compaction trigger threshold (0.0–1.0)
--disable-compactionbooleanfalseDisable automatic context compaction

Key capabilities:

  • Run any CLI command without restarting session
  • Persistent session variables: set provider openai, set temperature 0.9
  • Conversation memory: AI remembers previous turns within session
  • Redis auto-detection: Automatically connects if REDIS_URL is set
  • Export session history as JSON for analytics
  • Automatic context compaction when usage exceeds threshold

Session management commands (inside loop):

CommandDescription
helpShow all available loop mode commands and standard CLI help.
set <key> <value>Set a session variable. Use set help for available keys.
get <key>Show current value of a session variable.
unset <key>Remove a session variable.
showDisplay all currently set session variables.
clearReset all session variables.
exitExit loop session. Aliases: quit, :q.

Settable session variables (via set):

VariableTypeDescriptionAllowed Values
providerstringThe AI provider to use.openai, anthropic, google-ai, vertex, bedrock, azure, etc.
modelstringThe specific model to use from the provider.Any valid model name
temperaturenumberControls randomness of the output (e.g., 0.2, 0.8).
maxTokensnumberThe maximum number of tokens to generate.
outputstringAI response format value.text, json, structured, none
systemPromptstringThe system prompt to guide the AI's behavior.
timeoutnumberTimeout for the generation request in milliseconds.
disableToolsbooleanDisable all tool usage for the AI.
maxStepsnumberMaximum number of tool execution steps.
enableAnalyticsbooleanEnable or disable analytics for responses.
enableEvaluationbooleanEnable or disable AI-powered evaluation of responses.
evaluationDomainstringDomain expertise for evaluation.
toolUsageContextstringContext about tools/MCPs used in the interaction.
enableSummarizationbooleanEnable automatic conversation summarization.
thinkingbooleanEnable extended thinking/reasoning capability.
thinkingBudgetnumberToken budget for thinking (Anthropic models: 5000–100000).
thinkingLevelstringThinking level (Anthropic Claude, Gemini 2.5+, Gemini 3).minimal, low, medium, high

Context Budget Warnings:

During a loop session, NeuroLink monitors context window usage after each generation command:

  • 60% used (gray): A subtle status line is shown: Context: 62% used.
  • 80% used (yellow): A prominent warning with token counts is shown:
    Context usage: 83% of window (12,450 / 15,000 tokens)
    Auto-compaction will trigger to preserve conversation quality.
    When --disable-compaction is not set, the system automatically compacts the context to free up space while preserving conversation quality.

See the complete guide: CLI Loop Sessions

auth <subcommand>

Manage authentication with AI providers. Supports traditional API key authentication and OAuth 2.1 with PKCE for Claude subscription plans (Pro/Max).

# Interactive login (prompts for authentication method)
npx @juspay/neurolink auth login anthropic

# Login with a specific method
npx @juspay/neurolink auth login anthropic --method api-key
npx @juspay/neurolink auth login anthropic --method oauth
npx @juspay/neurolink auth login anthropic --method create-api-key

# Check authentication status for all providers
npx @juspay/neurolink auth status

# Check status for a specific provider
npx @juspay/neurolink auth status anthropic

# Refresh expired OAuth tokens
npx @juspay/neurolink auth refresh anthropic

# Clear stored credentials
npx @juspay/neurolink auth logout anthropic

Subcommands:

SubcommandDescription
login <provider>Authenticate with an AI provider
logout <provider>Clear stored credentials for a provider
status [provider]Show authentication status (all providers if none)
refresh <provider>Manually refresh OAuth tokens for a provider

Login flags:

FlagAliasTypeDefaultDescription
--method-mstringAuthentication method: api-key, oauth, or create-api-key
--non-interactivebooleanfalseSkip interactive prompts (requires environment variables)

Shared flags:

FlagAliasTypeDefaultDescription
--formatstringtextOutput format: text, json
--quiet-qbooleanfalseSuppress non-essential output
--debugbooleanfalseEnable debug output

Authentication methods:

  • api-key -- Traditional API key authentication. Prompts for your Anthropic API key and stores it in the project .env file. Best for API-billed usage.
  • oauth -- Direct OAuth 2.1 with PKCE. Opens a browser for Claude subscription (Pro/Max) authorization. Tokens are stored securely in ~/.neurolink/ and auto-refreshed. Experimental.
  • create-api-key -- OAuth-based API key creation (recommended for Claude Pro/Max). Authenticates via OAuth, then creates a standard API key through the Anthropic console. Combines the convenience of OAuth login with standard API key compatibility.

Supported providers: anthropic

Status output:

auth status displays the authentication method, subscription tier (free/pro/max/api), token expiry, and refresh token availability for each configured provider. Use --format json for machine-readable output.

Examples (local development):

# Interactive authentication (choose method via prompt)
pnpm run cli -- auth login anthropic

# Authenticate using OAuth for Claude Pro/Max subscription
pnpm run cli -- auth login anthropic --method oauth

# Create an API key via OAuth (recommended for Claude Pro/Max)
pnpm run cli -- auth login anthropic --method create-api-key

# Use a traditional API key
pnpm run cli -- auth login anthropic --method api-key

# Non-interactive login (reads ANTHROPIC_API_KEY from environment)
pnpm run cli -- auth login anthropic --method api-key --non-interactive

# Show status for all providers
pnpm run cli -- auth status

# Show status as JSON (for scripting)
pnpm run cli -- auth status --format json

# Refresh expired OAuth tokens
pnpm run cli -- auth refresh anthropic

# Clear all stored credentials for Anthropic
pnpm run cli -- auth logout anthropic

Credential storage:

  • API keys are saved to the project .env file as ANTHROPIC_API_KEY.
  • OAuth tokens are stored in ~/.neurolink/<provider>-credentials.json with restricted file permissions.
  • The logout subcommand clears both stored credentials and offers to remove the key from .env.

See also: Claude Subscription Guide | Provider Setup Guide

setup

Interactive provider configuration wizard that guides you through API key setup, credential validation, and recommended model selection.

# Launch interactive setup wizard
npx @juspay/neurolink setup

# Show all available providers
npx @juspay/neurolink setup --list

# Configure a specific provider
npx @juspay/neurolink setup --provider openai
npx @juspay/neurolink setup --provider bedrock
npx @juspay/neurolink setup --provider google-ai

What the wizard does:

  1. Prompts for API keys – Securely collects credentials
  2. Validates authentication – Tests connection to provider
  3. Writes .env file – Safely stores credentials (creates if missing)
  4. Recommends models – Suggests best models for your use case
  5. Shows example commands – Quick-start examples to try immediately

Supported providers: OpenAI, Anthropic, Google AI, Vertex AI, Bedrock, Azure, Hugging Face, Ollama, Mistral, and more.

See also: Provider Setup Guide

status

npx @juspay/neurolink status --verbose

Displays provider availability, authentication status, recent error summaries, and response latency.

models

Manage and discover AI models across all providers.

# List all models for a provider
npx @juspay/neurolink models list --provider google-ai

# Filter by capability
npx @juspay/neurolink models list --capability vision --format table

Subcommands:

SubcommandDescription
listList available models with filtering options
search [query]Search models by capabilities, use case, or features
bestGet the best model recommendation for your use case
resolve <model>Resolve model aliases and find exact model names
compare <models..>Compare multiple models side by side
statsShow model registry statistics and insights

Global models options:

OptionTypeDefaultDescription
--formatstringtableOutput format: table, json, compact
--outputstringSave output to file
--quietbooleanfalseSuppress non-essential output
--debugbooleanfalseEnable debug output

models list

npx @juspay/neurolink models list [options]
OptionTypeDefaultDescription
--providerstringFilter by AI provider
--categorystringFilter by model category: general, coding, creative, vision, reasoning
--capabilityarrayFilter by required capabilities: vision, functionCalling, codeGeneration, reasoning, multimodal, streaming, jsonMode
--deprecatedbooleanfalseInclude deprecated models
npx @juspay/neurolink models list --provider openai
npx @juspay/neurolink models list --capability vision
npx @juspay/neurolink models list --category coding

models search [query]

Search models by capabilities, use case, or features.

npx @juspay/neurolink models search [query] [options]
OptionTypeDefaultDescription
--use-casestringFilter by primary use case: coding, creative, analysis, conversation, reasoning, translation, summarization
--max-costnumberMaximum cost per 1K tokens (USD)
--min-contextnumberMinimum context window size (tokens)
--max-contextnumberMaximum context window size (tokens)
--performancestringRequired performance level: fast, medium, slow, high, low
npx @juspay/neurolink models search vision
npx @juspay/neurolink models search --use-case coding --max-cost 0.01
npx @juspay/neurolink models search --min-context 100000

models best

Get the best model recommendation for your use case.

npx @juspay/neurolink models best [options]
OptionTypeDescription
--codingbooleanOptimize for code generation and programming
--creativebooleanOptimize for creative writing and content
--analysisbooleanOptimize for data analysis and research
--conversationbooleanOptimize for conversational interactions
--reasoningbooleanOptimize for logical reasoning tasks
--translationbooleanOptimize for language translation
--summarizationbooleanOptimize for text summarization
--cost-effectivebooleanPrioritize cost-effectiveness
--high-qualitybooleanPrioritize output quality over cost
--fastbooleanPrioritize response speed
--require-visionbooleanRequire vision/image processing capability
--require-function-callingbooleanRequire function calling capability
--exclude-providersarrayExclude specific providers
--prefer-localbooleanPrefer local/offline models
npx @juspay/neurolink models best --coding
npx @juspay/neurolink models best --cost-effective --require-vision
npx @juspay/neurolink models best --fast --exclude-providers ollama

models resolve <model>

Resolve model aliases and find exact model names.

npx @juspay/neurolink models resolve <model> [options]
OptionTypeDefaultDescription
--fuzzybooleantrueEnable fuzzy matching for partial names
npx @juspay/neurolink models resolve claude-latest
npx @juspay/neurolink models resolve gpt4
npx @juspay/neurolink models resolve fastest

models compare <models..>

Compare multiple models side by side.

npx @juspay/neurolink models compare <models..>
npx @juspay/neurolink models compare gpt-4o claude-3.5-sonnet gemini-2.5-pro
npx @juspay/neurolink models compare fastest cheapest best-coding

models stats

Show model registry statistics and insights.

npx @juspay/neurolink models stats [options]
OptionTypeDefaultDescription
--detailedbooleanfalseShow detailed statistics with breakdowns
npx @juspay/neurolink models stats
npx @juspay/neurolink models stats --detailed

config

Manage persistent configuration stored in the NeuroLink config directory.

npx @juspay/neurolink config init
npx @juspay/neurolink config validate
npx @juspay/neurolink config export --format json > neurolink-config.json

memory

Manage conversation history stored in Redis. View, export, or clear session data for analytics and debugging.

# List all active sessions
npx @juspay/neurolink memory list

# View session statistics
npx @juspay/neurolink memory stats

# View conversation history (text format)
npx @juspay/neurolink memory history <SESSION_ID>

# Export session as JSON (Q4 2025 - for analytics)
npx @juspay/neurolink memory export --session-id <SESSION_ID> --format json > session.json

# Export all sessions
npx @juspay/neurolink memory export-all --output ./exports/

# Delete a single session
npx @juspay/neurolink memory clear <SESSION_ID>

# Delete all sessions
npx @juspay/neurolink memory clear-all

Export formats:

  • json – Structured data with metadata, timestamps, token counts
  • csv – Tabular format for spreadsheet analysis

Note: Requires Redis-backed conversation memory. Set REDIS_URL environment variable.

See the complete guide: Redis Conversation Export

mcp

Manage Model Context Protocol servers and tools. Supports stdio, SSE, WebSocket, and HTTP transports.

# List registered servers/tools
npx @juspay/neurolink mcp list

# Auto-discover MCP servers from config files
npx @juspay/neurolink mcp discover

# Install popular MCP servers
npx @juspay/neurolink mcp install filesystem
npx @juspay/neurolink mcp install github

# Add custom servers with different transports
npx @juspay/neurolink mcp add myserver "python server.py" --transport stdio
npx @juspay/neurolink mcp add webserver "node server.js" --transport sse

# Test server connectivity
npx @juspay/neurolink mcp test myserver

# Remove a server
npx @juspay/neurolink mcp remove myserver

MCP Command Options (mcp add):

OptionDescription
--transportTransport type: stdio, http, sse, websocket
--argsCommand arguments (array)
--envEnvironment variables (JSON string)

HTTP Transport Features:

  • Custom headers for authentication (Bearer tokens, API keys)
  • Configurable timeouts and connection options
  • Automatic retry with exponential backoff
  • Rate limiting to prevent API throttling
  • OAuth 2.1 support with PKCE

See MCP HTTP Transport Guide for complete configuration options.

batch

See batch <file> above.

get-best-provider

Show the best available AI provider based on current configuration and availability.

# Get best available provider
npx @juspay/neurolink get-best-provider

# Get provider as JSON
npx @juspay/neurolink get-best-provider --format json

# Just the provider name
npx @juspay/neurolink get-best-provider --quiet

ollama <command>

Manage Ollama local AI models. Requires Ollama to be installed on the local machine.

# List installed models
npx @juspay/neurolink ollama list-models

# Download a model
npx @juspay/neurolink ollama pull llama3

# Remove a model
npx @juspay/neurolink ollama remove llama3

# Check Ollama service status
npx @juspay/neurolink ollama status

# Start/stop Ollama service
npx @juspay/neurolink ollama start
npx @juspay/neurolink ollama stop

# Interactive Ollama setup
npx @juspay/neurolink ollama setup

Subcommands:

SubcommandDescription
list-modelsList installed Ollama models
pull <model>Download an Ollama model
remove <model>Remove an Ollama model
statusCheck Ollama service status
startStart Ollama service
stopStop Ollama service
setupInteractive Ollama setup

sagemaker <command>

Manage Amazon SageMaker AI models and endpoints.

# Check SageMaker configuration and connectivity
npx @juspay/neurolink sagemaker status

# Test connectivity to an endpoint
npx @juspay/neurolink sagemaker test my-endpoint

# List available endpoints
npx @juspay/neurolink sagemaker list-endpoints

# Show current SageMaker configuration
npx @juspay/neurolink sagemaker config

# Interactive setup
npx @juspay/neurolink sagemaker setup

# Validate configuration and credentials
npx @juspay/neurolink sagemaker validate

# Run performance benchmark
npx @juspay/neurolink sagemaker benchmark my-endpoint

Subcommands:

SubcommandDescription
statusCheck SageMaker configuration and connectivity
test <endpoint>Test connectivity to a SageMaker endpoint
list-endpointsList available SageMaker endpoints
configShow current SageMaker configuration
setupInteractive SageMaker configuration setup
validateValidate SageMaker configuration and credentials
benchmark <endpoint>Run performance benchmark against endpoint

completion

Generate a shell completion script for bash.

# Generate shell completion
npx @juspay/neurolink completion

# Save completion script
npx @juspay/neurolink completion > ~/.neurolink-completion.sh

# Enable completions (bash)
source ~/.neurolink-completion.sh

Add the completion script to your shell profile for persistent completions.


serve

Start the NeuroLink HTTP server in foreground mode.

Usage

neurolink serve [options]

Options

OptionAliasTypeDefaultDescription
--port-pnumber3000Port to listen on
--host-Hstring0.0.0.0Host to bind to
--framework-fstringhonoWeb framework: hono, express, fastify, koa
--basePathstring/apiBase path for all routes
--corsbooleantrueEnable CORS
--rateLimitnumber100Rate limit (requests per 15-minute window, 0 to disable)
--swaggerbooleanfalseEnable Swagger UI and OpenAPI endpoints
--watch-wbooleanfalseEnable watch mode
--config-cstringPath to config file

Swagger/OpenAPI Endpoints

When --swagger is enabled, these endpoints become available:

EndpointDescription
GET /api/openapi.jsonOpenAPI 3.1 specification in JSON format
GET /api/openapi.yamlOpenAPI 3.1 specification in YAML format
GET /api/docsInteractive Swagger UI documentation

Note: Disable with --no-swagger in production to avoid exposing API structure.

Examples

# Start with defaults
neurolink serve

# Start on specific port with Express
neurolink serve --port 8080 --framework express

# Start with custom config file
neurolink serve --config ./server.config.json

server <subcommand>

Manage NeuroLink HTTP server for exposing AI agents as REST APIs.

Subcommands

SubcommandDescription
startStart the HTTP server in background
stopStop the running server
statusShow server status
routesList all registered routes
configShow or modify server configuration
openapiGenerate OpenAPI specification

server start

Start the HTTP server in background mode.

neurolink server start [options]
OptionAliasTypeDefaultDescription
--port-pnumber3000Port to listen on
--host-Hstring0.0.0.0Host to bind to
--framework-fstringhonoFramework: hono, express, fastify, koa
--basePathstring/apiBase path for all routes
--corsbooleantrueEnable CORS
--rateLimitnumber100Rate limit (requests per 15-minute window, 0 to disable)

Examples:

# Start with defaults
neurolink server start

# Start on port 8080 with Express
neurolink server start -p 8080 --framework express

server stop

Stop a running background server.

neurolink server stop [options]
OptionTypeDefaultDescription
--forcebooleanfalseForce stop even if server is not responding

Examples:

# Stop gracefully
neurolink server stop

# Force stop
neurolink server stop --force

server status

Show server status information.

neurolink server status [options]
OptionTypeDefaultDescription
--formatstringtextOutput format: text, json

Examples:

# Text output
neurolink server status

# JSON output for scripting
neurolink server status --format json

server routes

List all registered server routes.

neurolink server routes [options]
OptionTypeDefaultDescription
--formatstringtableOutput format: text, json, table
--groupstringallFilter by route group: agent, tool, mcp, memory, health, all
--methodstringallFilter by HTTP method: GET, POST, PUT, DELETE, PATCH, all

Examples:

# List all routes in table format
neurolink server routes

# List only agent routes
neurolink server routes --group agent

# List all POST endpoints as JSON
neurolink server routes --method POST --format json

server config

Show or modify server configuration.

neurolink server config [options]
OptionTypeDefaultDescription
--getstringGet a specific config value
--setstringSet a config value (format: key=value)
--resetbooleanfalseReset configuration to defaults
--formatstringtextOutput format: text, json

Examples:

# Show all configuration
neurolink server config

# Get specific value
neurolink server config --get defaultPort

# Set a value
neurolink server config --set defaultPort=8080

# Reset to defaults
neurolink server config --reset

server openapi

Generate OpenAPI specification.

neurolink server openapi [options]
OptionAliasTypeDefaultDescription
--output-ostringstdoutOutput file path
--formatstringjsonOutput format: json, yaml
--basePathstring/apiBase path for all routes
--titlestringAPI title
--versionstringAPI version

Examples:

# Generate to stdout
neurolink server openapi

# Save to file
neurolink server openapi -o openapi.json

# Generate YAML format
neurolink server openapi --format yaml -o openapi.yaml

proxy <subcommand>

Manage the Claude multi-account proxy server and the local OpenObserve stack used for proxy observability.

# Start the proxy on the default port
npx @juspay/neurolink proxy start

# Check live proxy status
npx @juspay/neurolink proxy status --format json

# Bring up OpenObserve + OTEL collector + dashboard
npx @juspay/neurolink proxy telemetry setup

Subcommands:

SubcommandDescription
startStart the Claude multi-account proxy in the foreground
statusShow live proxy status, including attempts vs completed requests
telemetry <action>Manage the local OpenObserve stack and maintained dashboard for the proxy
setupOne-command onboarding: auth + service install + Claude Code configuration
installInstall the proxy as a persistent background service
uninstallRemove the persistent background service

proxy start

npx @juspay/neurolink proxy start
npx @juspay/neurolink proxy start --port 8080 --strategy fill-first
npx @juspay/neurolink proxy start --config ./proxy-config.yaml --env-file ./proxy.env
OptionAliasTypeDefaultDescription
--port-pnumber55669Port to listen on
--host-Hstring127.0.0.1Host to bind to
--strategy-sstringfill-firstAccount selection strategy: fill-first or round-robin
--health-intervalnumber30Health check interval in seconds
--config-cstring~/.neurolink/proxy-config.yamlPath to proxy config file
--env-filestringPath to proxy provider env file
--passthroughbooleanfalseTransparent forwarding: no retry, rotation, or polyfill
--debug-dbooleanfalseEnable debug output
--quiet-qbooleanfalseSuppress non-essential output

proxy status

npx @juspay/neurolink proxy status
npx @juspay/neurolink proxy status --format json
OptionAliasTypeDefaultDescription
--formatstringtextOutput format: text or json
--quiet-qbooleanfalseSuppress non-essential output

proxy telemetry <action>

Manage the repo-owned local OpenObserve stack in scripts/observability/.

npx @juspay/neurolink proxy telemetry setup
npx @juspay/neurolink proxy telemetry status
npx @juspay/neurolink proxy telemetry logs
ActionDescription
setupStart OpenObserve + OTEL collector and import the maintained dashboard
startStart the local telemetry stack without re-importing the dashboard
stopStop the local telemetry stack
statusShow local stack health and endpoint info
logsFollow OpenObserve and collector logs
import-dashboardRe-import the dashboard and dedupe older dashboards with the same title
OptionAliasTypeDefaultDescription
--quiet-qbooleanfalseSuppress the local CLI spinner and delegate directly

proxy setup

npx @juspay/neurolink proxy setup
npx @juspay/neurolink proxy setup --no-service
npx @juspay/neurolink proxy setup --port 9000 --method oauth
OptionAliasTypeDefaultDescription
--port-pnumber55669Proxy port
--methodstringoauthAuth method: oauth or api-key
--no-servicebooleanfalseSkip service installation and start in foreground
--env-filestringPath to proxy provider env file to persist for the proxy

proxy install

npx @juspay/neurolink proxy install
npx @juspay/neurolink proxy install --port 9000 --host 0.0.0.0
OptionAliasTypeDefaultDescription
--port-pnumber55669Proxy port
--hoststring127.0.0.1Proxy host
--env-filestringPath to proxy provider env file to persist for the service
--configstringPath to proxy routing config file to persist for the service

proxy uninstall

npx @juspay/neurolink proxy uninstall

For the full operational guide, routing model, and the maintained OpenObserve dashboard, see Claude Proxy and Claude Proxy Observability.

Global Flags (available on every command)

FlagAliasDefaultDescription
--provider-pautoAI provider to use (auto-selects best available).
--model-mSpecific model to use.
--temperature-t0.7Creativity level (0.0 = focused, 1.0 = creative).
--maxTokens--max1000Maximum tokens to generate.
--system-sSystem prompt to guide AI behavior.
--format-f, --output-formattextOutput format: text, json, table.
--output-oSave output to file.
--configFile <path>Use a specific configuration file.
--dryRunfalseGenerate without calling providers (returns mocked analytics/evaluation).
--noColorfalseDisable ANSI colours.
--delay <ms>Delay between batched operations.
--domain <slug>-dDomain type for specialized processing and optimization.
--toolUsageContext <text>Describe expected tool usage for better evaluation feedback.
--debug-v, --verbosefalseEnable debug mode with verbose output.
--quiet-qtrueSuppress non-essential output.
--timeout120Maximum execution time in seconds.
--disableToolsfalseDisable MCP tool integration.
--enableAnalyticsfalseEnable usage analytics collection.
--enableEvaluationfalseEnable AI response quality evaluation.
--region-rVertex AI region (e.g., us-central1).

JSON-Friendly Automation

  • --format json returns structured output including analytics, evaluation, tool calls, and response metadata.
  • Combine with --enableAnalytics --enableEvaluation to capture usage costs and quality scores in automation pipelines.
  • Use --output <file> to persist raw responses alongside JSON logs.

rag <subcommand>

Document processing and RAG pipeline commands.

SubcommandDescription
chunkChunk a document using a specified strategy
indexIndex documents into a vector store
queryQuery indexed documents

rag chunk

Chunk a document file into smaller pieces for RAG processing.

neurolink rag chunk <file> [options]
OptionAliasTypeDefaultDescription
--strategy-sstringrecursiveChunking strategy
--maxSize-mnumber1000Maximum chunk size
--overlap-onumber200Overlap between chunks
--format-fstringtextOutput format: text, json, table
--outputstringstdoutOutput file path
--extract-ebooleanfalseExtract metadata (title, summary, keywords) via LLM
--provider-pstringProvider for semantic chunking/metadata extraction
--modelstringModel for semantic chunking/metadata extraction
--verbose-vbooleanfalseEnable verbose output

Chunking Strategies: character, recursive, sentence, token, markdown, html, json, latex, semantic, semantic-markdown

Examples:

# Default chunking
neurolink rag chunk ./docs/guide.md

# Markdown-aware chunking with JSON output
neurolink rag chunk ./docs/guide.md --strategy markdown --format json

# Custom size and overlap
neurolink rag chunk ./docs/guide.md --maxSize 512 --overlap 50 --output chunks.json

# Extract metadata with LLM
neurolink rag chunk ./docs/guide.md --extract --provider openai --verbose

rag index

Index a document for semantic search with vector embeddings.

neurolink rag index <file> [options]
OptionAliasTypeDefaultDescription
--indexName-nstringfilenameName for the index
--strategy-sstringauto-detectChunking strategy
--maxSize-mnumber1000Maximum chunk size
--overlap-onumber200Overlap between chunks
--provider-pstringautoProvider for embeddings
--modelstringModel for embeddings
--graph-gbooleanfalseBuild Graph RAG index
--verbose-vbooleanfalseEnable verbose output

Examples:

# Index a document with default settings
neurolink rag index ./docs/guide.md

# Index with a custom name and Graph RAG
neurolink rag index ./docs/guide.md --indexName my-docs --graph

# Index with specific provider and verbose output
neurolink rag index ./docs/api.md --provider openai --verbose

rag query

Query indexed documents using vector, hybrid, or Graph RAG search.

neurolink rag query <query> [options]
OptionAliasTypeDefaultDescription
--indexName-nstringName of the index to query
--topK-knumber5Number of results to return
--hybrid-hbooleanfalseUse hybrid search (vector + BM25)
--graph-gbooleanfalseUse Graph RAG search
--provider-pstringautoProvider for embeddings
--modelstringModel for embeddings
--format-fstringtextOutput format: text, json, table
--verbose-vbooleanfalseEnable verbose output

Examples:

# Basic vector search
neurolink rag query "How does authentication work?"

# Hybrid search with more results
neurolink rag query "API endpoints" --hybrid --topK 10

# Graph RAG search with JSON output
neurolink rag query "architecture overview" --graph --format json

# Query a specific index
neurolink rag query "chunking strategies" --indexName my-docs --verbose

RAG Flags on generate/stream

RAG can also be used directly with generate and stream commands via --rag-files:

neurolink generate "What is this about?" --rag-files ./docs/guide.md
neurolink stream "Summarize" --rag-files ./docs/a.md ./docs/b.md --rag-top-k 10
FlagTypeDefaultDescription
--rag-filesstring[]-File paths to load for RAG context
--rag-strategystringauto-detectedChunking strategy for RAG documents
--rag-chunk-sizenumber1000Maximum chunk size in characters
--rag-chunk-overlapnumber200Overlap between adjacent chunks
--rag-top-knumber5Number of top results to retrieve

workflow <subcommand>

Manage and execute AI workflows (consensus, fallback, adaptive, multi-judge).

# List available predefined workflows
npx @juspay/neurolink workflow list

# Show details of a specific workflow
npx @juspay/neurolink workflow info consensus-3

# Execute a workflow with a prompt
npx @juspay/neurolink workflow execute consensus-3 "Compare approaches to caching"

Subcommands:

SubcommandDescription
listList available predefined workflows
info <name>Show details of a workflow
execute <name> <prompt>Execute a workflow with a prompt

workflow execute flags:

OptionTypeDefaultDescription
--providerstringOverride AI provider
--modelstringOverride model name
--timeoutnumberExecution timeout in milliseconds
--verbosebooleanfalseEnable verbose output

Examples:

# Execute with provider override
npx @juspay/neurolink workflow execute adaptive-quality "Deep analysis of microservices" \
--provider openai --model gpt-4o --verbose

# Execute with timeout
npx @juspay/neurolink workflow execute fallback-fast "Translate to Spanish" --timeout 30000

observability <subcommand>

Observability and telemetry management. Aliases: obs, otel.

# Show telemetry and observability status
npx @juspay/neurolink observability status

# Show metrics summary
npx @juspay/neurolink obs metrics --detailed

# List configured exporters
npx @juspay/neurolink otel exporters

# Show cost breakdown
npx @juspay/neurolink observability costs --by-model

Subcommands:

SubcommandAliasDescription
statusShow telemetry and observability status
metricsShow metrics summary
exportersexpList configured exporters
costscostShow cost breakdown

Shared flags (all subcommands):

OptionAliasTypeDefaultDescription
--format-fstringtextOutput format: text, json, table
--quiet-qbooleanfalseMinimal output

metrics flags:

OptionAliasTypeDefaultDescription
--detailed-dbooleanfalseShow detailed metrics including percentiles

costs flags:

OptionAliasTypeDefaultDescription
--by-model-mbooleantrueShow cost breakdown by model
--by-provider-pbooleantrueShow cost breakdown by provider

telemetry <subcommand>

Telemetry and exporter management. Alias: tel.

# Show exporter status and health
npx @juspay/neurolink telemetry status

# Configure an exporter
npx @juspay/neurolink tel configure --exporter langfuse --config '{"publicKey":"pk-...","secretKey":"sk-..."}'

# List all available and configured exporters
npx @juspay/neurolink telemetry list-exporters

# Flush pending spans to exporters
npx @juspay/neurolink telemetry flush

# Show token usage and cost statistics
npx @juspay/neurolink telemetry stats --detailed

Subcommands:

SubcommandAliasesDescription
statusShow exporter status and health
configureConfigure an exporter with JSON settings
list-exporterslist, lsList all available and configured exporters
flushFlush all pending spans to exporters
statsShow token usage and cost statistics

Shared flags (all subcommands):

OptionAliasTypeDefaultDescription
--format-fstringtextOutput format: text, json, table
--quiet-qbooleanfalseMinimal output

configure flags:

OptionAliasTypeRequiredDescription
--exporter-estringyesExporter name: langfuse, langsmith, otel, datadog, sentry, braintrust, arize, posthog, laminar
--config-cstringyesJSON configuration string

flush flags:

OptionAliasTypeDefaultDescription
--timeout-tnumber30000Timeout in milliseconds

stats flags:

OptionAliasTypeDefaultDescription
--detailed-dbooleanfalseShow detailed statistics
--by-model-mbooleantrueShow breakdown by model
--by-provider-pbooleantrueShow breakdown by provider

docs

Start the NeuroLink documentation MCP server.

# Start docs server with stdio transport (default)
npx @juspay/neurolink docs

# Start docs server with HTTP transport on custom port
npx @juspay/neurolink docs --transport http --port 3001
OptionAliasTypeDefaultDescription
--transport-tstringstdioTransport protocol: stdio (local) or http (remote)
--port-pnumber3001Port for HTTP transport (ignored for stdio)

Note: Requires the docs site to be built first (cd docs-site && pnpm build). The server exposes documentation search and retrieval tools via MCP.


Troubleshooting

IssueTip
Unknown argumentCheck spelling; run command --help for the latest options.
CLI exits immediatelyUpgrade to the newest release or clear old neurolink binaries on PATH.
Provider shows as not-configuredRun neurolink setup --provider <name> or populate .env.
Analytics/evaluation missingEnsure both --enableAnalytics/--enableEvaluation and provider credentials for the judge model exist.

For advanced workflows (batching, tooling, configuration management) see the relevant guides in the documentation sidebar.


Q4 2025:

Q3 2025:

Documentation: