remit-cli 0.5.6__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,36 @@
1
+ Metadata-Version: 2.4
2
+ Name: remit-cli
3
+ Version: 0.5.6
4
+ Summary: CLI for the Remit payment protocol — USDC payments for AI agents
5
+ License-Expression: MIT
6
+ Project-URL: Homepage, https://remit.md
7
+ Project-URL: Repository, https://github.com/remit-md/remit-cli
8
+ Keywords: usdc,payments,agents,base,blockchain
9
+ Classifier: Development Status :: 4 - Beta
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Topic :: Office/Business :: Financial
13
+ Requires-Python: >=3.10
14
+ Description-Content-Type: text/markdown
15
+
16
+ # remit-cli
17
+
18
+ CLI for the [Remit](https://remit.md) payment protocol — USDC payments for AI agents on Base.
19
+
20
+ This is a thin Python wrapper that downloads the native `remit` binary on first use.
21
+
22
+ ## Install
23
+
24
+ ```bash
25
+ pip install remit-cli
26
+ ```
27
+
28
+ ## Usage
29
+
30
+ ```bash
31
+ remit --version
32
+ remit status
33
+ remit pay 0xRecipient 10.00
34
+ ```
35
+
36
+ For full documentation, see the [remit-cli repo](https://github.com/remit-md/remit-cli).
@@ -0,0 +1,21 @@
1
+ # remit-cli
2
+
3
+ CLI for the [Remit](https://remit.md) payment protocol — USDC payments for AI agents on Base.
4
+
5
+ This is a thin Python wrapper that downloads the native `remit` binary on first use.
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ pip install remit-cli
11
+ ```
12
+
13
+ ## Usage
14
+
15
+ ```bash
16
+ remit --version
17
+ remit status
18
+ remit pay 0xRecipient 10.00
19
+ ```
20
+
21
+ For full documentation, see the [remit-cli repo](https://github.com/remit-md/remit-cli).
@@ -0,0 +1,25 @@
1
+ [build-system]
2
+ requires = ["setuptools>=68"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "remit-cli"
7
+ version = "0.5.6"
8
+ description = "CLI for the Remit payment protocol — USDC payments for AI agents"
9
+ license = "MIT"
10
+ readme = "README.md"
11
+ requires-python = ">=3.10"
12
+ keywords = ["usdc", "payments", "agents", "base", "blockchain"]
13
+ classifiers = [
14
+ "Development Status :: 4 - Beta",
15
+ "Intended Audience :: Developers",
16
+ "Programming Language :: Python :: 3",
17
+ "Topic :: Office/Business :: Financial",
18
+ ]
19
+
20
+ [project.urls]
21
+ Homepage = "https://remit.md"
22
+ Repository = "https://github.com/remit-md/remit-cli"
23
+
24
+ [project.scripts]
25
+ remit = "remit_cli.__main__:main"
@@ -0,0 +1,3 @@
1
+ """Remit CLI — USDC payment protocol CLI for AI agents."""
2
+
3
+ __version__ = "0.5.6"
@@ -0,0 +1,130 @@
1
+ """Entry point for `remit` command installed via pip."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import os
6
+ import platform
7
+ import shutil
8
+ import stat
9
+ import subprocess
10
+ import sys
11
+ import tarfile
12
+ import tempfile
13
+ import urllib.request
14
+ import zipfile
15
+ from io import BytesIO
16
+ from pathlib import Path
17
+
18
+ from remit_cli import __version__
19
+
20
+ TARGETS = {
21
+ ("Linux", "x86_64"): "x86_64-unknown-linux-musl",
22
+ ("Linux", "aarch64"): "aarch64-unknown-linux-musl",
23
+ ("Darwin", "x86_64"): "x86_64-apple-darwin",
24
+ ("Darwin", "arm64"): "aarch64-apple-darwin",
25
+ ("Windows", "AMD64"): "x86_64-pc-windows-msvc",
26
+ }
27
+
28
+
29
+ def _bin_dir() -> Path:
30
+ """Directory where the remit binary is cached."""
31
+ return Path.home() / ".remit" / "bin"
32
+
33
+
34
+ def _bin_path() -> Path:
35
+ name = "remit.exe" if sys.platform == "win32" else "remit"
36
+ return _bin_dir() / name
37
+
38
+
39
+ def _get_target() -> str:
40
+ key = (platform.system(), platform.machine())
41
+ target = TARGETS.get(key)
42
+ if not target:
43
+ print(
44
+ f"Unsupported platform: {key[0]}-{key[1]}\n"
45
+ "Download manually from https://github.com/remit-md/remit-cli/releases",
46
+ file=sys.stderr,
47
+ )
48
+ sys.exit(1)
49
+ return target
50
+
51
+
52
+ def _download(url: str) -> bytes:
53
+ """Download with redirect following."""
54
+ req = urllib.request.Request(url, headers={"User-Agent": "remit-cli-pypi"})
55
+ with urllib.request.urlopen(req, timeout=60) as resp:
56
+ return resp.read()
57
+
58
+
59
+ def _ensure_binary() -> Path:
60
+ bin_path = _bin_path()
61
+
62
+ # Check if cached binary matches current version
63
+ if bin_path.exists():
64
+ try:
65
+ result = subprocess.run(
66
+ [str(bin_path), "--version"],
67
+ capture_output=True,
68
+ text=True,
69
+ timeout=5,
70
+ )
71
+ if __version__ in result.stdout:
72
+ return bin_path
73
+ except (subprocess.TimeoutExpired, OSError):
74
+ pass # Binary broken — re-download
75
+
76
+ target = _get_target()
77
+ ext = "zip" if sys.platform == "win32" else "tar.gz"
78
+ url = (
79
+ f"https://github.com/remit-md/remit-cli/releases/download/"
80
+ f"v{__version__}/remit-{target}.{ext}"
81
+ )
82
+
83
+ print(
84
+ f"Downloading remit v{__version__} for {platform.system()}-{platform.machine()}...",
85
+ file=sys.stderr,
86
+ )
87
+ data = _download(url)
88
+
89
+ bin_dir = _bin_dir()
90
+ bin_dir.mkdir(parents=True, exist_ok=True)
91
+
92
+ if ext == "tar.gz":
93
+ with tarfile.open(fileobj=BytesIO(data), mode="r:gz") as tar:
94
+ for member in tar.getmembers():
95
+ if Path(member.name).name == "remit":
96
+ f = tar.extractfile(member)
97
+ if f is None:
98
+ raise RuntimeError("Failed to extract remit from tar.gz")
99
+ bin_path.write_bytes(f.read())
100
+ break
101
+ else:
102
+ raise RuntimeError("Archive does not contain 'remit' binary")
103
+ else:
104
+ with zipfile.ZipFile(BytesIO(data)) as zf:
105
+ for name in zf.namelist():
106
+ if Path(name).name in ("remit.exe", "remit"):
107
+ bin_path.write_bytes(zf.read(name))
108
+ break
109
+ else:
110
+ raise RuntimeError("Archive does not contain 'remit.exe' binary")
111
+
112
+ # Set executable on Unix
113
+ if sys.platform != "win32":
114
+ bin_path.chmod(bin_path.stat().st_mode | stat.S_IEXEC | stat.S_IXGRP | stat.S_IXOTH)
115
+
116
+ print(f"Installed remit v{__version__} to {bin_path}", file=sys.stderr)
117
+ return bin_path
118
+
119
+
120
+ def main() -> None:
121
+ binary = _ensure_binary()
122
+ try:
123
+ result = subprocess.run([str(binary)] + sys.argv[1:])
124
+ sys.exit(result.returncode)
125
+ except KeyboardInterrupt:
126
+ sys.exit(130)
127
+
128
+
129
+ if __name__ == "__main__":
130
+ main()
@@ -0,0 +1,36 @@
1
+ Metadata-Version: 2.4
2
+ Name: remit-cli
3
+ Version: 0.5.6
4
+ Summary: CLI for the Remit payment protocol — USDC payments for AI agents
5
+ License-Expression: MIT
6
+ Project-URL: Homepage, https://remit.md
7
+ Project-URL: Repository, https://github.com/remit-md/remit-cli
8
+ Keywords: usdc,payments,agents,base,blockchain
9
+ Classifier: Development Status :: 4 - Beta
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Topic :: Office/Business :: Financial
13
+ Requires-Python: >=3.10
14
+ Description-Content-Type: text/markdown
15
+
16
+ # remit-cli
17
+
18
+ CLI for the [Remit](https://remit.md) payment protocol — USDC payments for AI agents on Base.
19
+
20
+ This is a thin Python wrapper that downloads the native `remit` binary on first use.
21
+
22
+ ## Install
23
+
24
+ ```bash
25
+ pip install remit-cli
26
+ ```
27
+
28
+ ## Usage
29
+
30
+ ```bash
31
+ remit --version
32
+ remit status
33
+ remit pay 0xRecipient 10.00
34
+ ```
35
+
36
+ For full documentation, see the [remit-cli repo](https://github.com/remit-md/remit-cli).
@@ -0,0 +1,9 @@
1
+ README.md
2
+ pyproject.toml
3
+ remit_cli/__init__.py
4
+ remit_cli/__main__.py
5
+ remit_cli.egg-info/PKG-INFO
6
+ remit_cli.egg-info/SOURCES.txt
7
+ remit_cli.egg-info/dependency_links.txt
8
+ remit_cli.egg-info/entry_points.txt
9
+ remit_cli.egg-info/top_level.txt
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ remit = remit_cli.__main__:main
@@ -0,0 +1 @@
1
+ remit_cli
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+