claudectx-py 1.1.2__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,77 @@
1
+ Metadata-Version: 2.4
2
+ Name: claudectx-py
3
+ Version: 1.1.2
4
+ Summary: Python wrapper for claudectx — reduce Claude Code token usage by up to 80%
5
+ License: MIT
6
+ Project-URL: Homepage, https://github.com/Horilla/claudectx
7
+ Project-URL: Repository, https://github.com/Horilla/claudectx-py
8
+ Project-URL: Bug Tracker, https://github.com/Horilla/claudectx/issues
9
+ Keywords: claude,claude-code,tokens,anthropic,ai,llm
10
+ Classifier: Development Status :: 5 - Production/Stable
11
+ Classifier: Environment :: Console
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: License :: OSI Approved :: MIT 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: Topic :: Software Development :: Libraries :: Python Modules
21
+ Classifier: Topic :: Utilities
22
+ Requires-Python: >=3.8
23
+ Description-Content-Type: text/markdown
24
+
25
+ # claudectx-py
26
+
27
+ Python wrapper for [claudectx](https://github.com/Horilla/claudectx) — reduce Claude Code token usage by up to 80%.
28
+
29
+ ## Install
30
+
31
+ ```bash
32
+ pip install claudectx-py
33
+ ```
34
+
35
+ This installs the `claudectx` command into your Python environment's PATH. The wrapper delegates to the underlying npm package, which must be installed separately:
36
+
37
+ ```bash
38
+ npm install -g claudectx
39
+ # or
40
+ brew tap Horilla/claudectx && brew install claudectx
41
+ ```
42
+
43
+ ## Usage
44
+
45
+ Once both are installed, use `claudectx` exactly as you would from npm:
46
+
47
+ ```bash
48
+ claudectx analyze # Token breakdown per context component
49
+ claudectx optimize --apply # Auto-fix all token waste
50
+ claudectx report # 7-day usage analytics
51
+ claudectx watch # Live token dashboard
52
+ claudectx budget "src/**/*.py" # Estimate cost before a big task
53
+ claudectx warmup # Pre-warm the Anthropic prompt cache
54
+ claudectx drift # Find stale CLAUDE.md references
55
+ claudectx compress # Compress session into MEMORY.md
56
+ claudectx teams export # Export usage for team cost reporting
57
+ ```
58
+
59
+ ## Why a Python wrapper?
60
+
61
+ If your team uses Python-based tooling (pyenv, pip, Poetry, uv), this lets you add `claudectx` as a project dependency in `pyproject.toml` alongside your other dev tools — no separate npm install step in your CI.
62
+
63
+ ```toml
64
+ [tool.poetry.dev-dependencies]
65
+ claudectx-py = "^1.1.2"
66
+ ```
67
+
68
+ The wrapper is intentionally thin: it locates the `claudectx` binary on PATH and delegates all arguments to it. No logic is duplicated.
69
+
70
+ ## Requirements
71
+
72
+ - Python 3.8+
73
+ - Node.js 18+ with `claudectx` installed globally (`npm install -g claudectx`)
74
+
75
+ ## License
76
+
77
+ MIT — see [claudectx LICENSE](https://github.com/Horilla/claudectx/blob/master/LICENSE)
@@ -0,0 +1,53 @@
1
+ # claudectx-py
2
+
3
+ Python wrapper for [claudectx](https://github.com/Horilla/claudectx) — reduce Claude Code token usage by up to 80%.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ pip install claudectx-py
9
+ ```
10
+
11
+ This installs the `claudectx` command into your Python environment's PATH. The wrapper delegates to the underlying npm package, which must be installed separately:
12
+
13
+ ```bash
14
+ npm install -g claudectx
15
+ # or
16
+ brew tap Horilla/claudectx && brew install claudectx
17
+ ```
18
+
19
+ ## Usage
20
+
21
+ Once both are installed, use `claudectx` exactly as you would from npm:
22
+
23
+ ```bash
24
+ claudectx analyze # Token breakdown per context component
25
+ claudectx optimize --apply # Auto-fix all token waste
26
+ claudectx report # 7-day usage analytics
27
+ claudectx watch # Live token dashboard
28
+ claudectx budget "src/**/*.py" # Estimate cost before a big task
29
+ claudectx warmup # Pre-warm the Anthropic prompt cache
30
+ claudectx drift # Find stale CLAUDE.md references
31
+ claudectx compress # Compress session into MEMORY.md
32
+ claudectx teams export # Export usage for team cost reporting
33
+ ```
34
+
35
+ ## Why a Python wrapper?
36
+
37
+ If your team uses Python-based tooling (pyenv, pip, Poetry, uv), this lets you add `claudectx` as a project dependency in `pyproject.toml` alongside your other dev tools — no separate npm install step in your CI.
38
+
39
+ ```toml
40
+ [tool.poetry.dev-dependencies]
41
+ claudectx-py = "^1.1.2"
42
+ ```
43
+
44
+ The wrapper is intentionally thin: it locates the `claudectx` binary on PATH and delegates all arguments to it. No logic is duplicated.
45
+
46
+ ## Requirements
47
+
48
+ - Python 3.8+
49
+ - Node.js 18+ with `claudectx` installed globally (`npm install -g claudectx`)
50
+
51
+ ## License
52
+
53
+ MIT — see [claudectx LICENSE](https://github.com/Horilla/claudectx/blob/master/LICENSE)
@@ -0,0 +1,37 @@
1
+ [build-system]
2
+ requires = ["setuptools>=68", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "claudectx-py"
7
+ version = "1.1.2"
8
+ description = "Python wrapper for claudectx — reduce Claude Code token usage by up to 80%"
9
+ readme = "README.md"
10
+ license = { text = "MIT" }
11
+ requires-python = ">=3.8"
12
+ keywords = ["claude", "claude-code", "tokens", "anthropic", "ai", "llm"]
13
+ classifiers = [
14
+ "Development Status :: 5 - Production/Stable",
15
+ "Environment :: Console",
16
+ "Intended Audience :: Developers",
17
+ "License :: OSI Approved :: MIT License",
18
+ "Programming Language :: Python :: 3",
19
+ "Programming Language :: Python :: 3.8",
20
+ "Programming Language :: Python :: 3.9",
21
+ "Programming Language :: Python :: 3.10",
22
+ "Programming Language :: Python :: 3.11",
23
+ "Programming Language :: Python :: 3.12",
24
+ "Topic :: Software Development :: Libraries :: Python Modules",
25
+ "Topic :: Utilities",
26
+ ]
27
+
28
+ [project.urls]
29
+ Homepage = "https://github.com/Horilla/claudectx"
30
+ Repository = "https://github.com/Horilla/claudectx-py"
31
+ "Bug Tracker" = "https://github.com/Horilla/claudectx/issues"
32
+
33
+ [project.scripts]
34
+ claudectx = "claudectx_py:main"
35
+
36
+ [tool.setuptools.packages.find]
37
+ where = ["src"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,55 @@
1
+ """
2
+ claudectx-py — Python wrapper for the claudectx CLI.
3
+
4
+ Delegates all commands to the `claudectx` npm package.
5
+ Install the npm package first: npm install -g claudectx
6
+ Or install via Homebrew: brew install Horilla/claudectx/claudectx
7
+ """
8
+ from __future__ import annotations
9
+
10
+ import shutil
11
+ import subprocess
12
+ import sys
13
+
14
+ __version__ = "1.1.2"
15
+
16
+ NPM_PACKAGE = "claudectx"
17
+ NPM_VERSION = "1.1.2"
18
+
19
+ _INSTALL_HINT = (
20
+ "\nclaudectx is not installed. Install it with:\n"
21
+ " npm install -g claudectx\n"
22
+ " # or via Homebrew:\n"
23
+ " brew tap Horilla/claudectx && brew install claudectx\n"
24
+ )
25
+
26
+
27
+ def _find_binary() -> str | None:
28
+ """Return the path to the claudectx binary, or None if not found."""
29
+ return shutil.which("claudectx")
30
+
31
+
32
+ def _ensure_installed() -> str:
33
+ """Return the binary path, or print a hint and exit."""
34
+ binary = _find_binary()
35
+ if binary is None:
36
+ sys.stderr.write(_INSTALL_HINT)
37
+ sys.exit(1)
38
+ return binary
39
+
40
+
41
+ def run(args: list[str]) -> int:
42
+ """
43
+ Run claudectx with the given arguments.
44
+ Returns the exit code.
45
+ """
46
+ binary = _ensure_installed()
47
+ result = subprocess.run([binary, *args])
48
+ return result.returncode
49
+
50
+
51
+ def main() -> None:
52
+ """Entry point for the `claudectx` CLI command installed by pip."""
53
+ # Strip the script name (argv[0]) and forward everything else
54
+ exit_code = run(sys.argv[1:])
55
+ sys.exit(exit_code)
@@ -0,0 +1,77 @@
1
+ Metadata-Version: 2.4
2
+ Name: claudectx-py
3
+ Version: 1.1.2
4
+ Summary: Python wrapper for claudectx — reduce Claude Code token usage by up to 80%
5
+ License: MIT
6
+ Project-URL: Homepage, https://github.com/Horilla/claudectx
7
+ Project-URL: Repository, https://github.com/Horilla/claudectx-py
8
+ Project-URL: Bug Tracker, https://github.com/Horilla/claudectx/issues
9
+ Keywords: claude,claude-code,tokens,anthropic,ai,llm
10
+ Classifier: Development Status :: 5 - Production/Stable
11
+ Classifier: Environment :: Console
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: License :: OSI Approved :: MIT 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: Topic :: Software Development :: Libraries :: Python Modules
21
+ Classifier: Topic :: Utilities
22
+ Requires-Python: >=3.8
23
+ Description-Content-Type: text/markdown
24
+
25
+ # claudectx-py
26
+
27
+ Python wrapper for [claudectx](https://github.com/Horilla/claudectx) — reduce Claude Code token usage by up to 80%.
28
+
29
+ ## Install
30
+
31
+ ```bash
32
+ pip install claudectx-py
33
+ ```
34
+
35
+ This installs the `claudectx` command into your Python environment's PATH. The wrapper delegates to the underlying npm package, which must be installed separately:
36
+
37
+ ```bash
38
+ npm install -g claudectx
39
+ # or
40
+ brew tap Horilla/claudectx && brew install claudectx
41
+ ```
42
+
43
+ ## Usage
44
+
45
+ Once both are installed, use `claudectx` exactly as you would from npm:
46
+
47
+ ```bash
48
+ claudectx analyze # Token breakdown per context component
49
+ claudectx optimize --apply # Auto-fix all token waste
50
+ claudectx report # 7-day usage analytics
51
+ claudectx watch # Live token dashboard
52
+ claudectx budget "src/**/*.py" # Estimate cost before a big task
53
+ claudectx warmup # Pre-warm the Anthropic prompt cache
54
+ claudectx drift # Find stale CLAUDE.md references
55
+ claudectx compress # Compress session into MEMORY.md
56
+ claudectx teams export # Export usage for team cost reporting
57
+ ```
58
+
59
+ ## Why a Python wrapper?
60
+
61
+ If your team uses Python-based tooling (pyenv, pip, Poetry, uv), this lets you add `claudectx` as a project dependency in `pyproject.toml` alongside your other dev tools — no separate npm install step in your CI.
62
+
63
+ ```toml
64
+ [tool.poetry.dev-dependencies]
65
+ claudectx-py = "^1.1.2"
66
+ ```
67
+
68
+ The wrapper is intentionally thin: it locates the `claudectx` binary on PATH and delegates all arguments to it. No logic is duplicated.
69
+
70
+ ## Requirements
71
+
72
+ - Python 3.8+
73
+ - Node.js 18+ with `claudectx` installed globally (`npm install -g claudectx`)
74
+
75
+ ## License
76
+
77
+ MIT — see [claudectx LICENSE](https://github.com/Horilla/claudectx/blob/master/LICENSE)
@@ -0,0 +1,8 @@
1
+ README.md
2
+ pyproject.toml
3
+ src/claudectx_py/__init__.py
4
+ src/claudectx_py.egg-info/PKG-INFO
5
+ src/claudectx_py.egg-info/SOURCES.txt
6
+ src/claudectx_py.egg-info/dependency_links.txt
7
+ src/claudectx_py.egg-info/entry_points.txt
8
+ src/claudectx_py.egg-info/top_level.txt
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ claudectx = claudectx_py:main
@@ -0,0 +1 @@
1
+ claudectx_py