This document lists all available build commands, npm scripts, and shell scripts in the Claudeware repository.
All npm scripts can be run with npm run <script-name>:
| Command | Description | Usage |
|---|---|---|
build |
Compile TypeScript to JavaScript | npm run build |
dev |
Run in development mode with auto-reload | npm run dev |
typecheck |
Type-check TypeScript without emitting | npm run typecheck |
lint |
Run ESLint on TypeScript files | npm run lint |
| Command | Description | Usage |
|---|---|---|
test |
Run all unit tests | npm test |
test:watch |
Run tests in watch mode | npm run test:watch |
test:coverage |
Run tests with coverage report | npm run test:coverage |
test:integration |
Run integration tests only | npm run test:integration |
test:manual |
Run manual quick test | npm run test:manual |
| Command | Description | Usage |
|---|---|---|
benchmark |
Run performance benchmarks | npm run benchmark |
link |
Link package globally for testing | npm run link |
unlink |
Remove global link | npm run unlink |
Executable shell scripts in the repository:
Basic testing script for Claudeware functionality.
./test-wrapper.shWhat it does:
- Tests help command
- Tests version command
- Tests wrapper mechanics with echo
- Runs manual quick test
Runs unit tests with formatted output showing test results.
./run-unit-tests.shWhat it does:
- Checks for TypeScript test files
- Runs specific test suites (JSON Parser, Event Bus, Plugin Loader)
- Shows comprehensive test summary with pass/fail statistics
JavaScript test script demonstrating wrapper concepts.
./simple-test.jsWhat it does:
- Tests component functionality
- Demonstrates SDK integration
- Shows zero-latency stream passthrough concept
For a complete build from source:
# 1. Install dependencies
npm install
# 2. Build TypeScript files
npm run build
# 3. Run tests to verify
npm test
# 4. Link globally (optional)
npm run link# Terminal 1: Run in dev mode with auto-reload
npm run dev
# Terminal 2: Run tests in watch mode
npm run test:watch# 1. Type check
npm run typecheck
# 2. Lint
npm run lint
# 3. Run all tests
npm test
# 4. Build
npm run buildKey environment variables used by scripts:
| Variable | Description | Default |
|---|---|---|
CLAUDE_WRAPPER_TEST_MODE |
Enable test mode | false |
CLAUDE_WRAPPER_LOG_LEVEL |
Logging level | info |
CLAUDE_WRAPPER_PLUGINS_DIR |
Plugin directory | ~/.claude-code/plugins |
CLAUDE_WRAPPER_DB_PATH |
Database path | ~/.claude-code/queries.db |
git clone https://github.com/instantlyeasy/claudeware.git
cd claudeware
npm install
npm run build# Run the complete build script
./build-local.shThis script handles everything: dependencies, TypeScript compilation, testing, and global linking.
# All tests
npm test
# Specific component
npm test -- --testNamePattern="JsonStreamParser"
# With coverage
npm run test:coverage# Build and link for testing
npm run build && npm run link
# Test the wrapper
claudeware --version
claudeware "What is 2+2?"
# Unlink when done
npm run unlink# Enable debug logging
export CLAUDE_WRAPPER_LOG_LEVEL=debug
# Run with test mode
CLAUDE_WRAPPER_TEST_MODE=true node src/cli.js echo "test"- NPM scripts: Defined in
/package.json - Shell scripts: Located in root directory
- Test scripts: In
/test/manual/directory - TypeScript source: In
/src/directory - Built JavaScript: In
/dist/directory (after build)
- The project uses TypeScript but has JavaScript entry points (
cli.js,wrapper.js,sdk.js) - Always run
npm run buildafter making TypeScript changes - Some tests may show timer warnings with Jest - these are test framework issues, not production issues
- The wrapper is designed to work without Claude Code installed (using test mode)
- See
KNOWN-ISSUES.mdfor documented issues and workarounds
Expected test results:
- Total Tests: 182
- Passing: 173 (95%)
- Failing: 9 (timer-related Jest issues only)
The failing tests are all in batch-queue.test.ts and are due to Jest's fake timer limitations. The component works correctly in production.