Skip to main content

Terminal Operations

NikCLI provides comprehensive terminal operations for executing shell commands, managing processes, and integrating with development tools. All commands include AI-powered assistance and enhanced output formatting.

Core Terminal Commands

/run [command]

Execute shell commands with enhanced output and AI assistance. Syntax:
Features:
  • Real-time output streaming
  • Exit code handling
  • Error analysis and suggestions
  • Command history tracking
  • Environment variable support
Examples:
Output Features:
  • Syntax highlighting for command output
  • Error highlighting and suggestions
  • Performance timing
  • Resource usage monitoring
  • Exit code interpretation

/sh [command]

Execute shell commands (alias for /run). Syntax:
Examples:

/bash [command]

Execute commands specifically in bash shell. Syntax:
Features:
  • Forces bash shell execution
  • Bash-specific features support
  • Script execution capabilities
Examples:

Development Tool Integration

/npm [args]

Execute npm commands with enhanced package management features. Syntax:
Features:
  • Package suggestion and analysis
  • Dependency conflict detection
  • Security vulnerability scanning
  • Performance monitoring
  • Cache management
Examples:
Enhanced Features:
  • Automatic package suggestions
  • Dependency tree analysis
  • Bundle size impact analysis
  • License compatibility checking

/yarn [args]

Execute Yarn commands with workspace support. Syntax:
Features:
  • Workspace management
  • Plug’n’Play support
  • Advanced caching
  • Parallel execution
Examples:

/git [args]

Execute Git commands with enhanced status and visualization. Syntax:
Features:
  • Enhanced status display
  • Branch visualization
  • Commit analysis
  • Conflict resolution assistance
  • Performance optimization
Examples:
Enhanced Output:
  • Colorized diff output
  • Branch tree visualization
  • Commit message analysis
  • Merge conflict highlighting

/docker [args]

Execute Docker commands with container management features. Syntax:
Features:
  • Container status monitoring
  • Image analysis
  • Resource usage tracking
  • Security scanning
  • Multi-platform support
Examples:
Enhanced Features:
  • Container health monitoring
  • Resource usage visualization
  • Security vulnerability scanning
  • Multi-architecture build support

Process Management

/ps

Show running processes with enhanced information. Syntax:
Features:
  • Process tree visualization
  • Resource usage monitoring
  • Port usage detection
  • Parent-child relationships
Examples:
Output Format:

/kill [pid]

Terminate processes with safety checks. Syntax:
Parameters:
  • pid - Process ID to terminate
  • signal - Signal to send (default: TERM)
Safety Features:
  • Process ownership verification
  • Critical process protection
  • Confirmation for system processes
  • Graceful shutdown attempts
Examples:

Project Operations

/install [package]

Intelligent package installation with dependency analysis. Syntax:
Features:
  • Package manager detection
  • Dependency analysis
  • Security scanning
  • License checking
  • Alternative suggestions
Examples:
Smart Features:
  • Detects package manager (npm, yarn, pnpm)
  • Suggests related packages
  • Checks for security vulnerabilities
  • Analyzes bundle size impact

/build

Execute project build with optimization and analysis. Syntax:
Features:
  • Build script detection
  • Performance monitoring
  • Bundle analysis
  • Error reporting
  • Optimization suggestions
Examples:
Build Analysis:
  • Bundle size reporting
  • Dependency analysis
  • Performance metrics
  • Optimization suggestions
  • Error categorization

/test [args]

Execute tests with enhanced reporting and analysis. Syntax:
Features:
  • Test framework detection
  • Coverage reporting
  • Performance analysis
  • Failure analysis
  • Continuous monitoring
Examples:
Enhanced Reporting:
  • Visual test results
  • Coverage visualization
  • Performance benchmarks
  • Failure analysis and suggestions
  • Historical comparison

/lint

Execute linting with intelligent error analysis. Syntax:
Features:
  • Multi-linter support
  • Auto-fix capabilities
  • Rule explanation
  • Performance impact analysis
  • Custom rule suggestions
Examples:
Intelligent Features:
  • Rule explanation and documentation
  • Auto-fix suggestions
  • Performance impact analysis
  • Code quality metrics

Advanced Terminal Features

Command History

Enhanced command history with search and analysis:

Environment Management

Manage environment variables and configuration:

Command Aliases

Create and manage command aliases:

Command Completion

Intelligent command completion and suggestions:

Performance Monitoring

Resource Usage

Monitor system resources during command execution:

Benchmarking

Benchmark command performance:

Security Features

Command Validation

Validate commands for security issues:

Sandboxing

Execute commands in sandboxed environments:

Integration Examples

CI/CD Pipeline

Development Workflow

Deployment Workflow

Troubleshooting

Common Issues

Command not found:
Permission denied:
Process hanging:

Debug Commands

Best Practices

Command Safety

  • Always verify commands before execution
  • Use --dry-run flags when available
  • Backup important data before destructive operations
  • Use version control for all changes

Performance

  • Use appropriate command options
  • Monitor resource usage
  • Optimize build and test commands
  • Use caching when available

Security

  • Validate command sources
  • Use sandboxing for untrusted commands
  • Avoid running commands as root
  • Regularly audit command history

Organization

  • Use consistent command patterns
  • Document complex command sequences
  • Create aliases for frequently used commands
  • Maintain clean command history