hammer-capsa 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.
- hammer_capsa-0.1.0/PKG-INFO +35 -0
- hammer_capsa-0.1.0/README.md +20 -0
- hammer_capsa-0.1.0/pyproject.toml +29 -0
- hammer_capsa-0.1.0/setup.cfg +4 -0
- hammer_capsa-0.1.0/src/capsa/__init__.py +3 -0
- hammer_capsa-0.1.0/src/capsa/__main__.py +5 -0
- hammer_capsa-0.1.0/src/capsa/cli.py +76 -0
- hammer_capsa-0.1.0/src/hammer_capsa.egg-info/PKG-INFO +35 -0
- hammer_capsa-0.1.0/src/hammer_capsa.egg-info/SOURCES.txt +10 -0
- hammer_capsa-0.1.0/src/hammer_capsa.egg-info/dependency_links.txt +1 -0
- hammer_capsa-0.1.0/src/hammer_capsa.egg-info/entry_points.txt +3 -0
- hammer_capsa-0.1.0/src/hammer_capsa.egg-info/top_level.txt +1 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: hammer-capsa
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Hammer Capsa: saves your Claude Code work before the tool deletes it. Your record, kept.
|
|
5
|
+
Author-email: HammerAI <michelinedlauzon@gmail.com>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://hammerai.ai/capsa
|
|
8
|
+
Keywords: claude,archive,record,ai,backup
|
|
9
|
+
Classifier: Intended Audience :: Developers
|
|
10
|
+
Classifier: Intended Audience :: Financial and Insurance Industry
|
|
11
|
+
Classifier: Operating System :: OS Independent
|
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Requires-Python: >=3.8
|
|
14
|
+
Description-Content-Type: text/markdown
|
|
15
|
+
|
|
16
|
+
# Hammer Capsa
|
|
17
|
+
|
|
18
|
+
**Your AI working record, kept.**
|
|
19
|
+
|
|
20
|
+
Claude Code keeps a record of your work with it, then deletes that record
|
|
21
|
+
after about 30 days. Capsa saves it before that happens.
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
pip3 install hammer-capsa
|
|
25
|
+
capsa
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Capsa copies your Claude Code records (`~/.claude/projects`) into
|
|
29
|
+
`~/HammerVault`, a folder nothing deletes. It only copies: it never modifies
|
|
30
|
+
or removes the originals, and it never sends anything anywhere. Run it once
|
|
31
|
+
a week; each run adds only what is new.
|
|
32
|
+
|
|
33
|
+
Named for the *capsa*, the Roman box that kept scrolls safe.
|
|
34
|
+
|
|
35
|
+
A [HammerAI](https://hammerai.ai) product.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Hammer Capsa
|
|
2
|
+
|
|
3
|
+
**Your AI working record, kept.**
|
|
4
|
+
|
|
5
|
+
Claude Code keeps a record of your work with it, then deletes that record
|
|
6
|
+
after about 30 days. Capsa saves it before that happens.
|
|
7
|
+
|
|
8
|
+
```
|
|
9
|
+
pip3 install hammer-capsa
|
|
10
|
+
capsa
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Capsa copies your Claude Code records (`~/.claude/projects`) into
|
|
14
|
+
`~/HammerVault`, a folder nothing deletes. It only copies: it never modifies
|
|
15
|
+
or removes the originals, and it never sends anything anywhere. Run it once
|
|
16
|
+
a week; each run adds only what is new.
|
|
17
|
+
|
|
18
|
+
Named for the *capsa*, the Roman box that kept scrolls safe.
|
|
19
|
+
|
|
20
|
+
A [HammerAI](https://hammerai.ai) product.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=68"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "hammer-capsa"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "Hammer Capsa: saves your Claude Code work before the tool deletes it. Your record, kept."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = "MIT"
|
|
11
|
+
requires-python = ">=3.8"
|
|
12
|
+
authors = [{ name = "HammerAI", email = "michelinedlauzon@gmail.com" }]
|
|
13
|
+
keywords = ["claude", "archive", "record", "ai", "backup"]
|
|
14
|
+
classifiers = [
|
|
15
|
+
"Intended Audience :: Developers",
|
|
16
|
+
"Intended Audience :: Financial and Insurance Industry",
|
|
17
|
+
"Operating System :: OS Independent",
|
|
18
|
+
"Programming Language :: Python :: 3",
|
|
19
|
+
]
|
|
20
|
+
|
|
21
|
+
[project.urls]
|
|
22
|
+
Homepage = "https://hammerai.ai/capsa"
|
|
23
|
+
|
|
24
|
+
[project.scripts]
|
|
25
|
+
capsa = "capsa.cli:main"
|
|
26
|
+
hammer-capsa = "capsa.cli:main"
|
|
27
|
+
|
|
28
|
+
[tool.setuptools.packages.find]
|
|
29
|
+
where = ["src"]
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"""Hammer Capsa — the Roman scroll box.
|
|
2
|
+
|
|
3
|
+
Copies your Claude Code working records (~/.claude/projects) into a folder
|
|
4
|
+
nothing deletes (~/HammerVault). Copy only: never modifies or removes the
|
|
5
|
+
originals, never sends anything anywhere. Run it weekly; it only adds what
|
|
6
|
+
is new.
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
import os
|
|
10
|
+
import shutil
|
|
11
|
+
import sys
|
|
12
|
+
|
|
13
|
+
from . import __version__
|
|
14
|
+
|
|
15
|
+
SOURCE = os.path.expanduser("~/.claude/projects")
|
|
16
|
+
VAULT = os.environ.get("HAMMER_VAULT", os.path.expanduser("~/HammerVault"))
|
|
17
|
+
DEST = os.path.join(VAULT, "claude_code")
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def _fmt_bytes(n):
|
|
21
|
+
for unit in ("B", "KB", "MB", "GB", "TB"):
|
|
22
|
+
if n < 1024 or unit == "TB":
|
|
23
|
+
return f"{n:.0f} {unit}" if unit == "B" else f"{n:.1f} {unit}"
|
|
24
|
+
n /= 1024
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def main():
|
|
28
|
+
print()
|
|
29
|
+
print(" HAMMER CAPSA v" + __version__)
|
|
30
|
+
print(" " + "=" * 14)
|
|
31
|
+
if not os.path.isdir(SOURCE):
|
|
32
|
+
print(" No Claude Code records found on this Mac")
|
|
33
|
+
print(" (looked in ~/.claude/projects). Nothing to save yet.")
|
|
34
|
+
print()
|
|
35
|
+
return 0
|
|
36
|
+
|
|
37
|
+
new_files = 0
|
|
38
|
+
for root, _dirs, files in os.walk(SOURCE):
|
|
39
|
+
rel_root = os.path.relpath(root, SOURCE)
|
|
40
|
+
dest_root = os.path.join(DEST, rel_root) if rel_root != "." else DEST
|
|
41
|
+
for name in files:
|
|
42
|
+
src = os.path.join(root, name)
|
|
43
|
+
dst = os.path.join(dest_root, name)
|
|
44
|
+
try:
|
|
45
|
+
s = os.stat(src)
|
|
46
|
+
if os.path.exists(dst):
|
|
47
|
+
d = os.stat(dst)
|
|
48
|
+
if d.st_size == s.st_size and d.st_mtime >= s.st_mtime:
|
|
49
|
+
continue # already saved, unchanged
|
|
50
|
+
os.makedirs(dest_root, exist_ok=True)
|
|
51
|
+
shutil.copy2(src, dst)
|
|
52
|
+
new_files += 1
|
|
53
|
+
except OSError:
|
|
54
|
+
continue # unreadable file: skip, never fail the run
|
|
55
|
+
|
|
56
|
+
total_files, total_bytes = 0, 0
|
|
57
|
+
for root, _dirs, files in os.walk(DEST):
|
|
58
|
+
for name in files:
|
|
59
|
+
try:
|
|
60
|
+
total_bytes += os.path.getsize(os.path.join(root, name))
|
|
61
|
+
total_files += 1
|
|
62
|
+
except OSError:
|
|
63
|
+
pass
|
|
64
|
+
|
|
65
|
+
print(f" Saved this run: {new_files} new file{'s' if new_files != 1 else ''}")
|
|
66
|
+
print(f" Total kept: {total_files} files ({_fmt_bytes(total_bytes)})")
|
|
67
|
+
print(f" Your record: {VAULT}")
|
|
68
|
+
print()
|
|
69
|
+
print(" Claude erases its own records after about 30 days.")
|
|
70
|
+
print(" Run `capsa` once a week to stay ahead of it.")
|
|
71
|
+
print()
|
|
72
|
+
return 0
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
if __name__ == "__main__":
|
|
76
|
+
sys.exit(main())
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: hammer-capsa
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Hammer Capsa: saves your Claude Code work before the tool deletes it. Your record, kept.
|
|
5
|
+
Author-email: HammerAI <michelinedlauzon@gmail.com>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://hammerai.ai/capsa
|
|
8
|
+
Keywords: claude,archive,record,ai,backup
|
|
9
|
+
Classifier: Intended Audience :: Developers
|
|
10
|
+
Classifier: Intended Audience :: Financial and Insurance Industry
|
|
11
|
+
Classifier: Operating System :: OS Independent
|
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Requires-Python: >=3.8
|
|
14
|
+
Description-Content-Type: text/markdown
|
|
15
|
+
|
|
16
|
+
# Hammer Capsa
|
|
17
|
+
|
|
18
|
+
**Your AI working record, kept.**
|
|
19
|
+
|
|
20
|
+
Claude Code keeps a record of your work with it, then deletes that record
|
|
21
|
+
after about 30 days. Capsa saves it before that happens.
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
pip3 install hammer-capsa
|
|
25
|
+
capsa
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Capsa copies your Claude Code records (`~/.claude/projects`) into
|
|
29
|
+
`~/HammerVault`, a folder nothing deletes. It only copies: it never modifies
|
|
30
|
+
or removes the originals, and it never sends anything anywhere. Run it once
|
|
31
|
+
a week; each run adds only what is new.
|
|
32
|
+
|
|
33
|
+
Named for the *capsa*, the Roman box that kept scrolls safe.
|
|
34
|
+
|
|
35
|
+
A [HammerAI](https://hammerai.ai) product.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
README.md
|
|
2
|
+
pyproject.toml
|
|
3
|
+
src/capsa/__init__.py
|
|
4
|
+
src/capsa/__main__.py
|
|
5
|
+
src/capsa/cli.py
|
|
6
|
+
src/hammer_capsa.egg-info/PKG-INFO
|
|
7
|
+
src/hammer_capsa.egg-info/SOURCES.txt
|
|
8
|
+
src/hammer_capsa.egg-info/dependency_links.txt
|
|
9
|
+
src/hammer_capsa.egg-info/entry_points.txt
|
|
10
|
+
src/hammer_capsa.egg-info/top_level.txt
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
capsa
|