Skip to content

CLI Commands

Fast Craftsmanship CLI provides a set of commands designed to help you maintain high-quality code and follow best practices in your development workflow.

Available Commands

Verification Commands

  • verify: Run code quality checks including type checking, linting, testing, and formatting
  • Type checking with mypy
  • Linting with flake8
  • Testing with pytest
  • Format checking with black

Architecture Commands

  • api: Generate and manage API endpoints
  • domain: Work with domain models and business logic
  • service: Manage service layer components
  • repo: Handle data access and repository patterns

Project Commands

  • project: Initialize and manage project structure
  • docs: Generate and maintain documentation
  • test: Create and run tests

Command Design Principles

All commands in Fast Craftsmanship follow these core principles:

  1. Functional Programming
  2. Pure functions with explicit error types
  3. Railway-oriented programming using Result types
  4. Immutable data structures

  5. Type Safety

  6. Static type checking with mypy
  7. Tagged unions for error handling
  8. Generic types for flexible, type-safe operations

  9. User Experience

  10. Clear, consistent error messages
  11. Rich terminal output
  12. Progress indicators for long-running operations

  13. Error Handling

  14. Structured error types
  15. Graceful error recovery
  16. Detailed error reporting

Common Features

Every command shares these common features:

  • Result-based error handling: All operations return Result[T, Error]
  • Rich UI: Consistent terminal output using the UI utilities
  • Validation: Input validation and error checking
  • Documentation: Detailed help and usage information

Usage Examples

Running Verifications

# Run all verifications
fcship verify

# Run specific verification
fcship verify type

Working with Projects

# Initialize a new project
fcship project init

# Generate documentation
fcship docs generate

See Also