Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ tests/config*.json
.cursorrules
.history
.windsurf
performance-results.json

# VS Code
.vscode/
Expand Down
242 changes: 0 additions & 242 deletions DOCUMENTATION_INDEX.md

This file was deleted.

84 changes: 76 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ This enhanced version includes advanced configuration management, improved secur
## Features

- **Multi-Shell Support**: Execute commands in PowerShell, Command Prompt (CMD), Git Bash, Bash, and WSL
- **Modular Architecture**: Build only the shells you need for smaller bundle sizes (30-65% reduction)
- **Inheritance-Based Configuration**: Global defaults with shell-specific overrides
- **Shell-Specific Validation**: Each shell can have its own security settings and path formats
- **Flexible Path Management**: Different shells support different path formats (Windows/Unix/Mixed)
Expand All @@ -78,6 +79,73 @@ See the [API](#api) section for more details on the tools and resources the serv

**Note**: The server will only allow operations within configured directories, with allowed commands.

## Modular Shell Architecture

WCLI0 now supports a modular architecture that allows you to build specialized versions containing only the shells you need. This results in significantly smaller bundle sizes and faster startup times.

### Build Options

Choose from several pre-configured builds:

```bash
# Full build (all shells) - default
npm run build

# Windows-only shells (PowerShell, CMD, Git Bash)
npm run build:windows

# Git Bash only (smallest Windows build)
npm run build:gitbash

# CMD only
npm run build:cmd

# Unix/Linux only (Bash)
npm run build:unix

# Custom combination
INCLUDED_SHELLS=gitbash,powershell npm run build:custom
```

### Bundle Size Comparison

| Build | Size Reduction | Shells Included |
|-------|---------------|-----------------|
| Full | Baseline | All 5 shells |
| Windows | ~40% smaller | PowerShell, CMD, Git Bash |
| Git Bash Only | ~60% smaller | Git Bash |
| CMD Only | ~65% smaller | CMD |
| Unix | ~60% smaller | Bash |

### Documentation

For detailed information about the modular architecture:

- **[Architecture Overview](docs/tasks/modular_shells/ARCHITECTURE.md)** - System design and module structure
- **[User Guide](docs/tasks/modular_shells/USER_GUIDE.md)** - How to build and use specialized versions
- **[API Documentation](docs/tasks/modular_shells/API.md)** - Complete API reference for shell plugins
- **[Migration Guide](docs/tasks/modular_shells/MIGRATION_GUIDE.md)** - Upgrading from previous versions
- **[Testing Guide](docs/tasks/modular_shells/TESTING_GUIDE.md)** - Testing strategies for modular shells

### Quick Start with Specialized Builds

If you only need Git Bash:

```bash
# Build
npm run build:gitbash

# Use in Claude Desktop config
{
"mcpServers": {
"windows-cli": {
"command": "node",
"args": ["/path/to/wcli0/dist/index.gitbash-only.js"]
}
}
}
```

## Log Management

wcli0 automatically stores command execution logs and provides MCP resources for querying historical output with advanced filtering capabilities.
Expand Down Expand Up @@ -174,7 +242,7 @@ To get started with configuration:
```bash
# Copy and customize a sample
cp config.examples/config.sample.json my-config.json

# Or generate a default config
npx wcli0 --init-config ./my-config.json
```
Expand Down Expand Up @@ -397,13 +465,13 @@ Global settings provide defaults that apply to all shells unless overridden.
"security": {
// Maximum allowed length for any command
"maxCommandLength": 2000,

// Command execution timeout in seconds
"commandTimeout": 30,

// Enable protection against command injection
"enableInjectionProtection": true,

// Restrict commands to allowed working directories
"restrictWorkingDirectory": true
}
Expand All @@ -419,10 +487,10 @@ Global settings provide defaults that apply to all shells unless overridden.
"restrictions": {
// Commands to block - blocks both direct use and full paths
"blockedCommands": ["rm", "format", "shutdown"],

// Arguments to block across all commands
"blockedArguments": ["--exec", "-e", "/c"],

// Operators to block in commands
"blockedOperators": ["&", "|", ";", "`"]
}
Expand All @@ -438,10 +506,10 @@ Global settings provide defaults that apply to all shells unless overridden.
"paths": {
// Directories where commands can be executed
"allowedPaths": ["/home/user", "/tmp", "C:\\Users\\username"],

// Initial working directory (null = use launch directory)
"initialDir": "/home/user",

// Whether to restrict working directories
"restrictWorkingDirectory": true
}
Expand Down
Loading