Workspace - Command-Line Tool Suite

Workspace is a tool suite for file operations, version management, and development workflow automation. Includes refac (string replacement), scrap (local trash folder), unscrap (file restoration), and state (automatic versioning).

View on GitHub

Workspace

Multi-tool CLI suite with real-time project dashboard and entity-driven management system. All tools accessible through a single wsb binary.

Build Status: Clean compilation with structured logging

Core Capabilities

Multi-Tool Foundation

Refactor: Recursive string replacement with collision detection

wsb refactor ./src "OldClassName" "NewClassName" --verbose
wsb refactor ./src "OldApi" "NewApi" --backup --include "*.rs"

Scrap/Unscrap: Local trash system with metadata tracking

wsb scrap experimental_feature/ temp_logs/ *.bak
wsb scrap list --sort date
wsb unscrap important.rs

Version Management: Git-based semantic versioning with template integration

wsb git install
wsb update --git-add

Ldiff: Line difference visualization for pattern analysis

tail -f /var/log/system.log | wsb ldiff

Version Stamping with Wstemplate

Wstemplate: Cross-project version stamping using .wstemplate files

wsb wstemplate add /path/to/workspace     # Set scan root for this project
wsb wstemplate list                        # Show relevant templates
wsb wstemplate render                      # Render all relevant templates

Templates use Tera syntax with automatic cross-project version resolution:

version = ""
dependency = ""

Each project has a single wstemplate entry (alias + scan root). Cross-project references like `` are resolved dynamically by scanning for sibling .wsb/state.json files.

Web Server Integration

Serve: API endpoints for Claude integration

wsb                           # Start on localhost:3000
wsb serve --port 8080         # Custom port

Entity-Driven Management: Core entity types with relationship tracking

Database-Driven Project Management

SQLite Backend: Entity management with relationship tracking

wsb status --include-features
wsb feature add "New capability"
wsb task add "Implement feature" --feature F00001

Template System: Tera-based file generation with version integration

wsb template add version-header --template "v" --output version.h

Version Management: Database-driven major version with git-calculated components

wsb version show              # Display current version breakdown
wsb version major 2           # Set major version to 2
wsb version tag               # Create git tag with current version

All Commands

Command Description
wsb refactor Recursive string replacement in files and directories
wsb git Git integration (install/uninstall hooks, show version, status)
wsb template Tera template management (add, list, show, update, delete, render)
wsb update Update version file and render all templates
wsb wstemplate Manage .wstemplate cross-project version stamping
wsb version Version management (show, major, tag, info)
wsb scrap Local trash can with .scrap folder
wsb unscrap Restore files from .scrap folder
wsb ldiff Line difference visualization for pattern analysis
wsb code AST-based code analysis and transformation
wsb test Intelligent test runner based on project type
wsb status Project status with feature metrics and progress
wsb feature Feature management with state machine workflow
wsb task Feature-centric task management
wsb directive Project directive and rule management
wsb note Note management for any entity
wsb relationship Entity relationship management
wsb start Start development session with context loading
wsb end End development session with documentation
wsb continuity Session continuity and context management
wsb consolidate Documentation consolidation with diagrams
wsb database Database backup, recovery, and maintenance
wsb serve Web server for Claude AI integration
wsb sample Create sample project with test data

Installation

git clone https://github.com/jowharshamshiri/wsb.git
cd workspace
./install.sh

Verification:

wsb --version
wsb --help

Usage Examples

Multi-Tool Operations

# File refactoring with safety checks
wsb refactor ./src "old_name" "new_name" --backup

# Safe file disposal and recovery
wsb scrap temp_files/ experimental/
wsb unscrap important_config.toml

# Version management with git integration
wsb git install
wsb update --git-add

Project Management

# Entity management
wsb feature add "User authentication"
wsb task add "Implement login" --feature F00001
wsb status --include-features

Cross-Project Version Stamping

# Set up wstemplate for a project
wsb wstemplate add /path/to/workspace

# Render templates (happens automatically on wsb update)
wsb wstemplate render

Documentation

Guides:

Tool-Specific: