PyPositron Docs

CLI Commands

PyPositron provides a command-line interface (CLI) to help you manage your projects. All commands are executed using the positron executable.

General Usage

To see a list of all available commands, run:

positron help

To get help on a specific command, use the -h or --help flag:

positron <command> -h

Available Commands

positron create

Creates a new PyPositron project. This command can be run interactively or with command-line arguments.

positron create [--directory <path>] [--name <project_name>] [--author <author_name>] [--description <description>] [--no-venv]
  • --directory or -d: Directory to create the project in (default: current directory).
  • --name or -n: Name of the project (default: demo_project).
  • --author or -a: Author name (optional).
  • --description: Project description (optional).
  • --no-venv: Do not create a virtual environment.

positron start

Starts your PyPositron application. This command should be run from the root directory of your project (where config.json is located).

positron start [--no-venv] [--executable <python_executable_path>]
  • --no-venv: Run the project without activating the virtual environment, even if one is present.
  • --executable: Specify the Python executable to use (default: python on Windows, python3 on Linux/macOS).

positron install (or positron pip)

Installs a Python package into your project's virtual environment using pip. This command is a wrapper around pip install that ensures the package is installed in the correct virtual environment.

positron install <library_name> [--root_path <project_root_path>]
  • <library_name>: The name of the Python package to install (e.g., requests, numpy).
  • --root_path or -r: Root path of the project (default: current directory).

positron venv

Creates a virtual environment for your PyPositron project. This is useful if you initially created your project without a virtual environment or if the virtual environment creation failed during project setup.

positron venv [--root_path <project_root_path>]
  • --root_path or -r: Root path of the project (default: current directory).

positron update

Updates a specified Python package (or PyPositron itself by default) within your project's virtual environment.

positron update [<library_name>] [--root_path <project_root_path>]
  • <library_name>: The name of the Python package to update (default: py-positron).
  • --root_path or -r: Root path of the project (default: current directory).

positron build

Builds a standalone executable or package for your PyPositron application. This command is experimental and does not work. If you want to build your app, use cx_freeze, PyInstaller or another freezing tool.

positron activate

Activates the virtual environment for your PyPositron project. This is useful if you need to run Python commands within the context of your project's virtual environment.

positron activate [--root_path <project_root_path>]
  • --root_path or -r: Root path of the project (default: current directory).