tazavibe 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.
@@ -0,0 +1,11 @@
1
+ node_modules/
2
+ dist/
3
+ coverage/
4
+ *.log
5
+ .tazavibe-demo/
6
+ python/src/tazavibe/js/
7
+ python/src/tazavibe/landing/
8
+ python/dist/
9
+ __pycache__/
10
+ *.egg-info/
11
+ *.tgz
tazavibe-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 TazaVibe contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,30 @@
1
+ Metadata-Version: 2.5
2
+ Name: tazavibe
3
+ Version: 0.1.0
4
+ Summary: Keep your vibe taza: finds leaked API keys, cleans project and Docker junk, shows AI spend
5
+ License-Expression: MIT
6
+ License-File: LICENSE
7
+ Keywords: api-keys,cleaner,cli,docker,secrets,security,vibecoding
8
+ Classifier: Environment :: Console
9
+ Classifier: Intended Audience :: Developers
10
+ Classifier: Topic :: Security
11
+ Classifier: Topic :: Software Development
12
+ Requires-Python: >=3.9
13
+ Description-Content-Type: text/markdown
14
+
15
+ # TazaVibe (Python package)
16
+
17
+ Keep your vibe taza: finds leaked API keys in your projects and their git history,
18
+ cleans regenerable junk (node_modules, .venv, builds, Docker) and shows what you
19
+ spend on AI.
20
+
21
+ ```bash
22
+ pip install tazavibe # or: pipx install tazavibe / uvx tazavibe
23
+ taza # interactive mode
24
+ taza scan ~/projects # leaked keys report
25
+ taza clean ~/projects # junk report
26
+ taza costs ~/projects # Claude Code spend + paid services
27
+ ```
28
+
29
+ Requires **Node.js 22+** (the tool is written in TypeScript and shipped as one bundled
30
+ file; this package runs it). The same tool is on npm: `npx tazavibe`.
@@ -0,0 +1,16 @@
1
+ # TazaVibe (Python package)
2
+
3
+ Keep your vibe taza: finds leaked API keys in your projects and their git history,
4
+ cleans regenerable junk (node_modules, .venv, builds, Docker) and shows what you
5
+ spend on AI.
6
+
7
+ ```bash
8
+ pip install tazavibe # or: pipx install tazavibe / uvx tazavibe
9
+ taza # interactive mode
10
+ taza scan ~/projects # leaked keys report
11
+ taza clean ~/projects # junk report
12
+ taza costs ~/projects # Claude Code spend + paid services
13
+ ```
14
+
15
+ Requires **Node.js 22+** (the tool is written in TypeScript and shipped as one bundled
16
+ file; this package runs it). The same tool is on npm: `npx tazavibe`.
@@ -0,0 +1,31 @@
1
+ [build-system]
2
+ requires = ["hatchling>=1.27"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "tazavibe"
7
+ version = "0.1.0"
8
+ description = "Keep your vibe taza: finds leaked API keys, cleans project and Docker junk, shows AI spend"
9
+ readme = "README.md"
10
+ requires-python = ">=3.9"
11
+ license = "MIT"
12
+ keywords = ["secrets", "api-keys", "security", "vibecoding", "cli", "cleaner", "docker"]
13
+ classifiers = [
14
+ "Environment :: Console",
15
+ "Intended Audience :: Developers",
16
+ "Topic :: Security",
17
+ "Topic :: Software Development",
18
+ ]
19
+ dependencies = []
20
+
21
+ [project.scripts]
22
+ tazavibe = "tazavibe.cli:main"
23
+ taza = "tazavibe.cli:main"
24
+
25
+ [tool.hatch.build.targets.wheel]
26
+ packages = ["src/tazavibe"]
27
+ # The JS bundle is generated (npm run build:py) and git-ignored, so include it explicitly.
28
+ artifacts = ["src/tazavibe/js/*.mjs", "src/tazavibe/landing/**"]
29
+
30
+ [tool.hatch.build.targets.sdist]
31
+ artifacts = ["src/tazavibe/js/*.mjs", "src/tazavibe/landing/**"]
@@ -0,0 +1,7 @@
1
+ """TazaVibe: keep your vibe taza.
2
+
3
+ The tool itself is written in TypeScript and shipped here as a single bundled
4
+ JavaScript file; this package finds Node.js and runs it.
5
+ """
6
+
7
+ __version__ = "0.1.0"
@@ -0,0 +1,3 @@
1
+ from tazavibe.cli import main
2
+
3
+ raise SystemExit(main())
@@ -0,0 +1,149 @@
1
+ """Runs the bundled TazaVibe CLI with the system Node.js.
2
+
3
+ All arguments, stdin/stdout/stderr and the terminal are passed through unchanged,
4
+ so the interactive mode works exactly as with `npx tazavibe`.
5
+ """
6
+
7
+ from __future__ import annotations
8
+
9
+ import locale
10
+ import os
11
+ import subprocess
12
+ import sys
13
+ from pathlib import Path
14
+ from typing import List, Optional, Sequence
15
+
16
+ MIN_NODE_MAJOR = 22
17
+ BUNDLE = Path(__file__).resolve().parent / "js" / "tazavibe.mjs"
18
+
19
+ MESSAGES = {
20
+ "ru": {
21
+ "no_node": (
22
+ "TazaVibe нужен Node.js {min}+, но команда `node` не найдена.\n"
23
+ "Установи Node.js: https://nodejs.org (LTS) и запусти снова.\n"
24
+ "Или укажи путь: переменная окружения TAZAVIBE_NODE=/путь/к/node"
25
+ ),
26
+ "old_node": "TazaVibe нужен Node.js {min}+, а найден {found} ({path}). Обнови Node.js: https://nodejs.org",
27
+ "no_bundle": (
28
+ "Не найден файл программы {path}.\n"
29
+ "Если ставишь из исходников, сначала собери его: npm install && npm run build:py"
30
+ ),
31
+ },
32
+ "en": {
33
+ "no_node": (
34
+ "TazaVibe needs Node.js {min}+, but the `node` command was not found.\n"
35
+ "Install Node.js from https://nodejs.org (LTS) and run again.\n"
36
+ "Or point to it: TAZAVIBE_NODE=/path/to/node"
37
+ ),
38
+ "old_node": "TazaVibe needs Node.js {min}+, found {found} ({path}). Update Node.js: https://nodejs.org",
39
+ "no_bundle": (
40
+ "Program file not found: {path}.\n"
41
+ "Installing from source? Build it first: npm install && npm run build:py"
42
+ ),
43
+ },
44
+ }
45
+
46
+
47
+ def _lang(argv: Sequence[str]) -> str:
48
+ """Same rule as the JS side: --lang, then TAZA_LANG, LC_ALL, LANG, then the OS locale."""
49
+ for i, a in enumerate(argv):
50
+ if a == "--lang" and i + 1 < len(argv):
51
+ return "ru" if argv[i + 1].lower().startswith(("ru", "kk")) else "en"
52
+ if a.startswith("--lang="):
53
+ return "ru" if a.split("=", 1)[1].lower().startswith(("ru", "kk")) else "en"
54
+ candidates = [os.environ.get("TAZA_LANG"), os.environ.get("LC_ALL"), os.environ.get("LANG")]
55
+ try:
56
+ candidates.append(locale.getlocale()[0])
57
+ except ValueError:
58
+ pass
59
+ for value in candidates:
60
+ if value:
61
+ low = value.lower()
62
+ if low.startswith(("ru", "kk", "russian", "kazakh")):
63
+ return "ru"
64
+ if low.startswith(("en", "english")):
65
+ return "en"
66
+ return "en"
67
+
68
+
69
+ def _say(lang: str, key: str, **kwargs: object) -> None:
70
+ # On Windows, Python writes stderr in the ANSI code page (cp1251) unless it is a real console,
71
+ # which garbles Russian text in Git Bash / Windows Terminal pipes. Node always writes UTF-8,
72
+ # so match it.
73
+ reconfigure = getattr(sys.stderr, "reconfigure", None)
74
+ if reconfigure and (sys.stderr.encoding or "").lower().replace("-", "") != "utf8":
75
+ try:
76
+ reconfigure(encoding="utf-8", errors="replace")
77
+ except (ValueError, OSError):
78
+ pass
79
+ print(MESSAGES[lang][key].format(min=MIN_NODE_MAJOR, **kwargs), file=sys.stderr)
80
+
81
+
82
+ def find_node() -> Optional[str]:
83
+ """Node from PATH, never from the current directory.
84
+
85
+ On Windows, shutil.which looks in the current folder first, so running `taza` inside a
86
+ downloaded project that ships a `node.bat` would execute it (found in review).
87
+ """
88
+ explicit = os.environ.get("TAZAVIBE_NODE")
89
+ if explicit:
90
+ return explicit if Path(explicit).is_file() else None
91
+ cwd = Path.cwd().resolve()
92
+ exts = [""]
93
+ if os.name == "nt":
94
+ exts = [e.lower() for e in os.environ.get("PATHEXT", ".EXE").split(os.pathsep) if e] or [".exe"]
95
+ for entry in os.environ.get("PATH", "").split(os.pathsep):
96
+ if not entry or entry == ".":
97
+ continue
98
+ try:
99
+ folder = Path(entry).resolve()
100
+ except OSError:
101
+ continue
102
+ if folder == cwd:
103
+ continue
104
+ for ext in exts:
105
+ candidate = folder / f"node{ext}"
106
+ if candidate.is_file() and os.access(candidate, os.X_OK):
107
+ return str(candidate)
108
+ return None
109
+
110
+
111
+ def node_major(node: str) -> Optional[int]:
112
+ try:
113
+ out = subprocess.run(
114
+ [node, "-p", "process.versions.node"], capture_output=True, text=True, timeout=20, check=False
115
+ )
116
+ except (OSError, subprocess.SubprocessError):
117
+ return None
118
+ try:
119
+ return int(out.stdout.strip().split(".")[0])
120
+ except (ValueError, IndexError):
121
+ return None
122
+
123
+
124
+ def main(argv: Optional[List[str]] = None) -> int:
125
+ args = list(sys.argv[1:] if argv is None else argv)
126
+ lang = _lang(args)
127
+
128
+ if not BUNDLE.is_file():
129
+ _say(lang, "no_bundle", path=BUNDLE)
130
+ return 2
131
+
132
+ node = find_node()
133
+ if not node:
134
+ _say(lang, "no_node")
135
+ return 127
136
+ major = node_major(node)
137
+ if major is None or major < MIN_NODE_MAJOR:
138
+ _say(lang, "old_node", found=major if major is not None else "?", path=node)
139
+ return 127
140
+
141
+ try:
142
+ # No capture: the child shares this terminal, so the interactive UI and colours work.
143
+ return subprocess.call([node, str(BUNDLE), *args])
144
+ except KeyboardInterrupt:
145
+ return 130
146
+
147
+
148
+ if __name__ == "__main__":
149
+ raise SystemExit(main())