piel.cli
========

.. py:module:: piel.cli


Submodules
----------

.. toctree::
   :maxdepth: 1

   /autoapi/piel/cli/activate/index
   /autoapi/piel/cli/core/index
   /autoapi/piel/cli/develop/index
   /autoapi/piel/cli/environment/index
   /autoapi/piel/cli/main/index
   /autoapi/piel/cli/run/index
   /autoapi/piel/cli/utils/index


Functions
---------

.. autoapisummary::

   piel.cli.main
   piel.cli.activate_shell
   piel.cli.get_python_install_directory
   piel.cli.main
   piel.cli.get_piel_install_directory
   piel.cli.return_path
   piel.cli.echo_and_check_subprocess
   piel.cli.get_python_install_directory
   piel.cli.main
   piel.cli.develop
   piel.cli.build_documentation
   piel.cli.generate_poetry2nix_flake
   piel.cli.build_piel_cachix_command
   piel.cli.main
   piel.cli.main
   piel.cli.run
   piel.cli.run_python
   piel.cli.append_to_bashrc_if_does_not_exist
   piel.cli.echo_and_run_subprocess
   piel.cli.echo_and_check_subprocess
   piel.cli.get_python_install_directory
   piel.cli.get_piel_home_directory
   piel.cli.install_nix
   piel.cli.create_and_activate_venv


Package Contents
----------------

.. py:function:: main(args=None)

   CLI Interface for piel There are available many helper commands to help you set up your
   environment and design your projects.


.. py:function:: activate_shell()

   Enters the custom piel nix environment with all the supported tools installed and configured packages.
   Runs the nix-shell command on the piel/environment/nix/ directory.


.. py:function:: get_python_install_directory()

   Gets the piel installation directory.

   :returns: The piel installation directory.
   :rtype: pathlib.Path


.. py:function:: main(args=None)

   CLI Interface for piel There are available many helper commands to help you set up your
   environment and design your projects.


.. py:function:: get_piel_install_directory()

   Gets the piel installation directory.


.. py:function:: return_path(input_path: piel.types.PathTypes, as_piel_module: bool = False) -> pathlib.Path

   Returns a pathlib.Path to be able to perform operations accordingly internally.

   This allows us to maintain compatibility between POSIX and Windows systems. When the `as_piel_module` flag is
   enabled, it will analyse whether the input path can be treated as a piel module, and treat the returned path as a
   module would be treated. This comes useful when analysing files generated in this particular structure accordingly.

   Usage:

       return_path('path/to/file')

   :param input_path: Input path.
   :type input_path: str

   :returns: Pathlib path.
   :rtype: pathlib.Path


.. py:function:: echo_and_check_subprocess(command: list, **kwargs)

   Runs a subprocess and prints the command. Raises an exception if the subprocess fails.

   :param command:
   :param \*\*kwargs:

   Returns:



.. py:function:: get_python_install_directory()

   Gets the piel installation directory.

   :returns: The piel installation directory.
   :rtype: pathlib.Path


.. py:function:: main(args=None)

   CLI Interface for piel There are available many helper commands to help you set up your
   environment and design your projects.


.. py:function:: develop()

   Development related commands.


.. py:function:: build_documentation(args=None)

   Verifies and builds the documentation.


.. py:function:: generate_poetry2nix_flake(args=None)

   Generates the poetry2nix flakes file. Requires nix to be installed.

   Returns:



.. py:function:: build_piel_cachix_command(args=None)

   Enters the custom piel nix environment with all the supported tools installed and configured packages.
   Runs the nix-shell command on the piel/environment/nix/ directory.


.. py:function:: main(args=None)

   CLI Interface for piel There are available many helper commands to help you set up your
   environment and design your projects.


.. py:function:: main(args=None)

   CLI Interface for piel There are available many helper commands to help you set up your
   environment and design your projects.


.. py:function:: run()

   Running related commands.


.. py:function:: run_python()

   Runs a python shell where piel is installed.


.. py:function:: append_to_bashrc_if_does_not_exist(line: str)

   Appends a line to .bashrc if it does not exist.

   :param line:

   Returns:



.. py:function:: echo_and_run_subprocess(command: list, **kwargs)

   Runs a subprocess and prints the command.

   :param command:
   :param \*\*kwargs:

   Returns:



.. py:function:: echo_and_check_subprocess(command: list, **kwargs)

   Runs a subprocess and prints the command. Raises an exception if the subprocess fails.

   :param command:
   :param \*\*kwargs:

   Returns:



.. py:function:: get_python_install_directory()

   Gets the piel installation directory.

   :returns: The piel installation directory.
   :rtype: pathlib.Path


.. py:function:: get_piel_home_directory()

   Gets the piel home directory.

   :returns: The piel home directory.
   :rtype: pathlib.Path


.. py:function:: install_nix()

   Installs the nix package manager.


.. py:function:: create_and_activate_venv() -> None

   Creates and activates the piel virtual environment.

   :returns: None.
   :rtype: None


