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
| Command | Description | Example |
|---|---|---|
generate / gen | One-shot content generation with optional multimodal input. | npx @juspay/neurolink generate "Draft release notes" --image ./before.png |
stream | Real-time streaming output with tool support. | npx @juspay/neurolink stream "Narrate sprint demo" --enableAnalytics |
batch | Process multiple prompts from a file. | npx @juspay/neurolink batch prompts.txt --format json |
loop | Interactive 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 / s | Guided provider onboarding and validation. | npx @juspay/neurolink setup --provider openai |
status | Health check for configured providers. | npx @juspay/neurolink status --verbose |
get-best-provider | Show the best available AI provider. | npx @juspay/neurolink get-best-provider --format json |
models list | Inspect 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 server | npx @juspay/neurolink server start --port 3000 |
serve | Start server in foreground mode | npx @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 |
observability | Observability and telemetry management (aliases: obs, otel). | npx @juspay/neurolink observability status |
telemetry | Telemetry and exporter management (alias: tel). | npx @juspay/neurolink telemetry status |
docs | Start the NeuroLink documentation MCP server. | npx @juspay/neurolink docs --transport http --port 3001 |
validate | Alias for config validate. | npx @juspay/neurolink validate |
completion | Generate 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 (defaultauto).--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 (default0.7).--maxTokens,--max– response limit (default1000).--system,-s– system prompt.--format,-f,--output-format–text(default),json, ortable.--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 (defaultfalse).--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 (default120).--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 (defaulttrue).
CSV Options:
--csvMaxRows– maximum number of CSV rows to process (default1000).--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 (default8).--video-quality– frame quality 0–100 (default85).--video-format– frame format:jpeg(default) orpng.--transcribe-audio– extract and transcribe audio from video (defaultfalse).
Text-to-Speech (TTS):
--tts– enable text-to-speech output (defaultfalse).--ttsProvider– TTS provider:google-ai,vertex,openai-tts,elevenlabs,azure-tts(overrides--providerfor speech synthesis; default auto-selects from configured credentials).--ttsVoice– TTS voice to use (e.g.,en-US-Neural2-C,Rachelfor ElevenLabs).--ttsFormat– audio output format:mp3(default),wav,ogg,opus,m4a,flac,webm,mp4,mpeg,mpga.--ttsSpeed– speaking rate 0.25–4.0 (default1.0).--ttsQuality– audio quality level:standard(default) orhd.--ttsOutput– save TTS audio to file (supports absolute and relative paths).--ttsPlay– auto-play generated audio (defaultfalse).
Speech-to-Text (STT):
--stt– enable speech-to-text transcription of input audio (defaultfalse).--sttProvider– STT provider:whisper,deepgram,google-stt,azure-stt(default auto-selects from configured credentials).--input-audio– path to input audio file for STT transcription. Implies--stt.--sttLanguage– audio language code for STT (e.g.,en-US,es-ES).
Extended Thinking:
--thinking,--think– enable extended thinking/reasoning capability (defaultfalse).--thinkingBudget– token budget for extended thinking (5000–100000, default10000). 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-keyoroauth. Overrides auto-detection.--subscription-tier– subscription tier:free,pro,max,max_5,max_20, orapi. Overrides auto-detection from token/env.--enable-beta– enable Anthropic beta features (experimental capabilities, computer use, etc.). Defaultfalse.
# 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) orvideo.--image– path to input image file (required for video generation, e.g., ./input.jpg).--videoOutput,-vo– path to save generated video file.--videoResolution–720por1080p(default720p).--videoLength– duration:4,6, or8seconds (default4).--videoAspectRatio–9:16(portrait) or16:9(landscape, default16:9).--videoAudio– include synchronized audio (defaulttrue).
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, default10when 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:9or4:3(default:16:9when PPT mode is enabled).--pptNoImages– disable AI image generation for slides (defaultfalse).
# 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:
| Flag | Alias | Type | Default | Description |
|---|---|---|---|---|
--enable-conversation-memory | boolean | true | Enable conversation memory for the loop session | |
--max-sessions | number | 50 | Maximum number of conversation sessions to keep | |
--max-turns-per-session | number | 20 | Maximum turns per conversation session | |
--auto-redis | boolean | true | Automatically use Redis if available | |
--resume | -r | string | Directly resume a specific conversation by session ID | |
--new | -n | boolean | Force start a new conversation (skip selection menu) | |
--list-conversations | -l | boolean | List available conversations and exit | |
--compact-threshold | number | 0.8 | Context compaction trigger threshold (0.0–1.0) | |
--disable-compaction | boolean | false | Disable 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_URLis set - Export session history as JSON for analytics
- Automatic context compaction when usage exceeds threshold
Session management commands (inside loop):
| Command | Description |
|---|---|
help | Show 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. |
show | Display all currently set session variables. |
clear | Reset all session variables. |
exit | Exit loop session. Aliases: quit, :q. |
Settable session variables (via set):
| Variable | Type | Description | Allowed Values |
|---|---|---|---|
provider | string | The AI provider to use. | openai, anthropic, google-ai, vertex, bedrock, azure, etc. |
model | string | The specific model to use from the provider. | Any valid model name |
temperature | number | Controls randomness of the output (e.g., 0.2, 0.8). | |
maxTokens | number | The maximum number of tokens to generate. | |
output | string | AI response format value. | text, json, structured, none |
systemPrompt | string | The system prompt to guide the AI's behavior. | |
timeout | number | Timeout for the generation request in milliseconds. | |
disableTools | boolean | Disable all tool usage for the AI. | |
maxSteps | number | Maximum number of tool execution steps. | |
enableAnalytics | boolean | Enable or disable analytics for responses. | |
enableEvaluation | boolean | Enable or disable AI-powered evaluation of responses. | |
evaluationDomain | string | Domain expertise for evaluation. | |
toolUsageContext | string | Context about tools/MCPs used in the interaction. | |
enableSummarization | boolean | Enable automatic conversation summarization. | |
thinking | boolean | Enable extended thinking/reasoning capability. | |
thinkingBudget | number | Token budget for thinking (Anthropic models: 5000–100000). | |
thinkingLevel | string | Thinking 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:
When
Context usage: 83% of window (12,450 / 15,000 tokens)
Auto-compaction will trigger to preserve conversation quality.--disable-compactionis 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:
| Subcommand | Description |
|---|---|
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:
| Flag | Alias | Type | Default | Description |
|---|---|---|---|---|
--method | -m | string | Authentication method: api-key, oauth, or create-api-key | |
--non-interactive | boolean | false | Skip interactive prompts (requires environment variables) |
Shared flags:
| Flag | Alias | Type | Default | Description |
|---|---|---|---|---|
--format | string | text | Output format: text, json | |
--quiet | -q | boolean | false | Suppress non-essential output |
--debug | boolean | false | Enable debug output |
Authentication methods:
api-key-- Traditional API key authentication. Prompts for your Anthropic API key and stores it in the project.envfile. 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
.envfile asANTHROPIC_API_KEY. - OAuth tokens are stored in
~/.neurolink/<provider>-credentials.jsonwith restricted file permissions. - The
logoutsubcommand 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:
- Prompts for API keys – Securely collects credentials
- Validates authentication – Tests connection to provider
- Writes
.envfile – Safely stores credentials (creates if missing) - Recommends models – Suggests best models for your use case
- 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:
| Subcommand | Description |
|---|---|
list | List available models with filtering options |
search [query] | Search models by capabilities, use case, or features |
best | Get 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 |
stats | Show model registry statistics and insights |
Global models options:
| Option | Type | Default | Description |
|---|---|---|---|
--format | string | table | Output format: table, json, compact |
--output | string | Save output to file | |
--quiet | boolean | false | Suppress non-essential output |
--debug | boolean | false | Enable debug output |
models list
npx @juspay/neurolink models list [options]
| Option | Type | Default | Description |
|---|---|---|---|
--provider | string | Filter by AI provider | |
--category | string | Filter by model category: general, coding, creative, vision, reasoning | |
--capability | array | Filter by required capabilities: vision, functionCalling, codeGeneration, reasoning, multimodal, streaming, jsonMode | |
--deprecated | boolean | false | Include 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]
| Option | Type | Default | Description |
|---|---|---|---|
--use-case | string | Filter by primary use case: coding, creative, analysis, conversation, reasoning, translation, summarization | |
--max-cost | number | Maximum cost per 1K tokens (USD) | |
--min-context | number | Minimum context window size (tokens) | |
--max-context | number | Maximum context window size (tokens) | |
--performance | string | Required 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]
| Option | Type | Description |
|---|---|---|
--coding | boolean | Optimize for code generation and programming |
--creative | boolean | Optimize for creative writing and content |
--analysis | boolean | Optimize for data analysis and research |
--conversation | boolean | Optimize for conversational interactions |
--reasoning | boolean | Optimize for logical reasoning tasks |
--translation | boolean | Optimize for language translation |
--summarization | boolean | Optimize for text summarization |
--cost-effective | boolean | Prioritize cost-effectiveness |
--high-quality | boolean | Prioritize output quality over cost |
--fast | boolean | Prioritize response speed |
--require-vision | boolean | Require vision/image processing capability |
--require-function-calling | boolean | Require function calling capability |
--exclude-providers | array | Exclude specific providers |
--prefer-local | boolean | Prefer 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]
| Option | Type | Default | Description |
|---|---|---|---|
--fuzzy | boolean | true | Enable 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]
| Option | Type | Default | Description |
|---|---|---|---|
--detailed | boolean | false | Show 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