Skip to main content

tgzr command line interface

Project description

tgzr.cli

tgzr command line

Installation

Standalone Executable

Download the executable corresponding to your platform on https://github.com/open-tgzr/tgzr.cli/releases

uvx

To run tgzr without installation, you can use uvx. The default command is install, so you can install tgzr with:

uvx --from tgzr.cli tgzr
or
uvx --from tgzr.cli tgzr --home /path/to/your/TGZR --studio MyStudioName

You can also run tgzr with plugins loaded from other pacakages. The default command becomes app manager when you install tgzr.shell_apps.manager_panel, so you can run the manager with:

uvx --from tgzr.cli --with tgzr.shell_apps.manager_panel tgzr

Python Package

Create a virtual environment, activate it, and pip install -U tgzr.cli

Usage

Home

Lookup

tgzr looks for a config file named .tgzr in the current directory. If the config file is not found there if looks for it in the parent directory and all parent's sub-directories, and goes on up until reaching the root directory or finding a Config file.

To start the config lookup in another directory, you can use the -H or --home option:

  • tgzr --home ~/TGZR ...

Once the config is found, we refer to its folder as "home".

Manage

  • You can see the session config with:
    • tgzr session show
  • You can save a config with:
    • tgzr session save
    • This will bake the options into the config, so if you do:
      • tgzr --verbose session save
      • Next usage of tgzr will behave as if the --verbose option was specified.

Sub Commands

tgzr provides different sub-commands depending from where you run it.

A bare tgzr will only have help and install sub-commands. When installed (for example, using tgzr install), some plugins will then provide additionnal sub-commands.

In order to activate a specific list of plugins, you need to run tgzr from an installed "Studio" .
All Studios contain a tgzr alias in their root directory (tgzr.bat for windows).
This is the command you want to run in order to use the plugins installed in that Studio.

Command short name

Commands and Groups can be specified using their first letter(s) only, as long as their is no ambiguity on the command name you are aiming at.

For example, let's say available commands are:

  • search
  • save
  • load

Then, if entering tgzr l resolve to tgzr load. But entering tgzr s could resolve to tgzr search or tgzr load, so you will receive an error. You should use at lease tgzr se or tgzr sa.

Getting Help

  • Use -h or --help after the sub-command name to get usage details:
    • tgzr <subcommand> --help
  • Use the commands in the help group to get detailed information / tips:
    • tgzr help <topic>

Env Vars

You can config the session using environement variables.

Use the tgzr help env command to list the name of all usable env vars.

The env var name is the config field prepended with the appropriate prefix:

  • SessionConfig: tgzr_<field_name>
  • WorkspacesConfig: tgzr_ws_<field_name>
  • WorkspaceConfig: tgzr_ws_default_<field_name>

You can open the config files saved in the session and workspaces to find examples of the env var names.

For example:

  • tgzr_verbose=True tgzr config show == tgzr -v config show
  • tgzr_verbose=False tgzr config show == tgzr --quite config show
  • tgzr_ws_default_workspace_name=MyStudio tgzr ws show == tgzr ws --name MyStudio show

Plugins

tgzr command line is plugin based: all plugin installed in the current virtual env will be accessible in the command line.

Implement a Plugin

To implement a plugin you need:

  • to declare entry point(s) in a tgzr.cli.plugin group.
  • to have the entry point(s) lead to a callable accepting one argument: the root click group

Example:

in my_package/cli_plugin.py:

import click

@click.group()
def my_group():
    '''My Awesome commands'''
 
def install_plugin(group::click.Group):
    group.add_command(my_group)

in pyproject.toml:

[project.entry-points."tgzr.cli.plugin"]
my_package = "my_package.cli_plugin:install_plugin"

Installer

Generate the installer with: uv run pyinstaller pyinstaller_specs/tgzr-<platform>.spec The tgzr-<platform> executable will be generated in the dist/ folder

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tgzr_cli-0.1.2.tar.gz (23.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tgzr_cli-0.1.2-py3-none-any.whl (23.8 kB view details)

Uploaded Python 3

File details

Details for the file tgzr_cli-0.1.2.tar.gz.

File metadata

  • Download URL: tgzr_cli-0.1.2.tar.gz
  • Upload date:
  • Size: 23.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.16 {"installer":{"name":"uv","version":"0.9.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"KDE neon","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for tgzr_cli-0.1.2.tar.gz
Algorithm Hash digest
SHA256 53504d37aa3cb83bc8dfc6aa3017b3407efb03c312974f3b8a5a476d334da448
MD5 e5031cc8ab340baf62f8cb8ffec29469
BLAKE2b-256 c7506c60c6204da7e6a8a2b56dd85d6d18b7a3c688e7396901d46ef59b9c0c1f

See more details on using hashes here.

File details

Details for the file tgzr_cli-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: tgzr_cli-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 23.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.16 {"installer":{"name":"uv","version":"0.9.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"KDE neon","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for tgzr_cli-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 981280ea77e1638d62719453dfb84293f7da9f5dc652b02c1838f9afc89e085d
MD5 e3828b2d326aefe067e8a87fab109b40
BLAKE2b-256 b21dfce6612b287077e4310a7e884f5d8c8935d5c487d4739f5f08020227bbf2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page