Interactive CLI: Your AI Development Environment

January 6, 2026 ยท View on GitHub

Since: v7.0.0 | Status: Production Ready | Availability: CLI

Why Interactive Mode?

NeuroLink's Interactive CLI transforms traditional command-line usage into a persistent development environment optimized for AI workflow iteration. Unlike standard CLIs where each command is isolated, Interactive Mode maintains session state, conversation memory, and configuration across all operations - enabling rapid experimentation, debugging, and production runbook execution.

Traditional CLI vs Interactive Mode

FeatureTraditional CLINeuroLink InteractiveProductivity Impact
Session StateNone - lost after each commandFull persistence across session10x faster parameter tuning
MemoryNo context between commandsConversation-aware with history5x reduction in repeated context
ConfigurationFlags required per command/set persists across entire session80% fewer keystrokes
Tool TestingManual per-tool invocationLive discovery & testing with /mcp3x faster integration testing
StreamingOptional per commandReal-time default with progress barsImmediate feedback
Error RecoveryStart over from scratchSession preserved, fix and retry90% time saved on errors
Workflow ReplayCopy-paste commandsExport/import full sessionsReproducible workflows

Measured productivity gains:

  • 80% faster onboarding for new users
  • 60% fewer configuration errors
  • 3-5x faster prompt engineering iteration
  • Universal accessibility from beginner to expert

Getting Started

Starting a Session

Basic session with auto-detected Redis memory:

npx @juspay/neurolink loop

๐Ÿš€ NeuroLink Interactive Loop Mode
๐Ÿ’ฌ Conversation Memory: Redis auto-detected
๐Ÿ“ Session ID: sess_abc123def456

Ready! Use /help to see available commands.

neurolink >

With explicit configuration:

# Enable conversation memory with Redis
npx @juspay/neurolink loop --enable-conversation-memory

# Disable memory entirely (prompt-by-prompt mode)
npx @juspay/neurolink loop --enable-conversation-memory=false

# Custom retention limits
npx @juspay/neurolink loop --max-sessions 100 --max-turns-per-session 50

# Start with specific provider
npx @juspay/neurolink loop --provider anthropic --model claude-3-sonnet

# Disable Redis auto-detection (in-memory only)
npx @juspay/neurolink loop --no-auto-redis

Your First Interactive Session

Step-by-step walkthrough:

$ npx @juspay/neurolink loop --enable-conversation-memory

โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
โ•‘         NeuroLink Interactive Loop Mode v8.26.1          โ•‘
โ•‘  Universal AI Platform - 13 Providers | 58+ MCP Tools    โ•‘
โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•

๐Ÿ’ฌ Conversation Memory: Enabled (Redis)
๐Ÿ“ Session ID: sess_2026_01_01_143052
๐Ÿ”ง Provider: auto (will select best provider)
๐Ÿ“Š Temperature: 0.7 (balanced creativity)

๐Ÿ’ก Quick Start:
   โ€ข Type your prompt or question directly
   โ€ข Use /set to configure (e.g., /set provider anthropic)
   โ€ข Use /help to see all commands
   โ€ข Use /mcp discover to see available tools

Ready! What would you like to do?

neurolink > Set the provider to Google AI Studio

 Setting session variable...
โœ… provider set to google-ai

neurolink > What capabilities do you have?

๐Ÿค– Generating response...

I'm an AI assistant powered by Google Gemini 3 Flash through NeuroLink. I have access to:

1. **Text Generation**: Complex reasoning, creative writing, coding
2. **Vision**: Image analysis and description
3. **Tool Usage**: 58+ MCP tools including:
   - Filesystem operations (read, write, list files)
   - Web search and browsing
   - GitHub integration
   - Database queries (PostgreSQL, SQLite, MongoDB)
   - And many more...

4. **Extended Thinking**: Deep reasoning for complex problems
5. **Structured Output**: JSON schema-based responses

Would you like me to demonstrate any of these capabilities?

neurolink > Yes, list the files in the current directory

๐Ÿค– Using tool: listDirectory
๐Ÿ“ Path: .

Files in current directory:
โ”œโ”€โ”€ src/
โ”œโ”€โ”€ docs/
โ”œโ”€โ”€ package.json
โ”œโ”€โ”€ tsconfig.json
โ”œโ”€โ”€ README.md
โ””โ”€โ”€ LICENSE

neurolink > /mcp discover

๐Ÿ” Discovering MCP tools...

