pisama-claude-code 0.3.3__tar.gz → 0.3.4__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.
- {pisama_claude_code-0.3.3 → pisama_claude_code-0.3.4}/CHANGELOG.md +7 -1
- {pisama_claude_code-0.3.3 → pisama_claude_code-0.3.4}/PKG-INFO +1 -1
- pisama_claude_code-0.3.4/demo/README.md +78 -0
- pisama_claude_code-0.3.4/demo/demo-simulated.sh +131 -0
- pisama_claude_code-0.3.4/demo/record-demo.sh +82 -0
- {pisama_claude_code-0.3.3 → pisama_claude_code-0.3.4}/pyproject.toml +1 -1
- {pisama_claude_code-0.3.3 → pisama_claude_code-0.3.4}/src/pisama_claude_code/__init__.py +1 -1
- {pisama_claude_code-0.3.3 → pisama_claude_code-0.3.4}/src/pisama_claude_code/cli.py +2 -2
- {pisama_claude_code-0.3.3 → pisama_claude_code-0.3.4}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
- {pisama_claude_code-0.3.3 → pisama_claude_code-0.3.4}/.github/ISSUE_TEMPLATE/config.yml +0 -0
- {pisama_claude_code-0.3.3 → pisama_claude_code-0.3.4}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
- {pisama_claude_code-0.3.3 → pisama_claude_code-0.3.4}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {pisama_claude_code-0.3.3 → pisama_claude_code-0.3.4}/.github/workflows/ci.yml +0 -0
- {pisama_claude_code-0.3.3 → pisama_claude_code-0.3.4}/.github/workflows/publish.yml +0 -0
- {pisama_claude_code-0.3.3 → pisama_claude_code-0.3.4}/.gitignore +0 -0
- {pisama_claude_code-0.3.3 → pisama_claude_code-0.3.4}/CODE_OF_CONDUCT.md +0 -0
- {pisama_claude_code-0.3.3 → pisama_claude_code-0.3.4}/CONTRIBUTING.md +0 -0
- {pisama_claude_code-0.3.3 → pisama_claude_code-0.3.4}/LICENSE +0 -0
- {pisama_claude_code-0.3.3 → pisama_claude_code-0.3.4}/README.md +0 -0
- {pisama_claude_code-0.3.3 → pisama_claude_code-0.3.4}/SECURITY.md +0 -0
- {pisama_claude_code-0.3.3 → pisama_claude_code-0.3.4}/src/pisama_claude_code/adapter.py +0 -0
- {pisama_claude_code-0.3.3 → pisama_claude_code-0.3.4}/src/pisama_claude_code/guardian.py +0 -0
- {pisama_claude_code-0.3.3 → pisama_claude_code-0.3.4}/src/pisama_claude_code/hooks/__init__.py +0 -0
- {pisama_claude_code-0.3.3 → pisama_claude_code-0.3.4}/src/pisama_claude_code/hooks/capture_hook.py +0 -0
- {pisama_claude_code-0.3.3 → pisama_claude_code-0.3.4}/src/pisama_claude_code/hooks/guardian_hook.py +0 -0
- {pisama_claude_code-0.3.3 → pisama_claude_code-0.3.4}/src/pisama_claude_code/install.py +0 -0
- {pisama_claude_code-0.3.3 → pisama_claude_code-0.3.4}/src/pisama_claude_code/py.typed +0 -0
- {pisama_claude_code-0.3.3 → pisama_claude_code-0.3.4}/src/pisama_claude_code/storage.py +0 -0
- {pisama_claude_code-0.3.3 → pisama_claude_code-0.3.4}/src/pisama_claude_code/trace_converter.py +0 -0
- {pisama_claude_code-0.3.3 → pisama_claude_code-0.3.4}/src/pisama_claude_code/trace_types.py +0 -0
- {pisama_claude_code-0.3.3 → pisama_claude_code-0.3.4}/tests/__init__.py +0 -0
- {pisama_claude_code-0.3.3 → pisama_claude_code-0.3.4}/tests/conftest.py +0 -0
- {pisama_claude_code-0.3.3 → pisama_claude_code-0.3.4}/tests/test_adapter.py +0 -0
- {pisama_claude_code-0.3.3 → pisama_claude_code-0.3.4}/tests/test_cli.py +0 -0
- {pisama_claude_code-0.3.3 → pisama_claude_code-0.3.4}/tests/test_guardian.py +0 -0
- {pisama_claude_code-0.3.3 → pisama_claude_code-0.3.4}/tests/test_storage.py +0 -0
|
@@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.3.4] - 2025-01-05
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
- Version string in CLI now matches package version
|
|
14
|
+
|
|
10
15
|
## [0.3.3] - 2025-01-04
|
|
11
16
|
|
|
12
17
|
### Added
|
|
@@ -79,7 +84,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
79
84
|
- Support for Bash, Read, Write, Edit, Grep, Glob tools
|
|
80
85
|
- Local storage in `~/.claude/pisama/traces/`
|
|
81
86
|
|
|
82
|
-
[Unreleased]: https://github.com/tn-pisama/pisama-claude-code/compare/v0.3.
|
|
87
|
+
[Unreleased]: https://github.com/tn-pisama/pisama-claude-code/compare/v0.3.4...HEAD
|
|
88
|
+
[0.3.4]: https://github.com/tn-pisama/pisama-claude-code/compare/v0.3.3...v0.3.4
|
|
83
89
|
[0.3.3]: https://github.com/tn-pisama/pisama-claude-code/compare/v0.3.2...v0.3.3
|
|
84
90
|
[0.3.2]: https://github.com/tn-pisama/pisama-claude-code/compare/v0.3.1...v0.3.2
|
|
85
91
|
[0.3.1]: https://github.com/tn-pisama/pisama-claude-code/compare/v0.3.0...v0.3.1
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pisama-claude-code
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.4
|
|
4
4
|
Summary: Trace capture for Claude Code sessions - sync to PISAMA platform for analysis
|
|
5
5
|
Project-URL: Homepage, https://pisama.dev
|
|
6
6
|
Project-URL: Documentation, https://pisama.dev/docs/claude-code
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# Demo Recording
|
|
2
|
+
|
|
3
|
+
Scripts to create a GIF demo for the README.
|
|
4
|
+
|
|
5
|
+
## Quick Start (Recommended)
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
# Install asciinema and agg (ASCII to GIF)
|
|
9
|
+
brew install asciinema
|
|
10
|
+
cargo install --git https://github.com/asciinema/agg
|
|
11
|
+
|
|
12
|
+
# Record the simulated demo
|
|
13
|
+
cd demo
|
|
14
|
+
chmod +x demo-simulated.sh
|
|
15
|
+
asciinema rec demo.cast -c ./demo-simulated.sh
|
|
16
|
+
|
|
17
|
+
# Convert to GIF
|
|
18
|
+
agg demo.cast ../assets/demo.gif \
|
|
19
|
+
--theme monokai \
|
|
20
|
+
--cols 70 \
|
|
21
|
+
--rows 28 \
|
|
22
|
+
--speed 1.2
|
|
23
|
+
|
|
24
|
+
# Or use gif-for-cli for smaller file size
|
|
25
|
+
# pip install gif-for-cli
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Files
|
|
29
|
+
|
|
30
|
+
| File | Purpose |
|
|
31
|
+
|------|---------|
|
|
32
|
+
| `demo-simulated.sh` | Pre-scripted demo with realistic output (use this) |
|
|
33
|
+
| `record-demo.sh` | Live demo using actual `pisama-cc` commands |
|
|
34
|
+
|
|
35
|
+
## Recording Tips
|
|
36
|
+
|
|
37
|
+
1. **Use simulated demo** - Consistent, reproducible output
|
|
38
|
+
2. **Terminal size** - Set to 70x28 before recording
|
|
39
|
+
3. **Clean terminal** - No distracting prompts or colors
|
|
40
|
+
4. **Speed** - 1.2x makes it watchable without being too fast
|
|
41
|
+
|
|
42
|
+
## Alternative: Terminalizer
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
npm install -g terminalizer
|
|
46
|
+
|
|
47
|
+
# Record
|
|
48
|
+
terminalizer record demo --config terminalizer.yml
|
|
49
|
+
|
|
50
|
+
# Render
|
|
51
|
+
terminalizer render demo -o demo.gif
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Alternative: VHS (by Charm)
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
brew install vhs
|
|
58
|
+
|
|
59
|
+
# Create a .tape file and run
|
|
60
|
+
vhs demo.tape
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## Adding to README
|
|
64
|
+
|
|
65
|
+
Once you have `demo.gif`, add to README.md:
|
|
66
|
+
|
|
67
|
+
```markdown
|
|
68
|
+
## Demo
|
|
69
|
+
|
|
70
|
+

|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Optimal GIF Settings
|
|
74
|
+
|
|
75
|
+
- **Width**: 600-800px (readable on GitHub)
|
|
76
|
+
- **FPS**: 10-15 (smaller file size)
|
|
77
|
+
- **Duration**: 15-25 seconds (attention span)
|
|
78
|
+
- **File size**: Under 5MB (GitHub displays inline)
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Simulated demo for GIF recording
|
|
3
|
+
# Shows realistic output without needing real traces
|
|
4
|
+
#
|
|
5
|
+
# Record with: asciinema rec demo.cast
|
|
6
|
+
# Convert with: agg demo.cast demo.gif --theme monokai --cols 80 --rows 24
|
|
7
|
+
|
|
8
|
+
set -e
|
|
9
|
+
|
|
10
|
+
# Typing effect
|
|
11
|
+
type_cmd() {
|
|
12
|
+
local cmd="$1"
|
|
13
|
+
printf '\033[0;32m$\033[0m '
|
|
14
|
+
for ((i=0; i<${#cmd}; i++)); do
|
|
15
|
+
printf '%s' "${cmd:$i:1}"
|
|
16
|
+
sleep 0.04
|
|
17
|
+
done
|
|
18
|
+
printf '\n'
|
|
19
|
+
sleep 0.2
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
pause() { sleep "${1:-1}"; }
|
|
23
|
+
|
|
24
|
+
clear
|
|
25
|
+
printf '\033[1;36m'
|
|
26
|
+
cat << 'EOF'
|
|
27
|
+
╔═══════════════════════════════════════════════════╗
|
|
28
|
+
║ pisama-claude-code ║
|
|
29
|
+
║ Track token costs for Claude Code sessions ║
|
|
30
|
+
╚═══════════════════════════════════════════════════╝
|
|
31
|
+
EOF
|
|
32
|
+
printf '\033[0m\n'
|
|
33
|
+
pause 2
|
|
34
|
+
|
|
35
|
+
# Install
|
|
36
|
+
printf '\033[1;33m# Install\033[0m\n'
|
|
37
|
+
type_cmd "pip install pisama-claude-code"
|
|
38
|
+
cat << 'EOF'
|
|
39
|
+
Successfully installed pisama-claude-code-0.3.2
|
|
40
|
+
EOF
|
|
41
|
+
pause 1.5
|
|
42
|
+
|
|
43
|
+
printf '\n\033[1;33m# Set up hooks\033[0m\n'
|
|
44
|
+
type_cmd "pisama-cc install"
|
|
45
|
+
cat << 'EOF'
|
|
46
|
+
✅ Installed pisama-capture.py
|
|
47
|
+
✅ Installed pisama-pre.sh
|
|
48
|
+
✅ Installed pisama-post.sh
|
|
49
|
+
✅ Updated ~/.claude/settings.local.json
|
|
50
|
+
|
|
51
|
+
Hooks installed! Traces will be captured automatically.
|
|
52
|
+
EOF
|
|
53
|
+
pause 2
|
|
54
|
+
|
|
55
|
+
printf '\n\033[1;33m# After a coding session, check status\033[0m\n'
|
|
56
|
+
type_cmd "pisama-cc status"
|
|
57
|
+
cat << 'EOF'
|
|
58
|
+
📊 PISAMA Status
|
|
59
|
+
========================================
|
|
60
|
+
|
|
61
|
+
🔧 Hook Installation:
|
|
62
|
+
✅ pisama-capture.py
|
|
63
|
+
✅ pisama-pre.sh
|
|
64
|
+
✅ pisama-post.sh
|
|
65
|
+
All hooks installed
|
|
66
|
+
|
|
67
|
+
🔗 Platform Connection:
|
|
68
|
+
❌ Not connected (local-only mode)
|
|
69
|
+
|
|
70
|
+
📁 Local Traces: 1,847
|
|
71
|
+
Input tokens: 142,580
|
|
72
|
+
Output tokens: 891,234
|
|
73
|
+
Total cost: $52.34
|
|
74
|
+
Models: claude-opus-4-5-20251101
|
|
75
|
+
|
|
76
|
+
📝 Claude Code Settings:
|
|
77
|
+
✅ PISAMA hooks configured in settings
|
|
78
|
+
EOF
|
|
79
|
+
pause 2.5
|
|
80
|
+
|
|
81
|
+
printf '\n\033[1;33m# View recent tool calls\033[0m\n'
|
|
82
|
+
type_cmd "pisama-cc traces -v --last 5"
|
|
83
|
+
cat << 'EOF'
|
|
84
|
+
📋 Recent Traces (5 shown)
|
|
85
|
+
======================================================================
|
|
86
|
+
2025-01-04T14:23:45 | Bash | a3f8c2d1 | post | 2341i 8923o | $0.7012
|
|
87
|
+
2025-01-04T14:23:38 | Read | a3f8c2d1 | post | 1823i 2341o | $0.1892
|
|
88
|
+
2025-01-04T14:23:31 | Edit | a3f8c2d1 | post | 3421i 12893o | $1.0234
|
|
89
|
+
2025-01-04T14:23:22 | Grep | a3f8c2d1 | post | 892i 1234o | $0.1023
|
|
90
|
+
2025-01-04T14:23:15 | Glob | a3f8c2d1 | post | 423i 891o | $0.0712
|
|
91
|
+
──────────────────────────────────────────────────────────────────────
|
|
92
|
+
Totals: 8,900 input + 26,282 output tokens = $2.0873
|
|
93
|
+
EOF
|
|
94
|
+
pause 2.5
|
|
95
|
+
|
|
96
|
+
printf '\n\033[1;33m# Detailed breakdown\033[0m\n'
|
|
97
|
+
type_cmd "pisama-cc usage --by-model --by-tool"
|
|
98
|
+
cat << 'EOF'
|
|
99
|
+
📊 Token Usage Summary (last 100 traces)
|
|
100
|
+
==================================================
|
|
101
|
+
Input tokens: 142,580
|
|
102
|
+
Output tokens: 891,234
|
|
103
|
+
Cache read tokens: 1,234,567
|
|
104
|
+
Total tokens: 1,033,814
|
|
105
|
+
Total cost: $ 52.34
|
|
106
|
+
|
|
107
|
+
📈 By Model:
|
|
108
|
+
--------------------------------------------------
|
|
109
|
+
claude-opus-4-5-20251101 $52.34
|
|
110
|
+
|
|
111
|
+
🔧 By Tool:
|
|
112
|
+
--------------------------------------------------
|
|
113
|
+
Bash 145 calls $23.45
|
|
114
|
+
Read 89 calls $12.34
|
|
115
|
+
Edit 67 calls $8.92
|
|
116
|
+
Write 34 calls $4.21
|
|
117
|
+
Grep 23 calls $2.12
|
|
118
|
+
Glob 12 calls $1.30
|
|
119
|
+
EOF
|
|
120
|
+
pause 2
|
|
121
|
+
|
|
122
|
+
printf '\n\033[1;36m'
|
|
123
|
+
cat << 'EOF'
|
|
124
|
+
════════════════════════════════════════════════════
|
|
125
|
+
✓ Track every token. Know your costs.
|
|
126
|
+
|
|
127
|
+
pip install pisama-claude-code
|
|
128
|
+
════════════════════════════════════════════════════
|
|
129
|
+
EOF
|
|
130
|
+
printf '\033[0m'
|
|
131
|
+
pause 3
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Demo recording script for pisama-claude-code
|
|
3
|
+
#
|
|
4
|
+
# Recording options:
|
|
5
|
+
# 1. asciinema (recommended): asciinema rec demo.cast
|
|
6
|
+
# 2. terminalizer: terminalizer record demo
|
|
7
|
+
# 3. ttygif: script + ttyrec + ttygif
|
|
8
|
+
#
|
|
9
|
+
# Then convert to GIF:
|
|
10
|
+
# asciinema: agg demo.cast demo.gif --theme monokai
|
|
11
|
+
# terminalizer: terminalizer render demo -o demo.gif
|
|
12
|
+
|
|
13
|
+
set -e
|
|
14
|
+
|
|
15
|
+
# Colors
|
|
16
|
+
GREEN='\033[0;32m'
|
|
17
|
+
BLUE='\033[0;34m'
|
|
18
|
+
YELLOW='\033[1;33m'
|
|
19
|
+
NC='\033[0m' # No Color
|
|
20
|
+
|
|
21
|
+
# Typing effect - simulates human typing
|
|
22
|
+
type_cmd() {
|
|
23
|
+
local cmd="$1"
|
|
24
|
+
echo -ne "${GREEN}\$${NC} "
|
|
25
|
+
for ((i=0; i<${#cmd}; i++)); do
|
|
26
|
+
echo -n "${cmd:$i:1}"
|
|
27
|
+
sleep 0.05
|
|
28
|
+
done
|
|
29
|
+
echo ""
|
|
30
|
+
sleep 0.3
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
# Run command with typing effect
|
|
34
|
+
run_cmd() {
|
|
35
|
+
type_cmd "$1"
|
|
36
|
+
eval "$1"
|
|
37
|
+
sleep 1.5
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
# Clear and set title
|
|
41
|
+
clear
|
|
42
|
+
echo -e "${BLUE}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}"
|
|
43
|
+
echo -e "${BLUE} pisama-claude-code - Track Claude Code costs${NC}"
|
|
44
|
+
echo -e "${BLUE}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}"
|
|
45
|
+
echo ""
|
|
46
|
+
sleep 2
|
|
47
|
+
|
|
48
|
+
# Step 1: Install
|
|
49
|
+
echo -e "${YELLOW}# Install the package${NC}"
|
|
50
|
+
sleep 1
|
|
51
|
+
run_cmd "pip install pisama-claude-code"
|
|
52
|
+
echo ""
|
|
53
|
+
|
|
54
|
+
# Step 2: Install hooks
|
|
55
|
+
echo -e "${YELLOW}# Set up capture hooks${NC}"
|
|
56
|
+
sleep 1
|
|
57
|
+
run_cmd "pisama-cc install"
|
|
58
|
+
echo ""
|
|
59
|
+
|
|
60
|
+
# Step 3: Show status (after some usage)
|
|
61
|
+
echo -e "${YELLOW}# Check status and costs${NC}"
|
|
62
|
+
sleep 1
|
|
63
|
+
run_cmd "pisama-cc status"
|
|
64
|
+
echo ""
|
|
65
|
+
|
|
66
|
+
# Step 4: View traces
|
|
67
|
+
echo -e "${YELLOW}# View recent tool calls${NC}"
|
|
68
|
+
sleep 1
|
|
69
|
+
run_cmd "pisama-cc traces -v --last 10"
|
|
70
|
+
echo ""
|
|
71
|
+
|
|
72
|
+
# Step 5: Usage breakdown
|
|
73
|
+
echo -e "${YELLOW}# Detailed cost breakdown${NC}"
|
|
74
|
+
sleep 1
|
|
75
|
+
run_cmd "pisama-cc usage --by-model --by-tool"
|
|
76
|
+
echo ""
|
|
77
|
+
|
|
78
|
+
# End
|
|
79
|
+
echo -e "${BLUE}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}"
|
|
80
|
+
echo -e "${GREEN}✓${NC} Track every token. Know your costs."
|
|
81
|
+
echo -e "${BLUE}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}"
|
|
82
|
+
sleep 3
|
|
@@ -53,7 +53,7 @@ def save_config(config: dict):
|
|
|
53
53
|
|
|
54
54
|
|
|
55
55
|
@click.group()
|
|
56
|
-
@click.version_option(version="0.3.
|
|
56
|
+
@click.version_option(version="0.3.4")
|
|
57
57
|
def main():
|
|
58
58
|
"""PISAMA Claude Code - Trace capture and sync."""
|
|
59
59
|
pass
|
|
@@ -675,7 +675,7 @@ def prepare_sync_payload(traces: list, include_outputs: bool) -> dict:
|
|
|
675
675
|
|
|
676
676
|
return {
|
|
677
677
|
"source": "claude-code",
|
|
678
|
-
"version": "0.3.
|
|
678
|
+
"version": "0.3.4",
|
|
679
679
|
"uploaded_at": datetime.now(timezone.utc).isoformat(),
|
|
680
680
|
"trace_count": len(clean_traces),
|
|
681
681
|
"traces": clean_traces,
|
|
File without changes
|
|
File without changes
|
{pisama_claude_code-0.3.3 → pisama_claude_code-0.3.4}/.github/ISSUE_TEMPLATE/feature_request.yml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pisama_claude_code-0.3.3 → pisama_claude_code-0.3.4}/src/pisama_claude_code/hooks/__init__.py
RENAMED
|
File without changes
|
{pisama_claude_code-0.3.3 → pisama_claude_code-0.3.4}/src/pisama_claude_code/hooks/capture_hook.py
RENAMED
|
File without changes
|
{pisama_claude_code-0.3.3 → pisama_claude_code-0.3.4}/src/pisama_claude_code/hooks/guardian_hook.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pisama_claude_code-0.3.3 → pisama_claude_code-0.3.4}/src/pisama_claude_code/trace_converter.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|