Path-Fast
Translated: pt-BR
Path-Fast is a CLI tool that simplifies project navigation by letting you save paths with a shortcut (alias/command), open them in your IDE, and optionally run extra commands. Perfect for jumping into projects and bootstrapping your environment fast.
Features
- Save paths with aliases : Quickly store paths and associate them with a custom alias.
- Navigate and open projects : Use shortcuts to navigate to paths and open them in your IDE.
- Support for additional commands : Execute predefined commands when navigating to a path.
- Interactive editing : Modify paths, commands, or additional parameters through a simple interactive interface.
- Global installation : Available from anywhere in your terminal.
Installation
Install Path-Fast globally using npm or yorur preferred package manager:
npm install -g path-fast
Usage
Commands Overview
pf add <path> <command>: Save a project path with a shortcut.--ide <command>: Custom IDE command (skips interactive prompts).--extra <command>: Additional command, repeatable.--json: Machine-readable output.
pf go <command>: Navigate to a saved path, open in your IDE, and run extras.-c, --code: Skip opening the IDE command.-e, --extra: Skip executing additional commands.--dry-run: Preview steps without changing directory or running commands.--json: Machine-readable output (works with--dry-run).
pf list: Show all saved entries (--jsonsupported).pf export: Export config bundle as JSON (--json,-o <file>).pf import <file>: Import config after validation (--json).pf doctor: Diagnose config and environment (--json).pf edit <command or index>: Interactively edit a saved entry.pf delete <command>: Delete an entry by its shortcut.pf set-ide: Set a global default IDE command (e.g.,code .).
pf validateis planned for v0.2. See JSON output schema.
Add a Path
Save a project path with a custom shortcut (alias/command):
pf add <path> <command>
path: Absolute or relative. Use.for the current directory.command: Your shortcut name (e.g.,app,api,work).
Examples:
pf add /my-project app
pf add . currentdir
pf add . api --ide "cursor ." --extra "make up" --extra "npm run dev"
During pf add (without flags), you can:
- Add a custom IDE command for this specific path (e.g.,
cursor .,idea .,cursor .). - Add one or more additional commands that will run when using
pf go <command>.
Navigate to a Path
Go to a saved path, open it in your IDE, and optionally run extra commands:
pf go <command> [--code] [--extra]
--code: Skip the IDE opening step (per-path or global).--extra: Skip executing additional commands.
Examples:
pf go app
pf go app --extra # don’t run additionals
pf go app --code # don’t open IDE
pf go app --dry-run # preview only
pf list --json
pf doctor
pf export -o backup.json
pf import backup.json
List All Saved Paths
Display a list of all saved paths:
pf list
Edit a Saved Path
Interactively edit fields for an entry:
pf edit <command or index>
- Supports editing: Path, Command (alias), IDE Command, Additional commands.
- Use
pf listfirst if you prefer editing by index (shown in the table output). -
exitis reserved in prompts and cannot be used as a command.
Delete a Path
Delete a saved entry by its shortcut (command):
pf delete <command>
Examples
- Save a project and add extras interactively:
pf add /srv/api api
# Answer prompts to add IDE command for this path (optional)
# and additional commands (e.g., "pnpm install", "pnpm dev").
- Global IDE setting (used when an entry doesn’t have its own):
pf set-ide
# When prompted, enter something like: code .
# Other examples: cursor . | idea . | subl .
- Open the project and run extras:
pf go api
pf go api --extra # skip extras
pf go api --code # skip opening IDE
- Edit fields interactively:
pf edit api
pf list # see index numbers
pf edit 0 # edit by index
- Remove an entry:
pf delete api
Configuration
Files are stored in your home directory:
~/.path-fast/paths.json— saved paths and commands~/.path-fast/ide-config.json— global IDE command
IDE command precedence when running pf go <command>:
- Per-entry IDE command (set during
pf addor viapf edit). - Global IDE command (
pf set-ide). - Fallback
code ..
License
This project is licensed under the MIT License.
Contributing
Contributions are welcome! Feel free to open an issue or submit a pull request to the GitHub repository.
Acknowledgements
Thanks to the developers and maintainers of the following libraries: