skilled 0.1.0__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.
skilled-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,18 @@
1
+ Metadata-Version: 2.4
2
+ Name: skilled
3
+ Version: 0.1.0
4
+ Summary: TUI dashboard for skill usage stats across AI coding tools
5
+ License-Expression: MIT
6
+ Project-URL: Homepage, https://github.com/av/skilled
7
+ Project-URL: Repository, https://github.com/av/skilled
8
+ Project-URL: Issues, https://github.com/av/skilled/issues
9
+ Keywords: skilled,tui,cli,coding-agents,skill-usage,dashboard
10
+ Classifier: Development Status :: 4 - Beta
11
+ Classifier: Environment :: Console
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Operating System :: MacOS
14
+ Classifier: Operating System :: POSIX :: Linux
15
+ Classifier: Operating System :: Microsoft :: Windows
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Topic :: Software Development :: Build Tools
18
+ Requires-Python: >=3.8
@@ -0,0 +1,29 @@
1
+ [build-system]
2
+ requires = ["setuptools>=64"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "skilled"
7
+ version = "0.1.0"
8
+ description = "TUI dashboard for skill usage stats across AI coding tools"
9
+ license = "MIT"
10
+ requires-python = ">=3.8"
11
+ keywords = ["skilled", "tui", "cli", "coding-agents", "skill-usage", "dashboard"]
12
+ classifiers = [
13
+ "Development Status :: 4 - Beta",
14
+ "Environment :: Console",
15
+ "Intended Audience :: Developers",
16
+ "Operating System :: MacOS",
17
+ "Operating System :: POSIX :: Linux",
18
+ "Operating System :: Microsoft :: Windows",
19
+ "Programming Language :: Python :: 3",
20
+ "Topic :: Software Development :: Build Tools",
21
+ ]
22
+
23
+ [project.urls]
24
+ Homepage = "https://github.com/av/skilled"
25
+ Repository = "https://github.com/av/skilled"
26
+ Issues = "https://github.com/av/skilled/issues"
27
+
28
+ [project.scripts]
29
+ skilled = "skilled_cli:main"
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
skilled-0.1.0/setup.py ADDED
@@ -0,0 +1,108 @@
1
+ """
2
+ Setup script that downloads the correct prebuilt binary during install.
3
+ """
4
+
5
+ import os
6
+ import platform
7
+ import stat
8
+ import sys
9
+ import tarfile
10
+ import zipfile
11
+ from io import BytesIO
12
+ from urllib.request import urlopen, Request
13
+ from urllib.error import URLError
14
+
15
+ from setuptools import setup
16
+ from setuptools.command.build_py import build_py
17
+
18
+ REPO = "av/skilled"
19
+ BINARY = "skilled"
20
+ VERSION = "0.1.0"
21
+
22
+ PLATFORM_MAP = {
23
+ "Linux": "linux",
24
+ "Darwin": "darwin",
25
+ "Windows": "windows",
26
+ }
27
+
28
+ ARCH_MAP = {
29
+ "x86_64": "amd64",
30
+ "AMD64": "amd64",
31
+ "aarch64": "arm64",
32
+ "arm64": "arm64",
33
+ }
34
+
35
+
36
+ def get_artifact_info():
37
+ system = platform.system()
38
+ machine = platform.machine()
39
+
40
+ plat = PLATFORM_MAP.get(system)
41
+ if not plat:
42
+ raise RuntimeError(
43
+ f"Unsupported platform: {system}. "
44
+ f"Supported: {', '.join(PLATFORM_MAP.keys())}"
45
+ )
46
+
47
+ arch = ARCH_MAP.get(machine)
48
+ if not arch:
49
+ raise RuntimeError(
50
+ f"Unsupported architecture: {machine}. "
51
+ f"Supported: {', '.join(ARCH_MAP.keys())}"
52
+ )
53
+
54
+ artifact = f"{BINARY}-{plat}-{arch}"
55
+ ext = "zip" if plat == "windows" else "tar.gz"
56
+ return artifact, ext, plat
57
+
58
+
59
+ def download_binary(dest_dir):
60
+ artifact, ext, plat = get_artifact_info()
61
+ tag = f"v{VERSION}"
62
+ url = f"https://github.com/{REPO}/releases/download/{tag}/{artifact}.{ext}"
63
+
64
+ print(f"Downloading {BINARY} {tag} ({artifact})...")
65
+
66
+ try:
67
+ req = Request(url, headers={"User-Agent": "skilled-pypi"})
68
+ response = urlopen(req, timeout=60)
69
+ data = response.read()
70
+ except (URLError, OSError) as e:
71
+ print(
72
+ f"Warning: Could not download {BINARY} binary: {e}\n"
73
+ f"URL: {url}\n"
74
+ "You can install manually: https://github.com/av/skilled#installation",
75
+ file=sys.stderr,
76
+ )
77
+ return
78
+
79
+ os.makedirs(dest_dir, exist_ok=True)
80
+
81
+ if ext == "zip":
82
+ with zipfile.ZipFile(BytesIO(data)) as zf:
83
+ zf.extractall(dest_dir)
84
+ else:
85
+ with tarfile.open(fileobj=BytesIO(data), mode="r:gz") as tf:
86
+ tf.extractall(dest_dir)
87
+
88
+ binary_name = f"{BINARY}.exe" if plat == "windows" else BINARY
89
+ binary_path = os.path.join(dest_dir, binary_name)
90
+ if os.path.isfile(binary_path) and plat != "windows":
91
+ st = os.stat(binary_path)
92
+ os.chmod(binary_path, st.st_mode | stat.S_IEXEC | stat.S_IXGRP | stat.S_IXOTH)
93
+
94
+ print(f"Successfully installed {BINARY} binary to {binary_path}")
95
+
96
+
97
+ class BuildPyWithBinary(build_py):
98
+ def run(self):
99
+ super().run()
100
+ bin_dir = os.path.join(self.build_lib, "skilled_cli", "bin")
101
+ download_binary(bin_dir)
102
+
103
+
104
+ setup(
105
+ cmdclass={"build_py": BuildPyWithBinary},
106
+ packages=["skilled_cli"],
107
+ package_data={"skilled_cli": ["bin/*"]},
108
+ )
@@ -0,0 +1,18 @@
1
+ Metadata-Version: 2.4
2
+ Name: skilled
3
+ Version: 0.1.0
4
+ Summary: TUI dashboard for skill usage stats across AI coding tools
5
+ License-Expression: MIT
6
+ Project-URL: Homepage, https://github.com/av/skilled
7
+ Project-URL: Repository, https://github.com/av/skilled
8
+ Project-URL: Issues, https://github.com/av/skilled/issues
9
+ Keywords: skilled,tui,cli,coding-agents,skill-usage,dashboard
10
+ Classifier: Development Status :: 4 - Beta
11
+ Classifier: Environment :: Console
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Operating System :: MacOS
14
+ Classifier: Operating System :: POSIX :: Linux
15
+ Classifier: Operating System :: Microsoft :: Windows
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Topic :: Software Development :: Build Tools
18
+ Requires-Python: >=3.8
@@ -0,0 +1,8 @@
1
+ pyproject.toml
2
+ setup.py
3
+ skilled.egg-info/PKG-INFO
4
+ skilled.egg-info/SOURCES.txt
5
+ skilled.egg-info/dependency_links.txt
6
+ skilled.egg-info/entry_points.txt
7
+ skilled.egg-info/top_level.txt
8
+ skilled_cli/__init__.py
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ skilled = skilled_cli:main
@@ -0,0 +1 @@
1
+ skilled_cli
@@ -0,0 +1,28 @@
1
+ """skilled: TUI dashboard for skill usage stats across AI coding tools."""
2
+
3
+ import os
4
+ import subprocess
5
+ import sys
6
+
7
+
8
+ def main():
9
+ binary = os.path.join(os.path.dirname(__file__), "bin", _binary_name())
10
+ if not os.path.isfile(binary):
11
+ print(
12
+ "Error: skilled binary not found. "
13
+ "The postinstall script may have failed.\n"
14
+ "Try reinstalling: pip install --force-reinstall skilled",
15
+ file=sys.stderr,
16
+ )
17
+ sys.exit(1)
18
+ try:
19
+ result = subprocess.run([binary] + sys.argv[1:])
20
+ sys.exit(result.returncode)
21
+ except KeyboardInterrupt:
22
+ sys.exit(130)
23
+
24
+
25
+ def _binary_name():
26
+ if sys.platform == "win32":
27
+ return "skilled.exe"
28
+ return "skilled"