r/linux • u/jamescherti • 21d ago
Software Release pathaction - One Linux command to run, compile, lint, deploy, or debug any file or directory [Release 1.1.0]
https://github.com/jamescherti/pathactionWhen jumping between different codebases and environments, it can be hard to remember the specific deployment method, 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 designed to work on individual files and directories.
Pass any file or directory as an argument, and pathaction executes the right command based on a .pathaction.yaml configuration:
Works on any file: source code, config files, media...
Supports Jinja2 in
.pathaction.yamlso you can build dynamic commands using the target path's filename, extension, or directory.Define multiple actions for the exact same file type. You can map the default action to execute a script, a
debugtag to attach a debugger, and alinttag to check formatting.
This tool is built for software developers or Linux administrators who manage multiple projects across diverse environments.
1
u/arwinda 20d ago
This feels like "I couldn't remember the commands and did not want to read the README, so I built a new tool where I have to remember the commands".
0
u/jamescherti 19d ago
I understand why it might look that way, but the intent is the exact opposite.
The problem pathaction addresses is context switching. When you work across multiple ecosystems daily (such as Python, Node.js, Ansible, and Go), every project has its own specific way to run, build, test, deploy, or lint. You end up having to memorize a dozen different toolchains or constantly check the README for every repository.
The goal of pathaction is to eliminate that mental overhead. You define the
.pathaction.yamlconfiguration once. After that, you do not have to remember any of the underlying commands. You just run one unified command, or press a single hotkey in your editor, and it executes the correct toolchain based on the exact file type or directory you are currently looking at.
3
u/CoolGuyMemeHead 21d ago
Why would I want one command that I have to configure to do what I want when I could just run the command that does every time exactly what I want?