glen-cli 0.2.0__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.
glen_cli/__init__.py ADDED
@@ -0,0 +1,44 @@
1
+ """`glen`: glen-cli's command, which runs the `tex-ai-cli` command."""
2
+
3
+ import os
4
+ import shutil
5
+ import subprocess
6
+ import sys
7
+ import sysconfig
8
+
9
+ NOTICE = "glen: glen-cli is now tex-ai-cli, and so is its command; running tex-ai-cli.\n"
10
+ EXE = "tex-ai-cli.exe" if os.name == "nt" else "tex-ai-cli"
11
+
12
+
13
+ def new_command():
14
+ """The tex-ai-cli installed beside this command (a venv, --user or the
15
+ system's scripts), else the one on PATH."""
16
+ for scripts in (os.path.dirname(os.path.abspath(sys.argv[0])), sysconfig.get_path("scripts")):
17
+ path = os.path.join(scripts, EXE)
18
+ if os.path.isfile(path):
19
+ return path
20
+ return shutil.which("tex-ai-cli")
21
+
22
+
23
+ def main():
24
+ sys.stderr.write(NOTICE)
25
+ path = new_command()
26
+ if path is None:
27
+ sys.stderr.write("glen: the tex-ai-cli command is not installed; pip install tex-ai-cli\n")
28
+ return 2
29
+ args = [path] + sys.argv[1:]
30
+ if os.name == "posix":
31
+ sys.stdout.flush()
32
+ os.execv(path, args)
33
+ # Windows has no exec: run it, and let it see Ctrl+C as the console
34
+ # sends it, waiting for its own exit rather than printing a traceback.
35
+ child = subprocess.Popen(args)
36
+ while True:
37
+ try:
38
+ return child.wait()
39
+ except KeyboardInterrupt:
40
+ pass
41
+
42
+
43
+ if __name__ == "__main__":
44
+ sys.exit(main())
@@ -0,0 +1,30 @@
1
+ Metadata-Version: 2.4
2
+ Name: glen-cli
3
+ Version: 0.2.0
4
+ Summary: Renamed to tex-ai-cli: installs it, and keeps a glen command that runs tex-ai-cli
5
+ License-Expression: Apache-2.0
6
+ Project-URL: Homepage, https://trytex.ai
7
+ Project-URL: New name, https://pypi.org/project/tex-ai-cli/
8
+ Classifier: Development Status :: 7 - Inactive
9
+ Classifier: Environment :: Console
10
+ Requires-Python: >=3.8
11
+ Description-Content-Type: text/markdown
12
+ Requires-Dist: tex-ai-cli>=0.2.0
13
+
14
+ <img src="https://trytex.ai/glen-logo.png" alt="Tex" width="96" height="96">
15
+
16
+ # glen-cli is now tex-ai-cli
17
+
18
+ Glen is now [Tex](https://trytex.ai), and its CLI is
19
+ [`tex-ai-cli`](https://pypi.org/project/tex-ai-cli/), whose command is
20
+ `tex-ai-cli` too.
21
+
22
+ ```bash
23
+ pip install tex-ai-cli
24
+ tex-ai-cli agents list
25
+ ```
26
+
27
+ This last release of glen-cli installs tex-ai-cli, and keeps a `glen`
28
+ command that runs `tex-ai-cli` with the same arguments. `GLEN_URL` and
29
+ `GLEN_TOKEN` still work; when a `TEX_` and a `GLEN_` name are both set,
30
+ the `TEX_` one wins.
@@ -0,0 +1,6 @@
1
+ glen_cli/__init__.py,sha256=erJsliF0p4YEJBocjIw5ZFZstTttQB89pj8pKkGnUtI,1339
2
+ glen_cli-0.2.0.dist-info/METADATA,sha256=e50i-yiyxgrLehOb-i5HnqOdwxBdz-FcS9g0fwltBTo,998
3
+ glen_cli-0.2.0.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
4
+ glen_cli-0.2.0.dist-info/entry_points.txt,sha256=G3Y7aqBYTj4gXoIz4YEmpXg7j_GfUX2v1wojKcnD64I,39
5
+ glen_cli-0.2.0.dist-info/top_level.txt,sha256=BJCJHRc5xa4kCpWEXeK5JCe7xyZ6d1dUucii2oUwy8s,9
6
+ glen_cli-0.2.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (84.2.1)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ glen = glen_cli:main
@@ -0,0 +1 @@
1
+ glen_cli