Skip to main content

Overview

NikCLI’s session management system provides comprehensive control over chat sessions, conversation history, and workspace state. The system enables persistent conversations, context preservation, session recovery, and advanced collaboration features across multiple projects and timeframes.

Session Persistence

Automatic session saving and recovery

History Management

Complete conversation history and search

Context Preservation

Maintain workspace context between sessions

Collaboration

Share and collaborate on sessions

Core Session Commands

/new - Create New Session

Start new chat sessions with optional configuration and context initialization.
  • Basic Session Creation
  • Session Templates
  • Session Configuration
# Create new session
/new

# Create with custom title
/new "React Component Development"
/new "API Integration Project"
/new "Database Migration Planning"

# Create with description
/new "Frontend Refactoring" --description "Modernize React components and improve performance"

/sessions - Session Management

List, organize, and manage multiple chat sessions with advanced filtering and search.
# List all sessions
/sessions

# List with detailed information
/sessions --detailed
/sessions --verbose --with-stats

# List recent sessions
/sessions --recent 10
/sessions --today
/sessions --this-week
Output Example:
Recent Sessions:
┌──────────────────────┬─────────────────────┬──────────┬─────────┬──────────────┐
│ ID                   │ Title               │ Created  │ Messages│ Last Activity│
├──────────────────────┼─────────────────────┼──────────┼─────────┼──────────────┤
│ ses_abc123           │ React Components    │ 2h ago   │ 45      │ 15m ago      │
│ ses_def456           │ API Development     │ 1d ago   │ 78      │ 3h ago       │
│ ses_ghi789           │ Database Migration  │ 3d ago   │ 23      │ 1d ago       │
└──────────────────────┴─────────────────────┴──────────┴─────────┴──────────────┘
# Filter by project
/sessions --project "e-commerce"
/sessions --workspace "/path/to/project"

# Filter by agent usage
/sessions --agent react-expert
/sessions --multi-agent

# Filter by content
/sessions --search "authentication"
/sessions --contains "typescript"

# Filter by date range
/sessions --since "2024-01-01"
/sessions --between "2024-01-01" "2024-01-31"
# Organize by tags
/sessions --tag frontend
/sessions --tag "react,typescript"

# Organize by categories
/sessions --category development
/sessions --category debugging
/sessions --category planning

# Archive old sessions
/sessions --archive --older-than 30d
/sessions --archive ses_abc123

# Star important sessions
/sessions --star ses_def456
/sessions --starred

/load - Session Loading

Load and resume previous chat sessions with full context restoration.
  • Basic Session Loading
  • Interactive Session Selection
  • Context Restoration
# Load by session ID
/load ses_abc123

# Load by title (fuzzy match)
/load "React Components"
/load "API Dev"

# Load most recent session
/load --recent
/load --last

/save - Session Persistence

Manually save session state with custom metadata and organization.
# Save current session
/save

# Save with custom title
/save "React Hook Implementation"

# Save with metadata
/save "Authentication System" 
      --description "JWT implementation with refresh tokens"
      --tags "auth,jwt,security"
      --category development
# Save with compression
/save --compress --optimize-history

# Save snapshot only (no full history)
/save --snapshot "Current Progress"

# Save with external references
/save --include-files --include-context
/save --embed-workspace-state
# Configure auto-save
/save --auto-save enable
/save --auto-save-interval 10m
/save --auto-save-on-exit true

# Auto-save policies
/save --auto-save-policy significant-changes
/save --auto-save-threshold 5-messages

Advanced Session Features

/export - Session Export

Export sessions in various formats for sharing, backup, and integration.
  • Export Formats
  • Export Options
  • Batch Export
# Export as Markdown
/export ses_abc123 --format markdown
/export ses_abc123 --markdown --file "session-export.md"

# Export as JSON
/export ses_abc123 --format json --pretty
/export --json --include-metadata --include-context

