{"id":20683114,"url":"https://github.com/eivindarvesen/prm","last_synced_at":"2025-04-05T20:07:46.738Z","repository":{"id":46307284,"uuid":"42486109","full_name":"EivindArvesen/prm","owner":"EivindArvesen","description":"A minimal project manager for the terminal.","archived":false,"fork":false,"pushed_at":"2021-10-31T18:47:34.000Z","size":241,"stargazers_count":442,"open_issues_count":8,"forks_count":18,"subscribers_count":12,"default_branch":"master","last_synced_at":"2024-07-31T17:24:07.834Z","etag":null,"topics":["bash","efficiency","productivity","project-management","shell","workspace-manager"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/EivindArvesen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-09-15T01:01:28.000Z","updated_at":"2024-07-13T23:10:57.000Z","dependencies_parsed_at":"2022-08-02T20:00:25.128Z","dependency_job_id":null,"html_url":"https://github.com/EivindArvesen/prm","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EivindArvesen%2Fprm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EivindArvesen%2Fprm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EivindArvesen%2Fprm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EivindArvesen%2Fprm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EivindArvesen","download_url":"https://codeload.github.com/EivindArvesen/prm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247393570,"owners_count":20931812,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bash","efficiency","productivity","project-management","shell","workspace-manager"],"created_at":"2024-11-16T22:15:31.132Z","updated_at":"2025-04-05T20:07:46.710Z","avatar_url":"https://github.com/EivindArvesen.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# prm\n\n[![TravisCI Status](https://api.travis-ci.org/EivindArvesen/prm.svg)](https://travis-ci.org/EivindArvesen/prm)\n[![License](http://img.shields.io/badge/license-BSD3-brightgreen.svg)](https://github.com/EivindArvesen/prm/blob/master/LICENSE.txt)\n[![Gitter](https://img.shields.io/badge/gitter-join%20chat-brightgreen.svg)](https://gitter.im/EivindArvesen/prm)\n\nA minimal project manager for the terminal.\n\n![Demo](https://github.com/EivindArvesen/prm/blob/demo/prm.gif)\n\nThis script **must** be sourced, *not* run in a subshell.\nSee [usage](#usage) for more information.\n\nAt present, prm supports `zsh`, as well as `bash`.\nFor more information, see the [Wiki page on Zsh support](https://github.com/EivindArvesen/prm/wiki/Zsh-support).\n\nOstensibly, prm also [works](https://github.com/EivindArvesen/prm/issues/27) under [Cygwin](https://cygwin.com).\nIf your `$EDITOR` is set to a program external to Cygwin (ex: Sublime Text), you\nmight want to add `export prm_use_cygpath=true` to your `.bashrc`/`.zshrc` to send\nthe native Windows path to the editor.\n\nRegrettably, `fish` is not supported, because of syntax incompatibilities.\nSee [this issue](https://github.com/EivindArvesen/prm/issues/2) for some details.\nHowever, Fred Deschenes has made a [port](https://github.com/FredDeschenes/prm-fish) for `fish` that you could check out.\n\nAdditionally, Michael Krieger has integrated prm into a [workflow](https://github.com/M-Krieger/prm-alfred) for [Alfred](https://www.alfredapp.com) (OS X).\n\n## What?\nThis program basically lets you CRUD projects. Upon activation, each projects runs its associated start-script; on deactivation, it runs the project stop-script.\n\nThese bash-scripts can be used for things like changing directories, setting environment variables, cleanup, etc.\n\nThere is basic prompt integration in the form of `[PROJECT] \u003cprompt\u003e`, which can be seen in the animated .gif demo above.\n\nYou can have several projects active at once in different shells, as prm associates active instances with the shell PID.\nCurrently active projects can be listed (as described in [usage](#usage)).\n\nDead project instances (i.e. project instances that are still active on shell exit) will be automatically deactivated the next time you run prm – without running their stop-scripts.\n\nFor the motivation behind prm, please see the [Wiki page on Problem Statements and Design Goals](https://github.com/EivindArvesen/prm/wiki/Problem-Statements-and-Design-Goals).\n\n## How?\nAdding and editing projects will open the associated start- and stop-scripts in your editor (as defined by the `$EDITOR` environment variable).\n\nA project start-script might for instance look something like this:\n\n```bash\n# cd to project directory\ncd $HOME/src/Python/hello-world\n\n# activate conda env\nsource activate hello-world\n\n# show current git status\ngit status\n```\n\nThe same project's stop-script might look like this:\n\n```bash\n# deactivate conda env\nsource deactivate hello-world\n\n# clean up\nrm *.log *.tmp\n```\n\nWhen you activate a new project, prm automatically stops any active project in the current shell.\n\nWhen a project is deactivated, prm changes the working directory back to the path you were originally on before starting your first project.\n\n### Reusability\nIf you often create projects similar to one you already have, you can load custom scripts from your projects' `start.sh` and `stop.sh`.\nFor instance, if you'd like some python-based projects to list the number of outdated packages in their conda envs, you can save\n\n```bash\n# count outdated packages in conda env\necho \"$((($(conda search --outdated --names-only | wc -l)-1))) outdated packages in env\"\n```\n\nas e.g. `conda-list-outdated.sh` in `$PRM_DIR/.common/` (this environment variable is detailed in [usage](#usage)).\nYou can then load this script in your start- and stop-scripts like so:\n\n```bash\nprm_load conda-list-outdated\n```\n\nAdditionally, if you need the name of the currently active project, this is available via the `$PRM_ACTIVE_PROJECT` environment variable.\n\nThe prm command line arguments are available in start- and stop-scripts, `$3` being the first argument after your project name.\n\nAll available environment variables are described on [this](https://github.com/EivindArvesen/prm/wiki/Environment-variables) Wiki page.\n\n## Installation\nTo install prm: `git clone https://github.com/EivindArvesen/prm.git`, or download and extract a release .zip.\n\nIn order to work properly, prm **must** be sourced, *not* run in a subshell.\nThe easiest way to do this is probably to add an alias to prm in your `~/.bashrc` (or wherever you keep your aliases), like so:\n\n```bash\nalias prm=\". path/to/prm.sh\"\n```\n\nThe technical reason for this is succinctly explained in [this](https://en.wikipedia.org/wiki/Source_(command)) Wikipedia article.\n\nYou must set your `$EDITOR` env-var, e.g.\n\n```bash\nexport EDITOR=nano\n```\n\nin your rc-file (like `.bashrc` or `.zshrc`).\n\n## Usage\nFrom the help option screen:\n\n```bash\nusage: prm \u003coption\u003e [\u003cargs\u003e] ...\n\nOptions:\n  active                   List active project instances.\n  add \u003cproject name\u003e       Add project(s).\n  copy \u003cold\u003e \u003cnew\u003e         Copy project.\n  edit \u003cproject name\u003e      Edit project(s).\n  list                     List all projects.\n  remove \u003cproject name\u003e    Remove project(s).\n  rename \u003cold\u003e \u003cnew\u003e       Rename project.\n  start \u003cproject name\u003e     Start project.\n  stop                     Stop active project.\n  -h --help                Display this information.\n  -v --version             Display version info.\n```\n\nYou can set the prm data directory with the `$PRM_DIR` environment variable.\nBy default all prm data is written to `~/.prm`.\n\n### Shell completions\nYou can install shell completions by running `bash completions/deploy_completions.sh` from the project root.\nOnly `bash` is supported for now, but `zsh` completions are under development.\n\n## Contributing\nFeedback is strongly encouraged. If you run into a bug or would like to see a new feature, please open a new issue. In the case of bugs, please mention what shell they occur under (i.e. `bash` or `zsh`).\n\nContributions in the form of code (e.g. implementing new features, bug-fixes) are also appreciated. For information about this, see the [Wiki page on Contributing](https://github.com/EivindArvesen/prm/wiki/Contributing).\n\nPull requests that do not pass the CI [tests](https://github.com/EivindArvesen/prm/wiki/Contributing/_edit#tests) will not be merged.\n\n### Tests\nThe project tests can be found in the `tests` directory.\n\nIf you have [Bats](https://github.com/sstephenson/bats) installed, you can run all tests (for both `bash` and `zsh`) locally by issuing `bash tests/run-tests.sh` in the root project folder of prm.\n\nUnit tests can be found in [`tests/units.bats`](/tests/internals.bats).\n\nEnd-to-end tests can be found in [`tests/e2e.bats`](/tests/prm.bats).\n\nYou can run both by via `make test`.\n\n## License\nThis software is released under the terms of the 3-clause New BSD License. See the [license](LICENSE.txt) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feivindarvesen%2Fprm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feivindarvesen%2Fprm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feivindarvesen%2Fprm/lists"}