PkgGuard provides a comprehensive smart terminal experience that integrates security monitoring directly into your development workflow. This guide covers all terminal features introduced in version 0.7.0+.
- Quick Start
- Creating a PkgGuard Terminal
- Security Modes
- Command History
- Autocomplete
- Virtual Environment Support
- Manifest Scanning
- Terminal Commands Reference
- Configuration
- Troubleshooting
# Via VS Code Command Palette
Ctrl+Shift+P → "PkgGuard: Create Terminal"
# Or select from terminal dropdown
Terminal → New Terminal → PkgGuard Smart Terminal# Create and activate virtual environment
create-venv myproject
activate-venv myproject
# Install packages with security monitoring
pip install flask requests
# Scan your project dependencies
scan-manifest- Click the terminal dropdown arrow in VS Code
- Select "PkgGuard Smart Terminal"
- A new secured terminal opens with full features
- Open Command Palette (
Ctrl+Shift+P) - Type "PkgGuard: Create Terminal"
- Press Enter to create a new terminal
PkgGuard registers itself as a terminal profile in VS Code, appearing alongside:
- PowerShell
- Command Prompt
- Git Bash
- WSL terminals
PkgGuard terminal operates in four security modes, visually indicated in the terminal prompt:
- Behavior: Asks for user approval before installing risky packages
- Prompt:
[interactive] C:\path> - Use Case: Recommended for development environments
- Behavior: Shows warnings but allows installation
- Prompt:
[monitor] C:\path> - Use Case: CI/CD environments where blocking isn't desired
- Behavior: Automatically blocks risky packages
- Prompt:
[block] C:\path> - Use Case: High-security environments
- Behavior: No security checks performed
- Prompt:
[disabled] C:\path> - Use Case: Testing or when security checks aren't needed
# Via command palette
Ctrl+Shift+P → "PkgGuard: Toggle Security Mode"
# Mode changes are immediately reflected in terminal promptNavigate through your command history using arrow keys, just like standard terminals:
- Up Arrow (↑): Previous command
- Down Arrow (↓): Next command
- Storage: 100 commands maximum
- Duplicate Prevention: Identical consecutive commands aren't stored
- Session Persistence: History persists across terminal sessions
# Type a command
pip install requests
# Later, press ↑ to recall
pip install requests # ← Recalled from history
# Navigate through multiple commands
↑ ↑ ↑ # Go back 3 commands
↓ # Go forward 1 commandPress Tab for intelligent command completion:
- PkgGuard Commands:
create-venv,activate-venv,list-venvs, etc. - PowerShell:
Get-Process,Set-Location,New-Item, etc. - Python:
python,pip,pip3, etc. - Node.js:
npm,yarn,node, etc. - Git:
git add,git commit,git push, etc.
- Directories: Tab completion for folder navigation
- Files: Complete file names in current directory
- Paths: Both relative and absolute path completion
# Command completion
cr[Tab] → create-venv
act[Tab] → activate-venv
# File completion
cd src/[Tab] → cd src/adapters/
python scr[Tab] → python script.py
# Multiple matches cycle through
git [Tab] → git add
git [Tab] → git commit
git [Tab] → git pushPkgGuard provides comprehensive Python virtual environment management:
# Create in workspace root
create-venv myproject
# Creates: ./myproject/ directory with Python virtual environment# Activate workspace virtual environment
activate-venv myproject
# Activate with absolute path
activate-venv C:\path\to\venv
# Activate with relative path
activate-venv ../other-project/venv# List all available virtual environments
list-venvs
# Output:
# Available Virtual Environments:
# - myproject (./myproject)
# - api-server (./api-server)
# - frontend (./frontend)# Deactivate current environment
deactivate-venv
# Terminal prompt updates to show deactivationWhen you activate a virtual environment:
- Python Interpreter: Automatically updates VS Code's Python interpreter
- Terminal Prompt: Shows active environment:
(.venv) [interactive] C:\path> - Pip Integration:
pipcommands automatically use the active environment
PkgGuard automatically detects common virtual environment patterns:
.venvvenvenvvirtualenv
Analyze your project's dependencies for security risks:
# Scan requirements.txt and package.json
scan-manifest
# Example output:
# 📋 Manifest Analysis Report
#
# requirements.txt:
# ✅ flask (2.3.3) - High Trust (Score: 92)
# ⚠️ some-package (1.0.0) - Medium Trust (Score: 65)
# 🔴 suspicious-lib (0.1.0) - Low Trust (Score: 25)# Install dependencies with security checks
install-manifest
# Processes requirements.txt and applies security policies
# based on current security mode- Python:
requirements.txt,requirements-dev.txt,setup.py,pyproject.toml - JavaScript:
package.json,package-lock.json,yarn.lock
| Command | Description | Example |
|---|---|---|
create-venv [name] |
Create new virtual environment | create-venv myproject |
activate-venv [name/path] |
Activate virtual environment | activate-venv myproject |
deactivate-venv |
Deactivate current environment | deactivate-venv |
list-venvs |
List available environments | list-venvs |
| Command | Description | Example |
|---|---|---|
scan-manifest |
Scan project dependencies | scan-manifest |
install-manifest |
Install with security filtering | install-manifest |
| Command | Description | Example |
|---|---|---|
help or ? |
Show available commands | help |
clear or cls |
Clear terminal screen | clear |
All standard terminal commands work as expected:
cd,ls,dir,mkdir,rmdirpython,pip,pip3npm,yarn,nodegitcommands- PowerShell cmdlets
Configure PkgGuard terminal behavior in VS Code settings:
{
"pkgGuard.terminal.enabled": true,
"pkgGuard.securityMode": "interactive",
"pkgGuard.cacheTTL": 172800
}"interactive"- Ask for approval (default)"monitor"- Show warnings only"block"- Block risky packages"disabled"- No security checks
pkgGuard.cacheTTL: Cache time-to-live in seconds (default: 48 hours)
Problem: Python paths with spaces cause command failures Solution: Use paths without spaces or escape properly
# Good
activate-venv myproject
# Avoid
activate-venv "my project" # May cause issuesProblem: Completion might show residual indicators Solution: Press Tab again to cycle through or Enter to accept
# If you see: git add (1/2)
# Press Tab again or Enter to acceptProblem: Toggle messages don't auto-dismiss Solution: Messages are informational only and don't affect functionality
# Show all available commands
help
# or
?Ctrl+Shift+P → "PkgGuard: Create Terminal"
Ctrl+Shift+P → "PkgGuard: Toggle Security Mode"Open VS Code settings and search for "pkgGuard" to configure terminal behavior.
- Use Virtual Environments: Isolate project dependencies
- Scan Before Installing: Use
scan-manifestto preview security issues - Leverage Autocomplete: Press Tab to speed up command entry
- Use History: Arrow keys for command recall
# Set monitor mode for CI environments
# In VS Code settings or via command palette
"pkgGuard.securityMode": "monitor"
# Scan dependencies in CI pipeline
scan-manifest# Development workflow
create-venv project-name
activate-venv project-name
scan-manifest
install-manifest
# ... development work ...
deactivate-venv# Quick project switching
list-venvs
activate-venv project-a
# ... work on project-a ...
activate-venv project-b
# ... work on project-b ...PkgGuard's terminal integration provides a comprehensive, secure development environment that:
- Protects your development workflow with real-time security monitoring
- Enhances productivity with autocomplete and command history
- Simplifies virtual environment management
- Integrates seamlessly with VS Code's terminal ecosystem
The terminal features work alongside PkgGuard's editor-based security analysis to provide complete protection from malicious packages throughout your development process.
For more information, see the main README or CLAUDE.md files.