Skip to main content

Overview

The FastSkill CLI provides a comprehensive command-line interface for managing skills, running the service, and performing administrative tasks. It’s designed for both development workflows and production operations.
The CLI supports both interactive and scripting use cases, with comprehensive help text and validation for all commands.

Installation

The FastSkill CLI is included with the Python package:
pip install fastskill

# Verify installation
fastskill --version
For development installations:
# From source
cd python
pip install -e .
fastskill --version

Basic Usage

Get Help

1

General help

fastskill --help
This shows all available commands and global options.
2

Command-specific help

fastskill serve --help        # Help for serve command
fastskill register --help     # Help for register command
fastskill list --help         # Help for list command
3

Interactive help

fastskill --interactive       # Interactive mode with guided setup

Global Options

OptionDescriptionExample
--versionShow version informationfastskill --version
--verbose, -vEnable verbose outputfastskill -v list
--quiet, -qSuppress non-error outputfastskill -q register skill.json
--configSpecify configuration filefastskill --config prod.json serve
--log-levelSet logging levelfastskill --log-level DEBUG serve
--help, -hShow help informationfastskill --help

Command Categories

Service Management

Commands for managing the FastSkill service lifecycle:

fastskill init

Initialize a new FastSkill service with default configuration.

fastskill serve

Start the FastSkill service in server mode.

fastskill stop

Stop a running FastSkill service.

fastskill status

Check the status of a running FastSkill service.

fastskill restart

Restart the FastSkill service.

fastskill logs

View service logs and debugging information.

Skill Management

Commands for managing skills and their lifecycle:

fastskill register

Register new skills from files or directories.

fastskill list

List all registered skills with filtering options.

fastskill validate

Validate skill definitions without registering them.

fastskill update

Update existing skill definitions.

fastskill enable/disable

Enable or disable skills.

fastskill remove

Remove skills from the service.
Commands for finding and analyzing skills:

fastskill search

Search for skills using natural language queries.

fastskill find

Find skills by capabilities, tags, or other criteria.

fastskill route

Get intelligent routing recommendations.

fastskill analyze

Analyze skill usage patterns and performance.

Development Tools

Commands for development workflows:

fastskill test

Run tests for skills and integrations.

fastskill bench

Benchmark skill performance and throughput.

fastskill profile

Profile skill execution for optimization.

fastskill debug

Debug skill execution and troubleshoot issues.

Configuration

Configuration Files

The CLI supports configuration files for common settings:
{
  "service": {
    "host": "0.0.0.0",
    "port": 8080,
    "log_level": "INFO",
    "skill_storage_path": "./skills"
  },
  "execution": {
    "timeout": 30,
    "max_memory_mb": 512,
    "enable_networking": false
  },
  "development": {
    "hot_reload": true,
    "debug_mode": false,
    "verbose_errors": true
  }
}

Environment Variables

Common CLI settings can be configured via environment variables:
export FASTSKILL_LOG_LEVEL=DEBUG
export FASTSKILL_CONFIG_FILE=config.json
export FASTSKILL_STORAGE_PATH=./skills
export FASTSKILL_EXECUTION_TIMEOUT=60

# Then run commands
fastskill serve

Interactive Mode

The CLI supports interactive mode for guided workflows:
# Start interactive mode
fastskill --interactive

# Or use the short form
fastskill -i
Interactive mode provides:
  • Step-by-step guided setup
  • Interactive configuration
  • Real-time validation
  • Helpful suggestions and tips

Scripting and Automation

The CLI is designed for scripting and CI/CD integration:

Batch Operations

# Register multiple skills
fastskill register ./skills/**/*.json

# Process multiple operations
fastskill register ./new-skills/ && \
fastskill validate ./all-skills/ && \
fastskill enable $(fastskill list --format=ids)

JSON Output

# Get machine-readable output
fastskill list --format=json > skills.json
fastskill status --format=json > status.json

# Use in scripts
skills=$(fastskill list --format=json --quiet)
count=$(echo $skills | jq '.total_count')
echo "Total skills: $count"

Exit Codes

