Velto CLI ๐
Velto CLI is the official command-line tool for Velto, a fast and minimal Rust web framework. It helps you scaffold, run, and manage Velto apps with ease.
โจ Features
velto new <name>โ Create a new Velto project instantlyvelto runโ Build and launch your app with clean outputvelto buildโ Compile your app and optionally package it- LiveReload support in dev mode
- Graceful shutdown on Ctrl+C
- No noisy Cargo logs โ just your app
๐ฆ Installation
๐ Usage
Create a new project
This generates:
src/main.rswith a sample routetemplates/index.htmlwith dynamic contentstatic/for assets like CSS and JSCargo.tomlwith Velto dependencies
Run your app
Options:
--port <PORT>โ Set the port (default: 8080)-r,--releaseโ Run in release mode
Build your app
Options:
-r,--releaseโ Build in release mode--target <TRIPLE>โ Cross-compile for a specific target--output <DIR>โ Copy the binary to a custom directory--quietโ Suppress Cargo output--copy-assetsโ Copytemplates/andstatic/into the output directory
Note: Running the binary from a custom output directory may require copying assets or setting environment paths.
๐งช CLI Tests
You can run these tests using cargo test inside the velto-cli repo.
Example: tests/cli.rs
use Command;
๐ License
MIT
๐ Links
Happy building with Velto! โก