semvec/pypi-packages huggingface dataset:
goto-project 0.1.2
Easy and fast project switching in your shell!
License: MIT
Requires Python: >=3.6
Keywords: project shell management

goto-project
============

Easy and fast project switching in your shell!

This is a like ``workon`` for python, but more powerfull and not only
for python.

|Build Status| |Coverage Status| |Python versions| |PyPi|

Installation
------------

Install it in your user-space with

.. code:: shell

    pip3 install goto-project --user  # or pip if python3 is your default interpreter

You can install ``zsh`` completion with
`antigen <https://github.com/zsh-users/antigen>`__

.. code:: shell

    antigen bundle sivakov512/goto-project completions/zsh

Now type ``gt``, then press and you will see all available projects.

If you have project names ``awesome-project`` you can type ``gt aw``,
press and get ``gt awesome-project``.

Configuration and usage
-----------------------

Specify your project in ``~/.goto-project.yaml`` file.

.. code:: yaml

    goto-project:  # this is a project name
      path: ~/Devel/Projects/goto-project/  # path project
      instructions:  # any instructions to call when you switch project
        - source ~/Devel/Envs/py3_goto-project/bin/activate
      command: vim  # command to run when project opened
      clear_on_exit: false  # if specified as false then terminal output will not be cleared on project close

To list all available projects call

.. code:: shell

    gt

To open project call ``gt`` with project name as argument

.. code:: shell

    gt goto-project

To close project press ``C-D``. When you close project all changes will
be breaked. For example, ``$PATH`` will be restored if you extend it.

Usage example
-------------

For example you have a project named ``awesome-nuxt-blog`` placed at
``~/Projects/awesome-nuxt-blog``. You need to extend your ``$PATH`` with
``.mode_modules/.bin``, source ``.env/bin/activate`` and show git status
when project opened.

Create ``~/.goto-project.yaml`` with this content:

.. code:: yaml

    awesome-nuxt-blog:
      path: ~/Projects/awesome-nuxt-blog
      instructions:
        - source .env/bin/activate
        - export PATH=".node_modules/.bin:$PATH"
        - git status

Now you at ``~/``. Type ``gt awesome-nuxt-blog``. Now you at
``~/Projects/awesome-nuxt-blog``.

All your instructions are executed. Also you see ``git status`` output
in your shell.

Type ``C-D`` and now you in ``~/``.

Screencast
----------

...available `here <https://asciinema.org/a/149712>`__

.. |Build Status| image:: https://travis-ci.org/sivakov512/py-goto-project.svg?branch=master
   :target: https://travis-ci.org/sivakov512/py-goto-project
.. |Coverage Status| image:: https://coveralls.io/repos/github/sivakov512/py-goto-project/badge.svg?branch=master
   :target: https://coveralls.io/github/sivakov512/py-goto-project?branch=master
.. |Python versions| image:: https://img.shields.io/badge/python-3.6-blue.svg
.. |PyPi| image:: https://img.shields.io/badge/PyPi-0.1.2-yellow.svg
   :target: https://pypi.python.org/pypi/goto-project