SII CLI VSCode Companion
A VSCode extension that provides comprehensive IDE environment awareness for CLI tools, featuring complete command execution tracking and file change monitoring.
Core Features
📋 Command History Tracking
- Real-time Command Recording: Captures all CLI tool invocations with execution status
- Multi-Session Support: Handles concurrent CLI sessions with independent operation tracking
- Execution Lifecycle Monitoring: Tracks complete tool call lifecycle (awaiting approval, executing, completed, failed)
- Session Management: Organizes command history by session, with access to closed session history
📄 File Change Monitoring
- Precise Change Tracking: Records all file system modifications made by CLI tools
- Operation Attribution: Links file changes to specific commands that caused them
- Integrated Diff Viewer: Quick access to VSCode's built-in diff view for before/after comparison
- Modification Timeline: Complete file change history with chronological browsing
🔗 IDE Environment Integration
- Auto-Discovery: CLI automatically detects and connects to VSCode environment
- Port Communication: Seamless CLI-IDE communication via
.sii/ide-port discovery
- Session Synchronization: Real-time synchronization of CLI session states with IDE
- Workspace Awareness: Automatic project root and working directory detection
Interface Components
Session Management Panel
- Multi-Session View: Display all CLI sessions (active/closed) with status indicators
- Quick Session Switching: One-click switching between different session views
- Session Statistics: Clear visibility into session activity and command counts
Command History Panel
- Operation Timeline: Chronological display of all command executions
- Status Visualization: Distinct icons for different command execution states
- Session Filtering: Filter command history by specific sessions
File Changes Panel
- Change Inventory: Real-time display of all file system modifications
- Command Attribution: Shows which specific command caused each file change
- Quick Diff Access: Right-click to open file comparison views
Powered by advanced tools from Deep Cognition - your cognitive partner for cutting-edge development workflows.
Installation & Usage
Requirements
- VS Code version 1.101.0 or newer
- No separate SII CLI installation is required. The extension bundles the CLI runtime per-platform and can launch it directly.
Quick Start
- Install the extension from VS Code Marketplace
- Run “SII Cli: Run” to start the bundled CLI in the integrated terminal
- Start using CLI tools - all operations are automatically tracked in the side panels
Build & Publish (Multi-Target VSIX)
From the repo root:
# Build per-platform VSIX files (win32-x64, linux-x64, darwin-x64, darwin-arm64)
npm run build:vscode:targets
# Publish all targets (requires Marketplace PAT for the publisher)
npm run publish:vscode:targets
Artifacts are written to bundle/ as:
sii-cli-vscode-ide-companion-<version>-<target>.vsix
Authentication (Marketplace publisher: gair-nlp):
# VS Code Extension PAT for gair-nlp
export VSCE_PAT=...
# Or interactive login
vsce login gair-nlp
Key Commands
- View Command History: Browse all CLI tool executions by session
- Monitor File Changes: Track file modifications with diff comparison
- Session Management: Switch between multiple concurrent CLI sessions
- Export History: Save operation logs for analysis and review
When working in VS Code Remote/SSH, dragging folders into the integrated terminal may not paste a path. This extension provides commands to insert paths/snippets into the SII CLI input.
- SII Cli: Insert to Terminal (@Path/Selection): Inserts selection as a folded paste (expanded content starts with
@file:line-line); otherwise inserts @<path> for the current file, or the selected file/folder in Explorer.
- SII Cli: Insert @Path to Terminal: Legacy command kept for compatibility (hidden from menus); use “Insert to Terminal (@Path/Selection)” instead.
- SII Cli: Insert Selection as Folded Paste: Inserts the current editor selection as a folded paste block.
- Optional shortcut: Enable
siiCli.inputInsertion.enableCtrlL to bind Ctrl+L to “Insert to Terminal (@Path/Selection)”. The extension prompts once on first run.
- Works in the editor (selection → snippet; no selection → current file).
- Works in Explorer when it has focus (uses the selected file/folder path).
Note: In VS Code Remote/SSH, Explorer items typically use the vscode-remote URI scheme; the Explorer context menu commands work for both local (file) and remote (vscode-remote) resources.
Tip: The insertion commands use terminal paste to ensure SII CLI receives the content even when focus changes (e.g. when triggering commands from the editor/Explorer).
About Deep Cognition
This extension leverages advanced tools from Deep Cognition, a cognitive computing platform designed to enhance developer workflows with cutting-edge AI capabilities. Deep Cognition serves as your intelligent development partner, providing sophisticated tools and insights to accelerate your coding journey.