๐Ÿ“‹ Available MCP Servers (5):
โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•ฆโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•ฆโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
โ•‘ Server        โ•‘ Status      โ•‘ Tools        โ•‘
โ• โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•ฌโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•ฌโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•ฃ
โ•‘ filesystem    โ•‘ โœ… Active   โ•‘ 9 tools      โ•‘
โ•‘ github        โ•‘ โœ… Active   โ•‘ 15 tools     โ•‘
โ•‘ postgres      โ•‘ โœ… Active   โ•‘ 8 tools      โ•‘
โ•‘ brave-search  โ•‘ โœ… Active   โ•‘ 3 tools      โ•‘
โ•‘ memory        โ•‘ โœ… Active   โ•‘ 4 tools      โ•‘
โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•ฉโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•ฉโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•

Total: 39 tools available

๐Ÿ’ก Use /mcp test <server> to test a specific server
๐Ÿ’ก AI can use these tools automatically in conversations

neurolink > /export json session.json

๐Ÿ’พ Exporting conversation...

โœ… Exported 4 messages to session.json

Session Summary:
โ”œโ”€โ”€ Provider: google-ai
โ”œโ”€โ”€ Model: gemini-3-flash-preview
โ”œโ”€โ”€ Messages: 4 (2 user, 2 assistant)
โ”œโ”€โ”€ Tools Used: listDirectory (1x)
โ””โ”€โ”€ Duration: 3 minutes

neurolink > exit

๐Ÿ‘‹ Goodbye! Session saved.

๐Ÿ’ก Resume this session:
   npx @juspay/neurolink loop --session session.json

Loop Mode Deep Dive

Session Variables

Configure once, use throughout your session:

Setting Variables

neurolink > /set provider anthropic
โœ… provider set to anthropic

neurolink > /set model claude-3-opus
โœ… model set to claude-3-opus

neurolink > /set temperature 0.3
โœ… temperature set to 0.3

neurolink > /set thinking-level high
โœ… thinking-level set to high

neurolink > /set max-tokens 4000
โœ… max-tokens set to 4000

Getting Current Values

neurolink > /get provider
๐Ÿ“Š provider: anthropic

neurolink > /get all
๐Ÿ“Š Current Session Configuration:
โ”œโ”€โ”€ provider: anthropic
โ”œโ”€โ”€ model: claude-3-opus
โ”œโ”€โ”€ temperature: 0.3
โ”œโ”€โ”€ thinking-level: high
โ”œโ”€โ”€ max-tokens: 4000
โ””โ”€โ”€ conversation-memory: enabled

Unsetting Variables

neurolink > /unset temperature
โœ… temperature unset (reverting to default: 0.7)

neurolink > /clear
โš ๏ธ  Clear all session variables? (y/n): y
โœ… All session variables cleared

Conversation Memory

How Memory Works

Interactive mode maintains conversation context automatically:

neurolink > My name is Alice and I work on the backend team

๐Ÿค– Nice to meet you, Alice! As a backend developer, you might be interested in...

neurolink > What's my name?

๐Ÿค– Your name is Alice, and you mentioned you work on the backend team.

neurolink > /history

๐Ÿ“œ Conversation History (4 messages):

1. USER: My name is Alice and I work on the backend team
2. ASSISTANT: Nice to meet you, Alice! As a backend developer...
3. USER: What's my name?
4. ASSISTANT: Your name is Alice, and you mentioned you work on the backend team.

neurolink > /clear

โš ๏ธ  This will clear conversation history but preserve session variables.
   Continue? (y/n): y

โœ… Conversation history cleared
๐Ÿ’ก Session variables (provider, model, etc.) preserved

Memory Persistence (Redis)

With Redis enabled, conversations persist across sessions:

# Session 1
neurolink > I'm debugging the authentication service

๐Ÿค– I can help with that. What specific issue are you seeing?

neurolink > exit
๐Ÿ’พ Session saved to Redis

# Later - Session 2 (same session ID)
npx @juspay/neurolink loop --session sess_abc123

neurolink > What was I working on?

๐Ÿค– You were debugging the authentication service. Have you made progress?

Provider Switching

Switch providers mid-session to compare responses:

neurolink > /set provider openai
โœ… provider set to openai

neurolink > Explain quantum computing

๐Ÿค– [OpenAI GPT-4 response]

neurolink > /set provider anthropic
โœ… provider set to anthropic

neurolink > Explain quantum computing

๐Ÿค– [Anthropic Claude response]

neurolink > /set provider google-ai
โœ… provider set to google-ai

neurolink > Explain quantum computing

๐Ÿค– [Google Gemini response]

