Instead of typing...
npm run devIsn't it much faster to just type:
f [Enter]This command launcher tool makes it possible!
Even with multiple commands in your project, you can use incremental search to filter them or select with arrow keys - no need to remember the exact command names.
- Quick command selection with fuzzy search using fzf
- Support for npm scripts and make targets
- Project-specific and global configurations
- Extensible plugin system
brew install katoken03/fastrun/fastrun- Homebrew (for macOS users)
If you prefer to install from source:
- Clone the repository
- Build using Go 1.x
- Install dependencies
Basic command syntax:
f # List and select available commands
f <pattern> # Filter commands by patternExamples:
f # Shows all available commands
f test # Shows commands containing "test"
f "run dev" # Shows commands containing "run dev"fastrun can be configured at two levels:
- Global configuration:
~/.config/f/config.json - Project configuration:
.f/config.json
Example configuration:
{
"plugins": ["npm", "make"],
"defaultTool": "npm"
}To add selected commands to your shell history, add the following function to your shell configuration file:
f() {
local cmd=$(command f -t "$@")
if [ $? -eq 0 ] && [ -n "$cmd" ]; then
# Display command in cyan color (DisplayCommand equivalent)
echo -e "\033[36m$cmd\033[0m"
history -s "$cmd"
eval "$cmd"
fi
}f() {
local cmd=$(command f -t "$@")
if [ $? -eq 0 ] && [ -n "$cmd" ]; then
# Display command in cyan color (DisplayCommand equivalent)
echo -e "\033[36m$cmd\033[0m"
print -s "$cmd"
eval "$cmd"
fi
}Both functions will:
- Execute the selected command
- Add it to your shell history so you can access it with the up arrow key
- Handle flags normally by passing them directly to the fastrun binary
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
This tool is designed to improve developer productivity by eliminating the need to type long commands repeatedly, allowing you to focus more on development.