tgzr.cli 0.1.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,168 @@
1
+ Metadata-Version: 2.4
2
+ Name: tgzr.cli
3
+ Version: 0.1.2
4
+ Summary: tgzr command line interface
5
+ Project-URL: Documentation, https://github.com/open-tgzr/tgzr.cli#readme
6
+ Project-URL: Issues, https://github.com/open-tgzr/tgzr.cli/issues
7
+ Project-URL: Source, https://github.com/open-tgzr/tgzr.cli
8
+ Author-email: Dee <dee.sometech@gmail.com>
9
+ License-Expression: GPL-3.0-or-later
10
+ License-File: LICENSE
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Programming Language :: Python
13
+ Classifier: Programming Language :: Python :: 3.8
14
+ Classifier: Programming Language :: Python :: 3.9
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: Implementation :: CPython
19
+ Classifier: Programming Language :: Python :: Implementation :: PyPy
20
+ Requires-Python: ==3.12.*
21
+ Requires-Dist: click
22
+ Requires-Dist: rich>=14.2.0
23
+ Requires-Dist: uv>=0.9.15
24
+ Description-Content-Type: text/markdown
25
+
26
+ # tgzr.cli
27
+ tgzr command line
28
+
29
+ # Installation
30
+
31
+ ## Standalone Executable
32
+
33
+ Download the executable corresponding to your platform on https://github.com/open-tgzr/tgzr.cli/releases
34
+
35
+ ## uvx
36
+
37
+ To run `tgzr` without installation, you can use `uvx`.
38
+ The default command is `install`, so you can install `tgzr` with:
39
+
40
+ `uvx --from tgzr.cli tgzr`\
41
+ or\
42
+ `uvx --from tgzr.cli tgzr --home /path/to/your/TGZR --studio MyStudioName`
43
+
44
+ You can also run `tgzr` with plugins loaded from other pacakages.
45
+ The default command becomes `app manager` when you install `tgzr.shell_apps.manager_panel`, so
46
+ you can run the manager with:
47
+
48
+ `uvx --from tgzr.cli --with tgzr.shell_apps.manager_panel tgzr`
49
+
50
+ ## Python Package
51
+
52
+ Create a virtual environment, activate it, and `pip install -U tgzr.cli`
53
+
54
+ # Usage
55
+
56
+ ## Home
57
+
58
+ ### Lookup
59
+
60
+ `tgzr` looks for a config file named `.tgzr` in the current directory. If the config file is not found there
61
+ if looks for it in the parent directory and all parent's sub-directories, and goes on up until reaching the
62
+ root directory or finding a Config file.
63
+
64
+ To start the config lookup in another directory, you can use the `-H` or `--home` option:
65
+ - `tgzr --home ~/TGZR ...`
66
+
67
+ Once the config is found, we refer to its folder as **"home"**.
68
+
69
+ ### Manage
70
+
71
+ - You can see the session config with:
72
+ - `tgzr session show`
73
+ - You can save a config with:
74
+ - `tgzr session save`
75
+ - This will bake the options into the config, so if you do:
76
+ - `tgzr --verbose session save`
77
+ - Next usage of `tgzr` will behave as if the `--verbose` option was specified.
78
+
79
+ ## Sub Commands
80
+
81
+ `tgzr` provides different sub-commands depending from where you run it.
82
+
83
+ A bare `tgzr` will only have `help` and `install` sub-commands.
84
+ When installed (for example, using `tgzr install`), some plugins will then
85
+ provide additionnal sub-commands.
86
+
87
+ In order to activate a specific list of plugins, you need to run `tgzr` from an installed "Studio" . \
88
+ All Studios contain a `tgzr` alias in their root directory (`tgzr.bat` for windows).\
89
+ This is the command you want to run in order to use the plugins installed in that Studio.
90
+
91
+ ### Command short name
92
+
93
+ Commands and Groups can be specified using their first letter(s) only, as long as
94
+ their is no ambiguity on the command name you are aiming at.
95
+
96
+ For example, let's say available commands are:
97
+ - search
98
+ - save
99
+ - load
100
+
101
+ Then, if entering `tgzr l` resolve to `tgzr load`.
102
+ But entering `tgzr s` could resolve to `tgzr search` or `tgzr load`, so
103
+ you will receive an error. You should use at lease `tgzr se` or `tgzr sa`.
104
+
105
+ ### Getting Help
106
+
107
+ - Use `-h` or `--help` after the sub-command name to get usage details:
108
+ - `tgzr <subcommand> --help`
109
+ - Use the commands in the `help` group to get detailed information / tips:
110
+ - `tgzr help <topic>`
111
+
112
+
113
+
114
+
115
+ ## Env Vars
116
+
117
+ You can config the session using environement variables.
118
+
119
+ Use the `tgzr help env` command to list the name of all usable env vars.
120
+
121
+ The env var name is the config field prepended with the appropriate prefix:
122
+ - SessionConfig: `tgzr_<field_name>`
123
+ - WorkspacesConfig: `tgzr_ws_<field_name>`
124
+ - WorkspaceConfig: `tgzr_ws_default_<field_name>`
125
+
126
+ You can open the config files saved in the session and workspaces to find
127
+ examples of the env var names.
128
+
129
+ For example:
130
+ - `tgzr_verbose=True tgzr config show` == `tgzr -v config show`
131
+ - `tgzr_verbose=False tgzr config show` == `tgzr --quite config show`
132
+ - `tgzr_ws_default_workspace_name=MyStudio tgzr ws show` == `tgzr ws --name MyStudio show`
133
+
134
+ # Plugins
135
+
136
+ `tgzr` command line is plugin based: all plugin installed in the current virtual env will
137
+ be accessible in the command line.
138
+
139
+ ## Implement a Plugin
140
+
141
+ To implement a plugin you need:
142
+ - to declare entry point(s) in a `tgzr.cli.plugin` group.
143
+ - to have the entry point(s) lead to a callable accepting one argument: the root click group
144
+
145
+ __Example__:
146
+ > in `my_package/cli_plugin.py`:
147
+ > ```python
148
+ > import click
149
+ >
150
+ > @click.group()
151
+ > def my_group():
152
+ > '''My Awesome commands'''
153
+ >
154
+ > def install_plugin(group::click.Group):
155
+ > group.add_command(my_group)
156
+ > ```
157
+ >
158
+ > in `pyproject.toml`:
159
+ >
160
+ > ```
161
+ > [project.entry-points."tgzr.cli.plugin"]
162
+ > my_package = "my_package.cli_plugin:install_plugin"
163
+ > ```
164
+
165
+ # Installer
166
+
167
+ Generate the installer with: `uv run pyinstaller pyinstaller_specs/tgzr-<platform>.spec`
168
+ The `tgzr-<platform>` executable will be generated in the `dist/` folder
@@ -0,0 +1,14 @@
1
+ tgzr/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ tgzr/cli/__main__.py,sha256=d725Kn77hwTZ6V5Ly-7C379VmqKHHgnXDIZqCzBs8ws,156
3
+ tgzr/cli/_version.py,sha256=Ok5oAXdWgR9aghaFXTafTeDW6sYO3uVe6d2Nket57R4,704
4
+ tgzr/cli/add_plugins.py,sha256=bVQkD-wPneXDcYXNN3yDTnuBDdMaiAPLXGE_qfjER1w,3878
5
+ tgzr/cli/install.py,sha256=jNjDn5yZUhzSF1ANfSkUx8NAEdQL2IoH1SeHtJWUrP4,5433
6
+ tgzr/cli/install_cli.py,sha256=9edfEDe1orT5B0JiSQwPSKMF0GYwLBlPtHHNq7I5d8Q,3977
7
+ tgzr/cli/main.py,sha256=XQM4OFWyM7NA45ZPMRW49l9HFdfrsSM96qrFJkZUv6s,94
8
+ tgzr/cli/main_cli.py,sha256=h-5jg3xh1Nhgq2MrjIKghZhGP1Tyn_7lKfgWEMsKpPE,646
9
+ tgzr/cli/utils.py,sha256=PGFvsZxTK8pAPUMCdBV2eF81AM413mp-KdplI1PVnHw,3499
10
+ tgzr_cli-0.1.2.dist-info/METADATA,sha256=rzlLAOLdoVA1yo4Z230MCT-djsT5Cjr-5CIrWZT3vJY,5371
11
+ tgzr_cli-0.1.2.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
12
+ tgzr_cli-0.1.2.dist-info/entry_points.txt,sha256=pivITpEbeeS6LA1ZpMpU1L6lRfTimzREACCOEDjTAog,44
13
+ tgzr_cli-0.1.2.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
14
+ tgzr_cli-0.1.2.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.28.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ tgzr = tgzr.cli.main:main