Skip to main content

Session Management

NikCLI provides comprehensive session management capabilities for maintaining workspace state, managing multiple work contexts, and preserving development progress across sessions.

Core Session Commands

/new [name]

Create a new work session with optional name and configuration. Syntax:
Parameters:
  • session-name - Optional name for the session
Options:
  • --template <template> - Use session template
  • --copy-from <session> - Copy from existing session
  • --workspace <path> - Set workspace directory
  • --description <text> - Session description
Examples:
Session Creation Process:
  1. Initialize new session context
  2. Set up workspace environment
  3. Configure AI model preferences
  4. Initialize memory and context
  5. Create session metadata

/sessions

List all available sessions with status and metadata. Syntax:
Options:
  • --active - Show only active sessions
  • --recent - Show recently used sessions
  • --detailed - Show detailed information
  • --json - Output in JSON format
Examples:
Session List Output:

/resume [name]

Resume a previously saved work session. Syntax:
Parameters:
  • session-name - Name of session to resume
Options:
  • --merge - Merge with current session
  • --force - Force resume even if conflicts exist
  • --readonly - Resume in read-only mode
Examples:
Resume Process:
  1. Load session metadata
  2. Restore workspace context
  3. Reload conversation history
  4. Restore AI model settings
  5. Reinitialize tools and agents

/save-session [name]

Save current session state with optional name. Syntax:
Parameters:
  • session-name - Optional name for saved session
Options:
  • --description <text> - Session description
  • --tags <tags> - Session tags (comma-separated)
  • --compress - Compress session data
  • --include-files - Include modified files
Examples:

/delete-session [name]

Delete a saved session permanently. Syntax:
Parameters:
  • session-name - Name of session to delete
Options:
  • --force - Skip confirmation prompt
  • --backup - Create backup before deletion
Examples:

/export-session [name]

Export session data to external format. Syntax:
Parameters:
  • session-name - Session to export (default: current)
Options:
  • --format <format> - Export format (json, zip, tar)
  • --output <file> - Output file path
  • --include-files - Include workspace files
  • --compress - Compress export
Examples:

Advanced Session Management

/work-sessions [action]

Manage work sessions with advanced features. Syntax:
Available Actions:
  • list - List work sessions
  • create - Create new work session
  • switch - Switch between sessions
  • merge - Merge sessions
  • archive - Archive old sessions
Examples:

Session Templates

Create Session Templates:
Predefined Templates: Frontend Development:
Backend Development:
Full-Stack Development:
Data Science:

Session State Management

Context Preservation

Sessions automatically preserve:
  • Conversation history
  • AI model preferences
  • Tool configurations
  • Agent settings
  • Workspace context
  • Memory and recall data
  • File modification history
  • Environment variables

Session Metadata

View Session Information:
Session Metadata Includes:
  • Creation and modification dates
  • Total conversation length
  • AI model usage statistics
  • Tool usage patterns
  • File modification count
  • Memory usage
  • Performance metrics

Session Synchronization

Sync Sessions Across Devices:

Memory and Context Management

Session Memory

Memory Operations:

Context Management

Workspace Context:

Session Collaboration

Shared Sessions

Share Sessions with Team:

Session Permissions

Manage Session Access:

Session Analytics

Usage Statistics

Session Analytics:
Analytics Include:
  • Time spent in sessions
  • AI model usage patterns
  • Tool usage frequency
  • Productivity metrics
  • Error rates
  • Performance trends

Session Insights

Get Session Insights:

Session Backup and Recovery

Automatic Backups

Configure Automatic Backups:

Manual Backups

Create Manual Backups:

Recovery Operations

Session Recovery:

Integration Examples

Development Workflow

Team Collaboration

Project Handoff

Troubleshooting

Common Session Issues

Session Won’t Load:
Memory Issues:
Sync Problems:

Debug Commands

Best Practices

Session Organization

  • Use descriptive session names
  • Add meaningful descriptions and tags
  • Regular cleanup of old sessions
  • Use templates for consistent setup
  • Archive completed projects

Performance

  • Regular session optimization
  • Monitor memory usage
  • Clean up large sessions
  • Use compression for storage
  • Regular backup maintenance

Collaboration

  • Clear session sharing permissions
  • Document shared session purpose
  • Regular sync with team
  • Resolve conflicts promptly
  • Maintain session hygiene

Security

  • Protect sensitive sessions
  • Regular backup verification
  • Secure session sharing
  • Monitor access logs
  • Use appropriate permissions