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:
session-name- Optional name for the session
--template <template>- Use session template--copy-from <session>- Copy from existing session--workspace <path>- Set workspace directory--description <text>- Session description
- Initialize new session context
- Set up workspace environment
- Configure AI model preferences
- Initialize memory and context
- Create session metadata
/sessions
List all available sessions with status and metadata.
Syntax:
--active- Show only active sessions--recent- Show recently used sessions--detailed- Show detailed information--json- Output in JSON format
/resume [name]
Resume a previously saved work session.
Syntax:
session-name- Name of session to resume
--merge- Merge with current session--force- Force resume even if conflicts exist--readonly- Resume in read-only mode
- Load session metadata
- Restore workspace context
- Reload conversation history
- Restore AI model settings
- Reinitialize tools and agents
/save-session [name]
Save current session state with optional name.
Syntax:
session-name- Optional name for saved session
--description <text>- Session description--tags <tags>- Session tags (comma-separated)--compress- Compress session data--include-files- Include modified files
/delete-session [name]
Delete a saved session permanently.
Syntax:
session-name- Name of session to delete
--force- Skip confirmation prompt--backup- Create backup before deletion
/export-session [name]
Export session data to external format.
Syntax:
session-name- Session to export (default: current)
--format <format>- Export format (json, zip, tar)--output <file>- Output file path--include-files- Include workspace files--compress- Compress export
Advanced Session Management
/work-sessions [action]
Manage work sessions with advanced features.
Syntax:
list- List work sessionscreate- Create new work sessionswitch- Switch between sessionsmerge- Merge sessionsarchive- Archive old sessions
Session Templates
Create Session Templates: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:- 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:- 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: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