codei-cli 0.0.1__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.
- codei/__init__.py +75 -0
- codei/bin/codei-0.0.1-aarch64-apple-darwin +0 -0
- codei/bin/codei-0.0.1-aarch64-pc-windows-gnullvm.exe +0 -0
- codei/bin/codei-0.0.1-aarch64-unknown-linux-musl +0 -0
- codei/bin/codei-0.0.1-x86_64-apple-darwin +0 -0
- codei/bin/codei-0.0.1-x86_64-pc-windows-gnullvm.exe +0 -0
- codei/bin/codei-0.0.1-x86_64-unknown-linux-musl +0 -0
- codei_cli-0.0.1.dist-info/METADATA +23 -0
- codei_cli-0.0.1.dist-info/RECORD +12 -0
- codei_cli-0.0.1.dist-info/WHEEL +5 -0
- codei_cli-0.0.1.dist-info/entry_points.txt +2 -0
- codei_cli-0.0.1.dist-info/top_level.txt +1 -0
codei/__init__.py
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"""CodeI ai-coding agent."""
|
|
2
|
+
|
|
3
|
+
__version__ = "0.0.1"
|
|
4
|
+
|
|
5
|
+
import os
|
|
6
|
+
import platform
|
|
7
|
+
import subprocess
|
|
8
|
+
import sys
|
|
9
|
+
from pathlib import Path
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def _get_binary_path() -> str:
|
|
13
|
+
"""Find the path to the platform-specific binary."""
|
|
14
|
+
pkg_dir = Path(__file__).parent / "bin"
|
|
15
|
+
|
|
16
|
+
plat = platform.system().lower()
|
|
17
|
+
arch = platform.machine().lower()
|
|
18
|
+
|
|
19
|
+
# Normalize arch names
|
|
20
|
+
arch_map = {
|
|
21
|
+
"x86_64": "x86_64",
|
|
22
|
+
"amd64": "x86_64",
|
|
23
|
+
"aarch64": "aarch64",
|
|
24
|
+
"arm64": "aarch64",
|
|
25
|
+
}
|
|
26
|
+
normalized_arch = arch_map.get(arch, arch)
|
|
27
|
+
|
|
28
|
+
# Map to dist binary naming
|
|
29
|
+
binary_map = {
|
|
30
|
+
("linux", "x86_64"): "codei-x86_64-unknown-linux-musl",
|
|
31
|
+
("linux", "aarch64"): "codei-aarch64-unknown-linux-musl",
|
|
32
|
+
("darwin", "x86_64"): "codei-x86_64-apple-darwin",
|
|
33
|
+
("darwin", "aarch64"): "codei-aarch64-apple-darwin",
|
|
34
|
+
("windows", "x86_64"): "codei-x86_64-pc-windows-gnullvm.exe",
|
|
35
|
+
("windows", "aarch64"): "codei-aarch64-pc-windows-gnullvm.exe",
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
key = (plat, normalized_arch)
|
|
39
|
+
binary_name = binary_map.get(key)
|
|
40
|
+
|
|
41
|
+
if binary_name is None:
|
|
42
|
+
print(
|
|
43
|
+
f"Unsupported platform: {platform.system()} {platform.machine()}\n"
|
|
44
|
+
f"codei supports: linux/darwin/windows on x86_64/aarch64",
|
|
45
|
+
file=sys.stderr,
|
|
46
|
+
)
|
|
47
|
+
sys.exit(1)
|
|
48
|
+
|
|
49
|
+
binary_path = pkg_dir / binary_name
|
|
50
|
+
|
|
51
|
+
if not binary_path.exists():
|
|
52
|
+
print(
|
|
53
|
+
f"codei binary not found for {platform.system()} {platform.machine()}.\n"
|
|
54
|
+
f"Expected: {binary_path}",
|
|
55
|
+
file=sys.stderr,
|
|
56
|
+
)
|
|
57
|
+
sys.exit(1)
|
|
58
|
+
|
|
59
|
+
return str(binary_path)
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
def main() -> None:
|
|
63
|
+
"""Entry point: exec the bundled binary."""
|
|
64
|
+
binary_path = _get_binary_path()
|
|
65
|
+
|
|
66
|
+
# Replace the Python process with the codei binary
|
|
67
|
+
try:
|
|
68
|
+
os.execv(binary_path, [binary_path] + sys.argv[1:])
|
|
69
|
+
except OSError as e:
|
|
70
|
+
print(f"Failed to execute codei: {e}", file=sys.stderr)
|
|
71
|
+
sys.exit(1)
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
if __name__ == "__main__":
|
|
75
|
+
main()
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: codei-cli
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
Summary: CodeI ai-coding agent
|
|
5
|
+
Author-email: 007gzs <007gzs@gmail.com>
|
|
6
|
+
License: MIT OR Apache-2.0
|
|
7
|
+
Project-URL: Homepage, https://github.com/007gzs/codei
|
|
8
|
+
Project-URL: Repository, https://github.com/007gzs/codei
|
|
9
|
+
Classifier: Development Status :: 3 - Alpha
|
|
10
|
+
Classifier: Environment :: Console
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
13
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Programming Language :: Rust
|
|
21
|
+
Classifier: Topic :: Software Development
|
|
22
|
+
Requires-Python: >=3.8
|
|
23
|
+
Description-Content-Type: text/markdown
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
codei/__init__.py,sha256=sFkwvf5nK1IH2ozDuMFlytuOw-rNseZ8dkVPtcbTQZo,2016
|
|
2
|
+
codei/bin/codei-0.0.1-aarch64-apple-darwin,sha256=wqtOFl4-tpSLfwzTghahC7ljX2Ita2NXaYUDV9RY2oA,436416
|
|
3
|
+
codei/bin/codei-0.0.1-aarch64-pc-windows-gnullvm.exe,sha256=YTss8QCtWzrMIWgt3lmJtnXOJiQ1NdOIi0IibRF_R_8,245248
|
|
4
|
+
codei/bin/codei-0.0.1-aarch64-unknown-linux-musl,sha256=p9l6iyiZNpUSFMGoauyYeax9ejvoUQTNcWnuK100cN4,356640
|
|
5
|
+
codei/bin/codei-0.0.1-x86_64-apple-darwin,sha256=h_5DxMKc3JP5x8V6RP00prWZE8UPAw2grlfV3Qbc9Zk,426024
|
|
6
|
+
codei/bin/codei-0.0.1-x86_64-pc-windows-gnullvm.exe,sha256=mJHq0hTY4ZrhHmUrggmCLLNRGBkNGoVbhiR9fP48Zvg,334848
|
|
7
|
+
codei/bin/codei-0.0.1-x86_64-unknown-linux-musl,sha256=svNggPQY_7aIxcnjWKvzvew_kCbDz4ojJmQhMVv-3ic,374240
|
|
8
|
+
codei_cli-0.0.1.dist-info/METADATA,sha256=BlO1ARomRDDSORnB8vFjNqXVVfhluBhjPU8-Lx--rLs,947
|
|
9
|
+
codei_cli-0.0.1.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
|
|
10
|
+
codei_cli-0.0.1.dist-info/entry_points.txt,sha256=ZDLf_79qJ1mk6h0x8vf978RV7Y8BQjwvD_tartIZZuE,37
|
|
11
|
+
codei_cli-0.0.1.dist-info/top_level.txt,sha256=of5mQVaiQZsYmQQFKdN_-k4_a6rp3eUsiA6EGPYGTg4,6
|
|
12
|
+
codei_cli-0.0.1.dist-info/RECORD,,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
codei
|