A workflow tool for quickly running / testing something you are working on

Overview

runfast

What is it?

This is a program intended to be run in a project directory to set up a project run command, and remember it so we dont have to type it multiple times. It should run in a single terminal window, and be lightweight. It should also be easy for end-users to add more commands to the default list. There should also be a custom option, for one-off situations.

Why?

I hate typing things out multiple times, and doing more things that are not the work increases my chance of getting distracted, therefore a single command allows me to think less, do more.

How do I use it?

add the binary to your path, and call runfast in your project directory. It will automatically create a default config at ~/.config/runfast/defaults.toml. You can add your own runners in a similar manner in ~/.config/runfast/runners.toml. When running in a new directory, runfast will get you to choose a runner, and cache what you choose. This means you dont have to select the same one each time. However, you can also call runfast -f to force runfast to re-choose and re-cache the runner for a directory.

Additionally, I have mine firing off a tmux bind, see my dotfiles repo, also hosted on github, for an example.

Can I see it working?

Sure, here is an asciinema demo of it:

asciicast

I want to contribute, how should I do that?

firstly, thanks. secondly, please fork this repo, make your changes, and PR the main branch. When the PR is made, request me as a reviewer, and I'll get around to it at some point. I cant give a timescale since I currently work full time, so it'll get done when it gets done.

Comments
  • [FEATURE] Config file as argument

    [FEATURE] Config file as argument

    Hey there i did couple of modification !

    • Added a build.rs file to generate man page of your program using clap_mangen
    • Updated your main cause you seems not really liked it
    • Refactor the preview function to use format!
    • Couple of bugfix if chosen runner is empty
    • Added an option to choose a specific config file to load
    opened by leon3s 3
  • Add runners with 'choose-time' arguments

    Add runners with 'choose-time' arguments

    Add runners that have arguments which are defined at 'choose time' and saved to the cache.

    I want to set this up as a templating type thing, probably with {{myvar}} and then a dictionary of variables stored in the toml. We can parse what variables are required at choose time, when a runner is chosen, so this does not incur a significant performance overhead

    enhancement 
    opened by anna-singleton 1
  • [FEATURE] Config file

    [FEATURE] Config file

    Hey there i did couple of modification !

    • Added a build.rs file to generate man page of your program using clap_mangen
    • Updated your main
    • Couple of bugfix if chosen runner is empty
    • Added an option to choose a specific config file to load
    opened by leon3s 0
  • have a flag to force resetting the runner for a directory

    have a flag to force resetting the runner for a directory

    we need this otherwise if the wrong runner gets set, or it just needs changing, we would have to delete the whole cache file which sucks obviously.

    Probably overkill to use crate clap right now, but might be worth doing it anyway, for extendability in the future

    enhancement 
    opened by anna-singleton 0
  • cache the last used runner in a directory

    cache the last used runner in a directory

    runfast must remember the last used runner in a particular directory. the previous way of doing this was to put a .quickrun with the name of the runner in it. this is not ideal, as it causes problems for version control tools such as git.

    my current plan is to write a file in ~/.config/runfast/cache which contains directories and corresponding commands. The simplest way to do this is just by having a file like this:

    .../proj/foo = cargo build; read
    .../proj/bar = python main.py
    

    another solution which may be faster with lots of results would be to have a binary dump of a hashmap, with keys as strings for directories, and a struct as its value.

    enhancement 
    opened by anna-singleton 0
  • load runners from config files

    load runners from config files

    Loading runners from config files makes this usable without touching the internal code theoretically, as this would obviously require recompilation which is not ideal.

    Current way i want this to work is by using .toml files to hold information about runners (name, command, whether they accept additional arguments, should they exit instantly after the runner command finishes etc.). We would then load from /etc/runfast.toml and then ~/.config/runfast/runners.toml , overwriting any name clashes, preferring the user-level one.

    Example config entries:

    [rust run]
    cmd = "cargo"
    args = [ "run" ]
    exit_fast = false
    
    [python]
    cmd = "python"
    args = [ "main.py" ]
    
    enhancement 
    opened by anna-singleton 0
  • cache ejection

    cache ejection

    we want to be able to eject unused / stale from the cache upon hitting a user defined limit. This requires timestamping last use of a runner. the point of this is to be able to know the oldest runner in the cache to be able to eject it on making a new runner which puts the total amount over the limit.

    opened by anna-singleton 0
Releases(dev-latest)
  • dev-latest(Dec 16, 2022)

  • v0.3.0(Dec 1, 2022)

  • v0.2.0(Nov 9, 2022)

    What's Changed

    • Misc. Cleanup incl. comments, dead code, clippy warnings, moving defaults string by @anna-singleton in https://github.com/anna-singleton/runfast/pull/11
    • [FEATURE] Config file as argument by @leon3s in https://github.com/anna-singleton/runfast/pull/18
    • add choose-time arguments / variables by @anna-singleton in https://github.com/anna-singleton/runfast/pull/19
    • merge dev into main for release v0.2.0 by @anna-singleton in https://github.com/anna-singleton/runfast/pull/20

    New Contributors

    • @leon3s made their first contribution in https://github.com/anna-singleton/runfast/pull/18

    Full Changelog: https://github.com/anna-singleton/runfast/compare/v0.1.0...v0.2.0

    Source code(tar.gz)
    Source code(zip)
    runfast(13.80 MB)
  • v0.1.0(Oct 30, 2022)

    Initial release of runfast, a minimum viable product. Features:

    • Select a runner from a list of predefined and user-defined options
    • Remember the last runner used in a directory, and re-use it
    • Use a defined runner to execute a specific command
    • Reset the runner for a specific directory, with a cli flag

    Commit-by-Commit changes:

    • Run cmd by @anna-singleton in https://github.com/anna-singleton/runfast/pull/4
    • Load runners by @anna-singleton in https://github.com/anna-singleton/runfast/pull/5
    • cache the last runner used in a directory by @anna-singleton in https://github.com/anna-singleton/runfast/pull/7
    • correctly handle the case of ~/.config/runfast/ not existing by @anna-singleton in https://github.com/anna-singleton/runfast/pull/8
    • add -f flag, recognisable by the program by @anna-singleton in https://github.com/anna-singleton/runfast/pull/9
    • improve docs by @anna-singleton in https://github.com/anna-singleton/runfast/pull/10

    Full Changelog: https://github.com/anna-singleton/runfast/commits/v0.1.0

    Source code(tar.gz)
    Source code(zip)
    runfast(13.35 MB)