Model Experimentation

A/B test different models in the same session:

# Test different models on same prompt
neurolink > /set provider anthropic

neurolink > /set model claude-3-haiku
neurolink > Write a haiku about coding
๐Ÿค– [Haiku response - fast, concise]

neurolink > /set model claude-3-sonnet
neurolink > Write a haiku about coding
๐Ÿค– [Sonnet response - balanced]

neurolink > /set model claude-3-opus
neurolink > Write a haiku about coding
๐Ÿค– [Opus response - creative, detailed]

# Compare thinking levels
neurolink > /set thinking-level minimal
neurolink > Solve this logic puzzle: ...
๐Ÿค– [Quick response]

neurolink > /set thinking-level high
neurolink > Solve this logic puzzle: ...
๐Ÿค– [Deep reasoning response with extended thinking]

Command Reference

Session Management

CommandDescriptionExample
/set <key> <value>Set session variable (persists across commands)/set provider anthropic
/get <key>Get current value of variable/get temperature
/get allShow all session variables/get all
/unset <key>Remove session variable (revert to default)/unset temperature
/showAlias for /get all/show
/clearClear conversation history (keeps variables)/clear
/resetReset everything (history + variables)/reset
/historyView conversation history/history
/history <n>View last N messages/history 10
/export <format> <file>Export session (json, markdown, text)/export json session.json
/import <file>Import previous session/import session.json
exit / quit / :qExit loop modeexit

Available Session Variables

VariableTypeExampleDescription
providerstringanthropicAI provider to use
modelstringclaude-3-opusSpecific model
temperaturenumber0.7Creativity level (0-1)
max-tokensnumber4000Maximum response length
thinking-levelstringhighExtended thinking mode
streamingbooleantrueEnable streaming responses
toolsbooleantrueEnable MCP tool usage

MCP Tools Commands

CommandDescriptionExample
/mcp discoverList all available MCP servers and tools/mcp discover
/mcp listAlias for discover/mcp list
/mcp test <server>Test connectivity to MCP server/mcp test github
/mcp add <name> <command>Add MCP server to session/mcp add myserver "npx my-mcp-server"
/mcp remove <name>Remove MCP server/mcp remove myserver
/mcp statusShow status of all servers/mcp status
/mcp exec <tool> <args>Manually execute a tool/mcp exec github create_issue --params '{"title":"Bug"}'

HITL Commands

CommandDescriptionExample
/hitl statusView pending approvals/hitl status
/hitl approve <id>Approve pending action/hitl approve 1
/hitl reject <id>Reject with reason/hitl reject 2 --reason "Security concern"
/hitl historyView approval history/hitl history --last 10
/hitl configView HITL configuration/hitl config

Help Commands

CommandDescriptionExample
/helpShow all available commands/help
/help <command>Help for specific command/help set
/?Alias for help/?

Real-World Workflows

Workflow 1: Development Iteration

Complete session showing code generation, refinement, and testing:

neurolink > /set provider anthropic
neurolink > /set model claude-3-sonnet
neurolink > /set temperature 0.3  # Lower temp for code

# Initial generation
neurolink > Create a TypeScript function to validate email addresses

๐Ÿค– Here's an email validation function:

```typescript
function validateEmail(email: string): boolean {
  const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
  return emailRegex.test(email);
}

neurolink > Add support for validating domains

๐Ÿค– [AI remembers previous context, extends the function]

function validateEmail(email: string, allowedDomains?: string[]): boolean {
  const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;

  if (!emailRegex.test(email)) {
    return false;
  }

  if (allowedDomains) {
    const domain = email.split("@")[1];
    return allowedDomains.includes(domain);
  }

  return true;
}

neurolink > Add unit tests

๐Ÿค– [AI remembers the function, generates tests]

import { describe, it, expect } from "vitest";

describe("validateEmail", () => {
  it("should validate correct emails", () => {
    expect(validateEmail("user@example.com")).toBe(true);
  });

  it("should reject invalid emails", () => {
    expect(validateEmail("invalid")).toBe(false);
  });

  it("should validate against allowed domains", () => {
    expect(validateEmail("user@company.com", ["company.com"])).toBe(true);
  });
});

neurolink > /export markdown code-session.md โœ… Exported to code-session.md


### Workflow 2: Model Experimentation

Comparing responses across providers and models:

```bash
# Test prompt engineering across models
PROMPT="Explain dependency injection in 50 words"

neurolink > /set provider openai
neurolink > /set model gpt-4-turbo

