dfgpreol

Crates.iodfgpreol
lib.rsdfgpreol
version0.1.1
created_at2025-11-30 00:05:08.05946+00
updated_at2025-11-30 00:11:34.181579+00
descriptionTerminal development console for rapid Rust script scaffolding, execution, and benchmarking.
homepagehttps://github.com/yourname/dfgpreol
repositoryhttps://github.com/yourname/dfgpreol
max_upload_size
id1957663
size65,716
Lex Luger (JROChub)

documentation

README

dfgpreol

dfgpreol is a terminal development console for rapid Rust scripting. It helps you quickly scaffold, run, test, and benchmark small Rust scripts in a Cargo project without having to set up a full crate for each one. Scripts are stored under the project’s src/bin directory and are treated as independent binaries.

Features

  • Template scaffolding: generate new scripts with opinionated templates.
    • basic – minimal CLI that accepts an optional --input argument.
    • cli – reserved for future richer CLI features (currently identical to basic).
    • tokio – asynchronous template using #[tokio::main] for async code.
    • axum – simple HTTP server template using the axum framework.
    • bench – skeleton for a benchmark; measures elapsed time.
  • Doctor pipeline: run cargo fmt, cargo check, cargo clippy, and optionally cargo test in sequence.
  • Run scripts: invoke any script under src/bin with arbitrary arguments.
  • Test harness: run your project’s tests, with optional pattern filtering.
  • Performance profiling: time a script across multiple runs and report summary statistics (min, max, mean, median, standard deviation).
  • List & remove scripts: see what scripts are available and delete them when they’re no longer needed.

Installation

From crates.io

Once published, install the latest stable release via:

cargo install dfgpreol

From source

Clone the repository and install locally:

git clone https://github.com/JROChub/dfgpreol
cd dfgpreol
cargo install --path .

Usage

Run dfgpreol --help to see all available commands and options. Below are common workflows.

Create a new script

dfgpreol new-script hello            # uses the default 'basic' template
dfgpreol new-script fetcher --template tokio
dfgpreol new-script server --template axum

Each command creates src/bin/<name>.rs. Templates inject the script name and provide a ready‑to‑run scaffold.

List scripts

dfgpreol list

This prints the names of all .rs files in src/bin (without extensions).

Run a script

dfgpreol run hello -- --input "Hello, world!"
dfgpreol run server --             # for server scripts

Arguments after -- are forwarded to the script itself.

Doctor: format, check, clippy, (optional) tests

dfgpreol doctor
dfgpreol doctor --with-tests

Use this to quickly verify that your project is well formatted and free of obvious warnings. The optional --with-tests flag runs your test suite at the end of the pipeline.

Run tests

dfgpreol test               # run all tests
dfgpreol test integration   # filter tests by name

Performance benchmarking

dfgpreol perf hello
dfgpreol perf fetcher --runs 10 -- --input "data"

The perf command times each invocation and prints a summary of the run statistics when complete.

Remove a script

dfgpreol remove-script hello          # prompts for confirmation
dfgpreol remove-script hello --force  # deletes immediately

License

This project is licensed under the terms of the MIT License. See the LICENSE file for details.

Commit count: 0

cargo fmt