Blast is a powerful CLI utility tool for managing Catalyst web applications. It streamlines development workflow with code generation, asset management, and project automation. The Catalyst framework follows a "suckless" philosophy, emphasizing simplicity, modularity, and performance.
- π Create new projects with
blast new [project_name]
- π§© Scaffold controllers, models, and views
- π οΈ Interactive dashboard mode for project management
- π Comprehensive configuration management
- πͺ Post-generation hooks for custom scripts and automation
- π Generate schemas from existing databases
- π Interactive migration creation and management
- ποΈ Model generation with consistent CRUD methods
- π§ͺ Struct generation (NewStruct insertable types)
- ποΈ Database seeding with support for specific seed files
- π¦ Asset management with git source repositories and CDN fallbacks
- π Locale/internationalization system
- π SCSS transpiling with automatic minification
- π± Responsive design helpers
- π Consistent asset organization in css/js/fonts folders
- π§© Simplified importing with .min.css/.min.js convention
- π¨ Customizable theming with direct access to Materialize SCSS source
- π Interactive TUI for managing scheduled tasks
- π Status tracking with last and next run times
- π Dedicated logging for cronjob execution
- π Toggle jobs active/inactive without removing them
- π Live table view with auto-refresh
- πββοΈ Development server with multiple run modes
- π Watch mode for auto-restarting on code changes
- π Code generation utilities
- π Editor integration
- π Git workflow support
- π¦ Cargo dependency management with crates.io search
# Clone the repository
git clone https://github.com/Arete-Innovations/blast
cd blast
# Install the blast binary
./install_blast.sh
Make sure ~/.local/bin
is in your PATH.
Blast uses remote Git repositories for templates instead of embedding them in the binary. When you create a new project, Blast will:
-
Clone the template from one of the following repositories (with automatic fallback):
-
Configure the cloned template with your project name
-
Initialize it as a new Git repository
This approach allows for more flexibility and easier template updates without requiring a new Blast release.
# Create a new project
blast new my_project
# Use development branch (latest features)
blast new my_project --dev
# Change to the project directory
cd my_project
# Initialize project (migrations, seeds, assets, code generation)
blast init
# Start the interactive dashboard (default when run without arguments)
blast
# Explicitly start the dashboard
blast dashboard
# Run the interactive CLI
blast cli
# Toggle between development and production
blast env toggle
# Generate a model from database
blast gen models
# Generate structs for models
blast gen structs
# Create a migration
blast migration
# Add a dependency with crates.io search
blast cargo add serde
# Remove dependencies interactively
blast cargo remove
# Transpile SCSS to CSS
blast scss
# Minify CSS files
blast css
# Publish CSS to public directory
blast publish-css
# Process JS files
blast js
# Download assets (git repo cloning for Materialize, CDN for others)
blast cdn
# Start the development server
blast run
# Or
blast serve
# Start with production settings
blast run-prod
# Or
blast serve-prod
# Stop a running server
blast stop
# Watch mode - auto-restart on code changes
blast watch
# Truncate all logs
blast log truncate
# Truncate specific log
blast log truncate server.log
# Launch interactive TUI cronjob manager
blast cronjobs
# List all scheduled jobs
blast cronjobs list
# Add a new cronjob (name, interval in seconds)
blast cronjobs add job_name 300
# Toggle a job's active status
blast cronjobs toggle 1
# Remove a scheduled job
blast cronjobs remove 1
# Display live auto-refreshing table
blast cronjobs table
Sparks are modular plugins that can be added to your Catalyst application:
# Add a spark plugin from a git repository
blast spark add https://github.com/user/repo
Sparks can also be defined in your Catalyst.toml configuration:
[sparks]
auth = "https://github.com/catalyst-framework/auth"
plznohac = "https://github.com/catalyst-framework/plznohac"
When you create a new Catalyst project with Blast, it follows a clear separation between generated and custom code:
my_project/
βββ Cargo.toml # Rust project dependencies
βββ Catalyst.toml # Framework configuration
βββ Rocket.toml # Web server configuration
βββ diesel.toml # ORM configuration
βββ public/ # Public web assets
β βββ css/ # Compiled/minified CSS
β β βββ app/
β βββ fonts/ # Font resources
β β βββ fontawesome/
β β βββ material-icons/
β βββ js/ # Compiled/minified JS
β βββ app/
β βββ htmx/
β βββ materialize/
βββ src/
β βββ assets/ # Frontend source assets
β β βββ css/ # CSS source files
β β βββ js/ # JavaScript source files
β β βββ locale/ # Internationalization JSON files
β β βββ materialize/ # Materialize SCSS source
β β β βββ sass/ # SCSS components
β β βββ sass/ # SCSS source files
β βββ bootstrap.rs # Application bootstrapping
β βββ database/ # Database management
β β βββ db.rs # Database connection pool
β β βββ migrations/ # Database migrations
β β β βββ ... # Migration directories with up.sql/down.sql
β β βββ schema.rs # Generated DB schema
β β βββ seeds/ # Database seed files
β βββ lib.rs # Library entry point
β βββ main.rs # Application entry point
β βββ middleware/ # Request/response middleware
β β βββ api_logger.rs # API request logging
β β βββ app_context.rs # Application context
β β βββ cache.rs # Response caching
β β βββ catchers.rs # Error catchers
β β βββ compress.rs # Response compression
β β βββ guards.rs # Request guards
β β βββ htmx.rs # HTMX integration
β β βββ jwt.rs # JWT authentication
β βββ models/ # Database models
β β βββ auth/ # Authentication models
β β βββ custom/ # Your custom models (never overwritten)
β β βββ generated/ # Generated models (can be overwritten)
β βββ routes/ # Route handlers
β β βββ admin.rs # Admin routes
β β βββ api/ # API routes
β β β βββ v1.rs # API version 1
β β β βββ ... # Other API endpoints
β β βββ home.rs # Homepage routes
β β βββ user.rs # User routes
β βββ services/ # Business logic services
β β βββ builders/ # Query builders
β β βββ context/ # Context services
β β βββ default/ # Default services
β β βββ sparks/ # Spark plugins
β β βββ makeuse.rs # Utility for sparks
β β βββ plznohac/ # Security spark
β β βββ vigil/ # Monitoring spark
β βββ structs/ # Data structures
β βββ auth/ # Authentication structs
β βββ custom/ # Your custom structs (never overwritten)
β βββ generated/ # Generated structs (can be overwritten)
β βββ insertable/ # NewStruct types for insertions
βββ storage/ # Storage directory
β βββ blast/ # Blast-specific files
β β βββ blast.log # Blast tool log
β β βββ dashboard.kdl # Dashboard configuration
β βββ logs/ # Application logs
β βββ debug.log # Debug level logs
β βββ error.log # Error level logs
β βββ info.log # Info level logs
β βββ server.log # Server output log
β βββ warning.log # Warning level logs
βββ templates/ # Tera templates for views
βββ admin/ # Admin area templates
βββ auth/ # Authentication templates
βββ oops/ # Error pages
βββ partials/ # Shared template components
β βββ footer.tera
β βββ header.tera
β βββ navbar.tera
βββ user/ # User area templates
The Catalyst framework and Blast CLI follow the "suckless" philosophy:
- Simplicity: Minimalist code with clear purpose
- Modularity: Small components that do one thing well
- Pragmatism: Practical solutions over theoretical purity
- Performance: Lightweight and efficient implementation
- Mental Model: Consistent patterns throughout the codebase
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0) - see the LICENSE file for details.
The AGPL-3.0 is a strong copyleft license that requires making the complete source code available to users who interact with the software over a network. This ensures that all modifications and improvements remain free and open source.