# Export as HTML
/export ses_abc123 --format html --styled
/export --html --include-code-highlighting

/import - Session Import

Import sessions from various sources and formats for migration and sharing.
# Import from file
/import session-backup.json
/import conversation-export.md --format markdown

# Import from URL
/import https://example.com/session-export.json
/import --url --validate --preview

# Import from clipboard
/import --clipboard --format auto-detect
# Import with validation
/import session.json --validate --check-integrity

# Import with merge options
/import session.json --merge-with-current
/import session.json --create-new-session

# Import with transformations
/import session.json --update-timestamps
/import session.json --resolve-references
# Import from other CLI tools
/import --from-chatgpt conversation.json
/import --from-claude-desktop session.json

# Import from version control
/import --from-git-history --branch main --path docs/

# Import from backup systems
/import --from-backup backup-2024-01-15.zip

/fork - Session Branching

Create session branches for exploring different approaches and maintaining conversation variants.
  • Basic Forking
  • Branch Management
  • Branch Operations
# Fork current session
/fork "Alternative Implementation"

# Fork specific session
/fork ses_abc123 "Performance Optimization Branch"

# Fork from specific message
/fork --from-message 25 "Different Approach"

/history - Conversation History

Access and manage comprehensive conversation history with advanced search and analysis.
# Show session history
/history

# Show detailed history
/history --detailed --with-timestamps
/history --verbose --include-metadata

# Show specific range
/history --last 20
/history --from-message 10 --to-message 30
/history --today
/history --since "2024-01-01"
# Analyze conversation patterns
/history analyze
/history --patterns --topics --trends

# Generate conversation summary
/history summary
/history --summarize --key-points --decisions

# Extract action items
/history actions
/history --todos --next-steps --follow-ups
Search across all sessions for specific content, patterns, or solutions.

/timeline - Session Timeline

Visualize session activity and progress over time with interactive timeline views.
# Show session timeline
/timeline
/timeline --session ses_abc123

# Timeline with different granularities
/timeline --by-hour
/timeline --by-day --last 30d
/timeline --by-week --this-month

# Activity timeline
/timeline --activity --sessions --agents
/timeline --heatmap --intensity
# Productivity analysis
/timeline --productivity --sessions-per-day
/timeline --patterns --peak-hours --efficiency

# Project timeline
/timeline --project "e-commerce" --milestones
/timeline --workspace "/path/to/project" --progress

# Agent usage timeline
/timeline --agents --usage-patterns --effectiveness
# Export timeline data
/timeline --export csv --date-range 30d
/timeline --export json --detailed --all-sessions

# Timeline reporting
/timeline --report weekly --email
/timeline --dashboard --live-updates

Session Collaboration

/share - Session Sharing

Share sessions with team members and collaborators with granular permission control.
  • Basic Sharing
  • Collaboration Features
  • Access Management
# Share current session
/share
/share --public-link --expires 7d

# Share specific session
/share ses_abc123 --with user@example.com
/share ses_abc123 --team frontend-developers

# Share with permissions
/share ses_abc123 --read-only
/share ses_abc123 --comment-only
/share ses_abc123 --full-access

/collaborate - Active Collaboration

Manage active collaboration sessions with real-time features and coordination.
# Start collaboration session
/collaborate start "Frontend Architecture Review"
/collaborate --invite user1@example.com,user2@example.com

# Join collaboration session
/collaborate join collab_xyz789
/collaborate --session-code ABC123

# Configure collaboration
/collaborate configure --max-participants 5
                      --allow-anonymous false
                      --require-approval true
# Real-time presence
/collaborate presence
/collaborate --show-cursors --show-typing --show-status

# Live session synchronization
/collaborate sync --real-time --conflict-resolution auto
/collaborate --sync-interval 500ms --max-lag 2s

# Collaborative editing
/collaborate edit --operational-transform
/collaborate --merge-strategy last-write-wins
# Manage participants
/collaborate participants
/collaborate --add-participant user@example.com
/collaborate --remove-participant user@example.com
/collaborate --transfer-ownership new-owner@example.com

