projecthor
v0.0.5
Published
Save, manage, and run project setup commands automatically from the CLI.
Maintainers
Readme
Projecthor

Table of Content
Purpose
Working on multiple projects at once? Tired of juggling windows or resetting workspaces just to check something? Projecthor makes it simple, just:
- Save the project setup
- Load it whenever you want with a single command
Projecthor runs for you all the commands required to set your projects up and running.
Requirements
- Node.js >= 16
- npm or yarn (to install dependencies)
- Optional but recommended: Git (if cloning the repo)
Install
npm install --global projecthorDesign
Each project record has three fields:
- Name - used by
projecthoras project identifier - Folder - usually the project root folder (all setup commands run here!)
- Commands - list of commands to execute in the folder
Documentation
Save a Project
You can save a project setup in two ways:
Interface
Run:
projecthor saveThis launches an interactive process that guides you step by step:

LIMITATION: The interface only allows saving one project at a time.
Use a .psup File
A .psup file (Project Setup) lets you save multiple project setups with just one command:
projecthor save --source project-setups.psup.psup files require a specific structure (similar to .yaml) with the following fields:
PROJECT- marks the start of a project setup definitionNAME- project nameFOLDER- root folder of the projectCOMMANDS- list of commands to run to setup the project
Single setup example:
PROJECT:
NAME: my-project
FOLDER: c:\users\johnDoe\projects\my-project
COMMANDS:
code .
node server.js
index.htmlMultiple setup examples:
PROJECT:
NAME: my-calculator-project
FOLDER: c:\users\johnDoe\projects\my-calculator-project
COMMANDS:
code .
PROJECT:
NAME: my-website
FOLDER: c:\users\johnDoe\projects\my-website
COMMANDS:
code .
node server.js
index.htmlLoad a Project
After you have saved your project you can load its environment with a single command.
Run:
projecthor load [project-name]This will run all the commands to set up the project.
NOTE: If you want to run setup commands in a particular shell, use the --shell flag. For example:
projecthor load [projec-name] --shell powershell.exeDefault Folder
If you prefer using the projecthor interface to save a project, you might want to define a Default Folder. In this way the Folder: field is automatically populated by the default folder while saving the project via the interface.
To define a default folder run:
projecthor setdf [default-folder-path]If you want to see the current default folder value, run:
projecthor getdfTo unset the default folder run:
projecthor setdf ""List All Projects
To check which projects have already been saved, run:
projecthor listThis will output a list of all available projects (next to the project name there is also its root folder):

When a project directory color is gray, it means that that project folder doesn't exist anymore. If there are multiple "orphan" projects you can delete them all at once just by running:
projecthor purgeOr just delete one by one with the delete command.
If you want more details about all the projects, use the --full flag:
projecthor list --fullDelete a Project
If you want to delete a project, run:
projecthor delete [project-name]Known Bugs
cdcan't be used as command (this is why I opted to associate a folder to each project).- Default folder paths can be sometimes recognized as valid even if they are not (e.g. when path has white spaces in it). It must be something related with the implementation of
fs.existsSync()function.
New Features and Bugs
If you need new features or critical bug fixes feel free to open an issue or a pull request.