neurolink > $PROMPT
๐Ÿค– [GPT-4 Turbo response]
Word count: 48

neurolink > /set provider anthropic
neurolink > /set model claude-3-opus

neurolink > $PROMPT
๐Ÿค– [Claude Opus response]
Word count: 52

neurolink > /set provider google-ai
neurolink > /set model gemini-3-flash

neurolink > $PROMPT
๐Ÿค– [Gemini 3 Flash response]
Word count: 47

# Compare thinking levels
neurolink > /set thinking-level minimal
neurolink > Solve: What is 15% of 280?
๐Ÿค– 42 [instant]

neurolink > /set thinking-level high
neurolink > Solve: If a train leaves at 2pm going 60mph...
๐Ÿค– [extended thinking visible]
   Thinking... analyzing problem structure
   Thinking... calculating distances
   Thinking... verifying solution
   Answer: [detailed solution with reasoning]

neurolink > /export json model-comparison.json

Workflow 3: MCP Tool Testing

Discovering, testing, and using MCP tools:

neurolink > /mcp discover

๐Ÿ“‹ Available MCP Servers (8):
โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•ฆโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•ฆโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
โ•‘ Server        โ•‘ Status      โ•‘ Tools        โ•‘
โ• โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•ฌโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•ฌโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•ฃ
โ•‘ filesystem    โ•‘ โœ… Active   โ•‘ 9 tools      โ•‘
โ•‘ github        โ•‘ โœ… Active   โ•‘ 15 tools     โ•‘
โ•‘ postgres      โ•‘ โŒ Inactive โ•‘ 0 tools      โ•‘
...

neurolink > /mcp test postgres

๐Ÿ” Testing MCP server: postgres
โŒ Connection failed: ECONNREFUSED

๐Ÿ’ก Fix: Set POSTGRES_CONNECTION_STRING environment variable
   export POSTGRES_CONNECTION_STRING="postgresql://user:pass@localhost:5432/db"

neurolink > Great, let me fix that [sets env var externally]

neurolink > /mcp test postgres
โœ… Connection successful!
๐Ÿ“‹ 8 tools available: query, schema, tables, insert, update...

neurolink > Use the GitHub tool to list my repositories

๐Ÿค– Using tool: github_list_repos

Found 23 repositories:
1. neurolink-examples (public)
2. ai-playground (private)
3. docs-site (public)
...

neurolink > Create an issue in neurolink-examples titled "Add HITL example"

๐Ÿค– Using tool: github_create_issue
๐Ÿ”” HITL Approval Required

Action: github_create_issue
Args:
  repo: neurolink-examples
  title: Add HITL example
  body: [AI-generated description]

Approve? (y/n): y

โœ… Issue created: neurolink-examples#42
๐Ÿ”— https://github.com/user/neurolink-examples/issues/42

neurolink > /export json github-workflow.json

Workflow 4: Documentation Generation

Using AI to generate docs with iterative refinement:

neurolink > /set provider anthropic
neurolink > /set temperature 0.5

neurolink > Read the file src/lib/neurolink.ts

๐Ÿค– Using tool: readFile

[File contents displayed]

neurolink > Generate API documentation for the NeuroLink class

๐Ÿค– # NeuroLink API Documentation

## Class: NeuroLink

Main SDK class for interacting with AI providers...

[Generated docs]

neurolink > Add examples for each method

๐Ÿค– [AI remembers the documentation, adds examples]

## Examples

### generate()
```typescript
const result = await neurolink.generate({
  input: { text: "Hello" }
});

...

neurolink > Save this to docs/api/neurolink.md

๐Ÿค– Using tool: writeFile โœ… Saved to docs/api/neurolink.md

neurolink > Now generate docs for the MessageBuilder class

๐Ÿค– Reading src/lib/utils/messageBuilder.ts...

[Continues documentation generation]

neurolink > /export json doc-generation-session.json


---

## Tips & Tricks

### Power User Features

#### Keyboard Shortcuts

- **โ†‘ / โ†“** - Navigate command history
- **Tab** - Auto-complete commands and variables
- **Ctrl+C** - Cancel current operation (doesn't exit)
- **Ctrl+D** - Exit loop mode
- **Ctrl+L** - Clear screen
- **Ctrl+R** - Search command history

#### Multi-line Input

Use backslash continuation for multi-line prompts:

```bash
neurolink > Write a function that: \
... 1. Validates user input \
... 2. Sanitizes the data \
... 3. Returns typed result

๐Ÿค– [AI processes full multi-line prompt]

Or use triple backticks for code blocks:

neurolink > Review this code:

function process(data) { return data.map(x => x * 2); }


๐Ÿค– [AI reviews the code block]

Command Aliases

Create shortcuts for common operations:

# In your shell profile (.bashrc, .zshrc)
alias nlg="npx @juspay/neurolink loop --provider google-ai"
alias nla="npx @juspay/neurolink loop --provider anthropic"
alias nlo="npx @juspay/neurolink loop --provider openai"

# Usage
$ nlg  # Starts loop with Google AI
$ nla  # Starts loop with Anthropic

Session Persistence

Saving Sessions

Explicit save to file:

neurolink > /export json my-session.json
โœ… Exported 15 messages to my-session.json

# Session includes:
# - All conversation history
# - Session variables
# - Tool usage logs
# - Timestamps

Resuming Sessions

# Resume from file
npx @juspay/neurolink loop --session my-session.json

# Resume from Redis (if enabled)
npx @juspay/neurolink loop --session-id sess_abc123

Sharing Sessions

Share reproducible workflows with team:

# Developer 1
neurolink > [Creates workflow]
neurolink > /export json workflow.json

# Developer 2
npx @juspay/neurolink loop --session workflow.json
# Can replay exact same workflow

Integration with Scripts

Piping Input

# Pipe file contents to AI
cat README.md | npx @juspay/neurolink generate "Summarize this:"

# Process output from commands
git diff | npx @juspay/neurolink generate "Review these changes"

# Chain with other tools
curl https://api.example.com/data | \
  npx @juspay/neurolink generate "Analyze this JSON"

Non-Interactive Mode

# Run single command and exit
npx @juspay/neurolink generate "Hello" --provider anthropic --exit

# Batch processing
for file in *.md; do
  npx @juspay/neurolink generate "Summarize: $(cat $file)" \
    --provider google-ai \
    --output summary-$file
done

CI/CD Usage

# .github/workflows/ai-review.yml
- name: AI Code Review
  run: |
    npx @juspay/neurolink loop --non-interactive <<EOF
    /set provider anthropic
    /set model claude-3-sonnet
    Review the code changes:
    $(git diff)
    EOF

Troubleshooting

Common Issues

Issue: Command Not Recognized

Symptom:

neurolink > /set provider anthropic
Unknown command: /set

Solution: Ensure you're in loop mode:

# Wrong - regular CLI
npx @juspay/neurolink set provider anthropic

# Right - loop mode
npx @juspay/neurolink loop
neurolink > /set provider anthropic

Issue: Conversation Memory Not Working

Symptom: AI doesn't remember previous context

Solution:

# Check if memory is enabled
neurolink > /get all
...
conversation-memory: disabled  # <-- Problem!

# Enable memory
npx @juspay/neurolink loop --enable-conversation-memory

# Or set Redis URL
export REDIS_URL=redis://localhost:6379
npx @juspay/neurolink loop  # Auto-detects Redis

Issue: Provider Connection Failed

Symptom:

Error: Failed to connect to provider 'anthropic'

Solution:

# Check API key is set
echo $ANTHROPIC_API_KEY

# Set API key
export ANTHROPIC_API_KEY=sk-ant-...

# Or in .env file
ANTHROPIC_API_KEY=sk-ant-...

Issue: Session Export Empty

Symptom: Exported session has no messages

Solution:

# Check if conversation memory is enabled
neurolink > /get all

# Memory disabled - enable it
npx @juspay/neurolink loop --enable-conversation-memory

# Now messages will be tracked for export

Issue: MCP Tools Not Showing

Symptom:

neurolink > /mcp discover
No MCP servers found

Solution:

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

# Verify in .mcp-config.json or configure manually

Debug Mode

Enable verbose logging:

# Via environment variable
export NEUROLINK_DEBUG=true
npx @juspay/neurolink loop

# Via flag
npx @juspay/neurolink loop --debug

# Debug output shows:
# - Session initialization
# - Variable changes
# - Provider selections
# - Tool executions
# - Memory operations

Example debug output:

[DEBUG] Initializing loop session
[DEBUG] Session ID: sess_abc123
[DEBUG] Redis connection: redis://localhost:6379 (connected)
[DEBUG] Conversation memory: enabled
[DEBUG] Loading session variables...
[DEBUG] Variable set: provider=google-ai
[DEBUG] Provider initialized: GoogleAIStudioProvider
[DEBUG] Model: gemini-3-flash-preview
[DEBUG] MCP servers discovered: 5
[DEBUG] Tools available: 39

See Also