# Session control
/collaborate pause --reason "break time"
/collaborate resume
/collaborate end --save-session --notify-participants

# Collaboration analytics
/collaborate analytics --participation --contributions
/collaborate --effectiveness --satisfaction-survey

/review - Session Review

Comprehensive session review and analysis for learning and improvement.
  • Review Process
  • Review Analysis
  • Review Outcomes
# Start session review
/review ses_abc123
/review --current-session --comprehensive

# Structured review
/review ses_abc123 --checklist development-review
/review --template code-review --criteria quality,efficiency

# Collaborative review
/review ses_abc123 --reviewers user1@example.com,user2@example.com
/review --review-session --schedule "tomorrow 2pm"

Session Analytics and Insights

/stats - Session Statistics

Comprehensive statistics and analytics about session usage, productivity, and patterns.
# Overall usage stats
/stats
/stats --overview --summary

# Detailed session statistics
/stats --sessions --detailed
/stats --messages --agents --tools

# Time-based statistics
/stats --daily --weekly --monthly
/stats --trends --growth --patterns
# Productivity analysis
/stats productivity
/stats --efficiency --output-quality --task-completion

# Session effectiveness
/stats effectiveness
/stats --goal-achievement --problem-resolution --learning-outcomes

# Comparative analysis
/stats compare --periods "this-month:last-month"
/stats --benchmark --industry-standards --team-average
# Behavioral analytics
/stats behavior
/stats --usage-patterns --preferences --workflows

# Content analytics
/stats content
/stats --topics --technologies --complexity-levels

# Predictive analytics
/stats predict
/stats --usage-forecast --trend-analysis --recommendations

/insights - Session Insights

AI-powered insights and recommendations based on session history and patterns.
  • Productivity Insights
  • Learning Insights
  • Collaboration Insights
# Productivity insights
/insights productivity
/insights --efficiency-tips --optimization-suggestions

# Workflow insights
/insights workflow
/insights --process-improvements --automation-opportunities

# Time management insights
/insights time-management
/insights --peak-productivity-hours --session-length-optimization

Session Backup and Recovery

/backup - Session Backup

Comprehensive backup system for session data, configuration, and workspace state.
# Create full backup
/backup create --full --all-sessions
/backup --include-config --include-workspace-state

# Incremental backup
/backup create --incremental --since-last-backup
/backup --changes-only --differential

# Selective backup
/backup create --sessions ses_abc123,ses_def456
/backup --tag frontend --recent 30d
# Local backup storage
/backup --local --path "/path/to/backups"
/backup --compress --encrypt --password-protect

# Cloud backup storage
/backup --cloud aws-s3 --bucket nikcli-backups
/backup --cloud google-drive --folder "NikCLI Backups"

# Version control backup
/backup --git --repository backup-repo
/backup --git-lfs --large-files
# List backups
/backup list
/backup --show-details --verify-integrity

# Backup scheduling
/backup schedule --daily --time 2am
/backup --auto-backup --trigger session-count=10

# Backup cleanup
/backup cleanup --keep-last 30
/backup --retention-policy "daily:30d,weekly:12w,monthly:12m"

/restore - Session Recovery

Restore sessions and data from backups with flexible recovery options.
  • Basic Recovery
  • Recovery Options
  • Disaster Recovery
# Restore from backup
/restore backup-2024-01-15.zip
/restore --backup-id backup_xyz789

# Restore specific sessions
/restore backup.zip --sessions ses_abc123,ses_def456
/restore --session-filter "tag:frontend"

# Point-in-time recovery
/restore --timestamp "2024-01-15 14:30:00"
/restore --before "last Tuesday"

Next Steps

Use /sessions --recent to quickly access your most recent work, and consider using session templates to standardize your workflow setup for different types of projects.