The CLI returns appropriate exit codes for scripting:
CodeMeaningExample
0SuccessCommand completed successfully
1General errorInvalid arguments or configuration
2Validation errorInvalid skill definition
3Network errorCannot connect to service
4Timeout errorCommand timed out
5Permission errorInsufficient permissions
#!/bin/bash
# Example script with error handling

fastskill status
if [ $? -ne 0 ]; then
    echo "Service not running, starting..."
    fastskill serve --daemon
fi

# Register skills if service is ready
fastskill register ./new-skills/
if [ $? -eq 0 ]; then
    echo "Skills registered successfully"
else
    echo "Failed to register skills"
    exit 1
fi

Examples

Development Workflow

# 1. Initialize service
fastskill init --hot-reload

# 2. Register skills
fastskill register ./skills/

# 3. Start development server
fastskill serve --debug

# 4. Test skills
fastskill search "text processing"
fastskill find --capability text_extraction

# 5. Monitor in another terminal
fastskill logs --follow
fastskill status --watch

Production Deployment

# 1. Validate configuration
fastskill validate-config production.json

# 2. Register production skills
fastskill register --validate ./prod-skills/

# 3. Start service with production config
fastskill serve --config production.json --daemon

# 4. Verify deployment
fastskill status
fastskill list --enabled-only

# 5. Monitor operations
fastskill logs --since 1h
fastskill analyze --metrics

CI/CD Integration

# .github/workflows/test.yml
name: FastSkill CI
on: [push, pull_request]

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2

    - name: Install FastSkill
      run: pip install fastskill

    - name: Validate skills
      run: fastskill validate ./skills/

    - name: Run tests
      run: fastskill test --coverage

    - name: Integration tests
      run: fastskill test --integration

  deploy:
    needs: test
    runs-on: ubuntu-latest
    if: github.ref == 'refs/heads/main'

    steps:
    - uses: actions/checkout@v2

    - name: Deploy skills
      run: |
        fastskill register ./skills/ --validate
        fastskill serve --config prod.json --daemon

Global Configuration

Default Configuration Locations

The CLI looks for configuration in this order:
  1. --config option
  2. FASTSKILL_CONFIG_FILE environment variable
  3. ./fastskill.json
  4. ./fastskill.yaml
  5. ~/.fastskill/config.json
  6. Built-in defaults

Configuration Migration

Migrate between configuration formats:
# Convert YAML to JSON
fastskill config convert input.yaml output.json

# Validate configuration
fastskill config validate config.json

# Show current configuration
fastskill config show

# Merge configurations
fastskill config merge base.json override.json > final.json

Troubleshooting

Common Issues

Path issue: Ensure FastSkill is installed and in your PATH.
# Check installation
pip list | grep fastskill

# Check PATH
which fastskill

# Add to PATH if needed
export PATH=$PATH:~/.local/bin
File permissions: Ensure you have read/write permissions for skill directories.
# Fix permissions
chmod 755 ./skills/
chmod 644 ./skills/*.json
Service permissions: Use --user flag or run with appropriate privileges for system-wide operations.
Port conflicts: Check if the default port (8080) is available.
# Check port usage
netstat -tlnp | grep :8080

# Use different port
fastskill serve --port 9000

Debug Mode

Enable debug mode for detailed troubleshooting:
# Enable debug logging
fastskill --log-level DEBUG serve

# Run with verbose output
fastskill -v register skill.json

# Show detailed error information
fastskill --debug validate skill.json

# Create debug snapshot
fastskill debug snapshot > debug-info.json

Performance Monitoring

Monitor CLI performance:
# Time command execution
time fastskill list

# Profile command performance
fastskill profile --command "fastskill search 'text processing'"

# Show performance metrics
fastskill status --metrics

Best Practices

1

Use configuration files

Store common settings in configuration files rather than command-line arguments for complex deployments.
2

Validate before deploying

Always use --validate flag when registering skills in production environments.
3

Use batch operations

Use batch operations for multiple skills to improve performance and reduce network overhead.
4

Monitor service health

Regularly check service status and logs to ensure optimal operation.
5

Backup before major changes

Create backups of skill definitions before making bulk changes or updates.
The CLI provides powerful operations that can modify your skill ecosystem. Always test in a development environment before applying changes to production.