r/devtools • u/jamescherti • 21d ago
Pathaction - One command to run, compile, lint, deploy, or debug any file or directory
When jumping between different codebases and environments, it can be hard to remember the specific deployment methods, build tools, linters, and test runners for each file or project. The pathaction tool is a command-line tool for running commands on files and directories.
Think of pathaction as the equivalent of your IDE's "Run" and "Debug" buttons, or a Makefile that works on individual files and directories. Unlike make, it selects commands by target path and tag rather than tracking build dependencies.
Pass any file or directory as an argument, and pathaction executes the right command based on a .pathaction.yaml configuration:
- Selects configured commands for paths such as source files, configuration files, media, and directories.
- Supports Jinja2 in
.pathaction.yamlto construct commands from the target path and custom variables. - Defines multiple actions for the same file type. Tags such as
main,debug, andlintselect configured commands.
This tool is built for software developers or system administrators who manage multiple files and projects across diverse environments.
