| Crates.io | velto-cli |
| lib.rs | velto-cli |
| version | 0.3.0 |
| created_at | 2025-10-02 12:35:49.42535+00 |
| updated_at | 2025-10-18 09:39:27.555224+00 |
| description | A fast and minimal CLI tool for building and running Velto web apps |
| homepage | https://github.com/pjdur/velto-cli |
| repository | https://github.com/pjdur/velto-cli |
| max_upload_size | |
| id | 1864324 |
| size | 37,361 |
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.
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 itvelto info โ Show your Velto environment and setupcargo install velto-cli
velto new my-app
This generates:
src/main.rs with a sample routetemplates/index.html with dynamic contentstatic/ for assets like CSS and JSCargo.toml with Velto dependenciesvelto run --port 3000
Options:
--port <PORT> โ Set the port (default: 8080)-r, --release โ Run in release modevelto build --release --output dist/ --copy-assets
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 โ Copy templates/ and static/ into the output directoryNote: Running the binary from a custom output directory may require copying assets or setting environment paths.
velto info
Outputs:
Cargo.lock)Helpful for debugging, support, and verifying your setup.
You can run these tests using cargo test inside the velto-cli repo.
tests/cli.rsuse std::process::Command;
#[test]
fn test_new_project() {
let output = Command::new("cargo")
.args(["run", "--", "new", "test-app"])
.output()
.expect("Failed to run velto new");
assert!(output.status.success());
assert!(std::path::Path::new("test-app/src/main.rs").exists());
}
#[test]
fn test_run_help() {
let output = Command::new("cargo")
.args(["run", "--", "run", "--help"])
.output()
.expect("Failed to run velto run --help");
let stdout = String::from_utf8_lossy(&output.stdout);
assert!(stdout.contains("Usage"));
assert!(output.status.success());
}
MIT
Happy building with Velto! โก