Owner
anna
Studying Computer Science at University of York, Currently on a year out placement at the Sanger Institute. she/they
anna
Git Explorer: cross-platform git workflow improvement tool inspired by Magit

Gex Git workflow improvement CLI tool inspired by Magit. This project is still under initial development, but I am actively dogfooding it and features

Peter Hebden 204 Jan 6, 2023
Command-line tool that provides a workflow for extending, editing, diffing, and writing to vim-style grep lines.

Grug Grug is a command-line tool that provides a workflow for expanding, editing, diffing, and writing edits to files using vim-styled grep lines (suc

null 4 Apr 25, 2023
A WIP property-based testing library in Rust, built with generalized targeted-property testing in mind.

Crabcheck A WIP property-based testing library in Rust, built with generalized targeted-property testing in mind. What is property-based testing? TODO

Alperen Keleş 9 Mar 27, 2024
Jumpy is a tool that allows to quickly jump to one of the directory you've visited in the past

Jumpy Jumpy is a tool that allows to quickly jump to one of the directory you've visited in the past. It is heavily inspired by Zoxide but is more lig

Clément Nerma 2 Oct 3, 2022
Introducing Inlyne, a GPU powered yet browsless tool to help you quickly view markdown files in the blink of an eye.

Inlyne - a GPU powered, browserless, markdown + html viewer inlyne README.md --theme dark/light About Markdown files are a wonderful tool to get forma

null 308 Jan 1, 2023
Tool that was built quickly for personal needs, you might find it useful though

COPYCAT Produced with stable-diffusion Clipboard (copy/paste) history buffer for terminal emulators, MAC OS gui and VIM* environment usage. Rrequireme

Dragan Jovanović 4 Dec 9, 2022
tmplt is a command-line interface tool that allows you to quickly and easily set up project templates for various programming languages and frameworks

tmplt A User Friendly CLI Tool For Creating New Projects With Templates About tmplt is a command-line tool that lets users quickly create new projects

Humble Penguin 35 Apr 8, 2023
AI-TOML Workflow Specification (aiTWS), a comprehensive and flexible specification for defining arbitrary Ai centric workflows.

AI-TOML Workflow Specification (aiTWS) The AI-TOML Workflow Specification (aiTWS) is a flexible and extensible specification for defining arbitrary wo

ruv 20 Apr 8, 2023
For something between the likes of a toy bootloader or tiny kernel and Arch Linux.

For something between the likes of a toy bootloader or tiny kernel and Arch Linux.

Aarush Gupta 3 Oct 9, 2022
Warp is a blazingly fast, Rust-based terminal that makes you and your team more productive at running, debugging, and deploying code and infrastructure.

Warp is a blazingly fast, Rust-based terminal that makes you and your team more productive at running, debugging, and deploying code and infrastructure.

Warp 10.4k Jan 4, 2023
FastSSH is a TUI that allows you to quickly connect to your services by navigating through your SSH config.

Connect quickly to your services ?? FastSSH is a TUI that allows you to quickly connect to your services by navigating through your SSH config. Instal

Julien 85 Dec 14, 2022
A command line tool and Rust library for working with recombination maps.

RecMap library (and command line tool) for reading and working with recombination maps in Rust A RecMap object can be created from reading in a HapMap

Vince Buffalo 5 Feb 11, 2024
verilot (verifiable lottery) is a command line tool for running and verifying one-time lotteries.

verilot verilot (verifiable lottery) is a command line tool for running and verifying one-time lotteries. Install Install Rust and Cargo with Rustup.

Shelby Doolittle 9 Oct 10, 2022
Horus is an open source tool for running forensic and administrative tasks at the kernel level using eBPF, a low-overhead in-kernel virtual machine, and the Rust programming language.

Horus Horus is an open-source tool for running forensic and administrative tasks at the kernel level using eBPF, a low-overhead in-kernel virtual mach

null 4 Dec 15, 2022
A command-line tool to easily kill processes running on a specified port.

killport killport is a command-line utility for killing processes listening on specific ports. It's designed to be simple, fast, and effective. The to

Francisco Jiménez Cabrera 6 Mar 29, 2023
Dash is a CLI tool that rapidly sets up new projects by running a series of pre-defined commands.

Dash Dash is a CLI tool that rapidly sets up new projects by running a series of pre-defined commands. Features Quick Initialization: Initialize the c

Kunal Bagaria 4 Nov 7, 2023
A tool crate to quickly build rust command line application.

Falsework A tool crate to quickly build rust command line application.

Leon Ding 103 Dec 12, 2022
CLI tool to quickly create React + Typescript + Tailwind projects

QUICK INIT CLI Tool to quickly create React projects with Tailwind automatically configured for use. Typescript is selected as default. If JS is to be

Oscar 5 Nov 3, 2022