aid-installer 0.7.5__tar.gz

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,7 @@
1
+ # PyPI package vendored copies (generated at build time by scripts/vendor.py; not committed)
2
+ aid_installer/_vendor/
3
+
4
+ # Build artifacts
5
+ dist/
6
+ *.whl
7
+ *.tar.gz
@@ -0,0 +1,9 @@
1
+ Metadata-Version: 2.4
2
+ Name: aid-installer
3
+ Version: 0.7.5
4
+ Summary: AID CLI installer - puts the persistent aid command on PATH via pipx or pip
5
+ Project-URL: Repository, https://github.com/AndreVianna/aid-methodology
6
+ Author-email: Andre Vianna <andre.vianna.rj@hotmail.com>
7
+ License: MIT
8
+ Keywords: agentic,aid,cli,development,installer,iterative
9
+ Requires-Python: >=3.8
@@ -0,0 +1,7 @@
1
+ # aid_installer/__init__.py - PyPI channel package for the AID CLI.
2
+ #
3
+ # Purpose:
4
+ # Installed as the `aid` entry point when the user runs
5
+ # `pipx install aid-installer` or `pip install --user aid-installer`.
6
+ # The package version is kept in sync with the repo VERSION file at
7
+ # build time via packages/pypi/scripts/vendor.py.
@@ -0,0 +1,81 @@
1
+ #!/usr/bin/env python3
2
+ # aid_installer/__main__.py - PyPI channel shim for the AID CLI.
3
+ #
4
+ # Purpose:
5
+ # Installed as the `aid` entry point when the user runs
6
+ # `pipx install aid-installer` or `pip install --user aid-installer`.
7
+ # Spawns the vendored bin/aid (bash) or bin/aid.ps1 (pwsh/powershell) with
8
+ # AID_INSTALL_CHANNEL=pypi injected into the child environment so that
9
+ # `aid update self` prints the pipx upgrade hint instead of re-bootstrapping.
10
+ #
11
+ # Runtime selection:
12
+ # Windows -> try pwsh first, then powershell (with -NoLogo -NonInteractive -File)
13
+ # All else -> bash bin/aid
14
+ #
15
+ # argv forwarding: sys.argv[1:] is spread as a list into subprocess.run args
16
+ # (no shell=True) so spaces and shell metacharacters in arguments are safe.
17
+
18
+ from __future__ import annotations
19
+
20
+ import os
21
+ import shutil
22
+ import subprocess
23
+ import sys
24
+ from pathlib import Path
25
+
26
+
27
+ def main() -> None:
28
+ # Payload root: _vendor/ lives next to this file.
29
+ vendor_root = Path(__file__).parent / "_vendor"
30
+
31
+ # Inject channel so `aid update self` prints the pipx advice.
32
+ os.environ["AID_INSTALL_CHANNEL"] = "pypi"
33
+
34
+ user_args = sys.argv[1:]
35
+
36
+ if os.name == "nt":
37
+ # Windows: try pwsh (PowerShell 7+) first, fall back to powershell 5.1.
38
+ ps1 = vendor_root / "bin" / "aid.ps1"
39
+ fixed_flags = ["-NoLogo", "-NonInteractive", "-File", str(ps1)]
40
+
41
+ pwsh = shutil.which("pwsh")
42
+ if pwsh is not None:
43
+ proc = subprocess.run(
44
+ [pwsh] + fixed_flags + user_args,
45
+ check=False,
46
+ )
47
+ sys.exit(proc.returncode)
48
+
49
+ powershell = shutil.which("powershell")
50
+ if powershell is not None:
51
+ proc = subprocess.run(
52
+ [powershell] + fixed_flags + user_args,
53
+ check=False,
54
+ )
55
+ sys.exit(proc.returncode)
56
+
57
+ sys.stderr.write(
58
+ "ERROR: aid: neither pwsh nor powershell found on PATH."
59
+ " Install PowerShell to use the aid CLI.\n"
60
+ )
61
+ sys.exit(1)
62
+ else:
63
+ # Unix/macOS: bash + bin/aid.
64
+ bash = shutil.which("bash")
65
+ if bash is None:
66
+ sys.stderr.write(
67
+ "ERROR: aid: bash not found on PATH."
68
+ " Install bash to use the aid CLI.\n"
69
+ )
70
+ sys.exit(1)
71
+
72
+ aid_sh = vendor_root / "bin" / "aid"
73
+ proc = subprocess.run(
74
+ [bash, str(aid_sh)] + user_args,
75
+ check=False,
76
+ )
77
+ sys.exit(proc.returncode)
78
+
79
+
80
+ if __name__ == "__main__":
81
+ main()
@@ -0,0 +1 @@
1
+ 0.7.5