cc-context-stats 1.3.0 → 1.5.0
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.
- package/.claude/settings.local.json +33 -1
- package/.github/workflows/ci.yml +4 -2
- package/CHANGELOG.md +17 -0
- package/README.md +33 -11
- package/RELEASE_NOTES.md +9 -0
- package/assets/logo/favicon.svg +16 -0
- package/assets/logo/logo-black.svg +23 -0
- package/assets/logo/logo-full.svg +30 -0
- package/assets/logo/logo-icon.svg +26 -0
- package/assets/logo/logo-mark.svg +26 -0
- package/assets/logo/logo-white.svg +23 -0
- package/assets/logo/logo-wordmark.svg +7 -0
- package/install.sh +21 -2
- package/package.json +7 -3
- package/pyproject.toml +6 -4
- package/scripts/context-stats.sh +194 -26
- package/scripts/statusline-full.sh +57 -2
- package/scripts/statusline-git.sh +50 -1
- package/scripts/statusline-minimal.sh +50 -1
- package/scripts/statusline.js +50 -4
- package/scripts/statusline.py +44 -3
- package/src/claude_statusline/__init__.py +1 -1
- package/src/claude_statusline/cli/context_stats.py +106 -34
- package/src/claude_statusline/cli/statusline.py +5 -4
- package/src/claude_statusline/core/config.py +7 -0
- package/src/claude_statusline/formatters/layout.py +52 -0
- package/src/claude_statusline/graphs/renderer.py +44 -24
- package/src/claude_statusline/graphs/statistics.py +34 -0
- package/src/claude_statusline/ui/__init__.py +1 -0
- package/src/claude_statusline/ui/icons.py +93 -0
- package/src/claude_statusline/ui/waiting.py +62 -0
- package/tests/bash/test_statusline_full.bats +30 -0
- package/tests/node/statusline.test.js +44 -3
- package/tests/python/test_icons.py +152 -0
- package/tests/python/test_layout.py +110 -0
- package/tests/python/test_statusline.py +62 -3
- package/tests/python/test_waiting.py +127 -0
- package/PUBLISHING_GUIDE.md +0 -69
- package/npm-publish.sh +0 -33
- package/publish.sh +0 -24
- package/show_raw_claude_code_api.js +0 -11
package/PUBLISHING_GUIDE.md
DELETED
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
# npm Package Publishing Guide
|
|
2
|
-
|
|
3
|
-
## Step 1: Access Your npm Account with Recovery Code
|
|
4
|
-
|
|
5
|
-
1. Go to https://www.npmjs.com/login
|
|
6
|
-
2. Enter your credentials (luong.nguyen + password)
|
|
7
|
-
3. When prompted for 2FA, click "Use a recovery code or request a reset"
|
|
8
|
-
4. Enter one of your 8-character recovery codes
|
|
9
|
-
5. You should now be logged into your npm account
|
|
10
|
-
|
|
11
|
-
## Step 2: Set Up Microsoft Authenticator
|
|
12
|
-
|
|
13
|
-
1. Once logged in, click your profile picture (top right)
|
|
14
|
-
2. Go to "Account"
|
|
15
|
-
3. Under "Two-Factor Authentication", click "Modify 2FA"
|
|
16
|
-
4. Choose to add an "Authenticator app"
|
|
17
|
-
5. npm will show you a QR code
|
|
18
|
-
|
|
19
|
-
### In Microsoft Authenticator:
|
|
20
|
-
|
|
21
|
-
1. Open Microsoft Authenticator app
|
|
22
|
-
2. Tap the `+` button (top right)
|
|
23
|
-
3. Choose "Personal account" or "Work/school account"
|
|
24
|
-
4. Tap "Scan QR code"
|
|
25
|
-
5. Scan the QR code from npm website
|
|
26
|
-
6. The app will now show "npm" with a 6-digit code
|
|
27
|
-
|
|
28
|
-
## Step 3: Publish Your Package
|
|
29
|
-
|
|
30
|
-
1. Get the current 6-digit code from Microsoft Authenticator
|
|
31
|
-
2. Run this command in your terminal:
|
|
32
|
-
|
|
33
|
-
```bash
|
|
34
|
-
cd /Users/montimage/buildspace/luongnv89/cc-context-stats
|
|
35
|
-
./publish.sh YOUR_6_DIGIT_CODE
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
For example:
|
|
39
|
-
|
|
40
|
-
```bash
|
|
41
|
-
./publish.sh 123456
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
## Step 4: Verify Publication
|
|
45
|
-
|
|
46
|
-
After successful publishing, you can verify with:
|
|
47
|
-
|
|
48
|
-
```bash
|
|
49
|
-
npm view cc-context-stats
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
## Important Notes:
|
|
53
|
-
|
|
54
|
-
- Recovery codes are single-use - once you use one, it's gone
|
|
55
|
-
- Keep your remaining recovery codes safe
|
|
56
|
-
- Microsoft Authenticator will provide new codes every 30 seconds
|
|
57
|
-
- The package will be published as "cc-context-stats@1.3.0"
|
|
58
|
-
|
|
59
|
-
## Troubleshooting:
|
|
60
|
-
|
|
61
|
-
If you get "Invalid OTP" error:
|
|
62
|
-
|
|
63
|
-
- Wait for a new code to generate in Microsoft Authenticator (codes change every 30 seconds)
|
|
64
|
-
- Make sure you're typing the code correctly
|
|
65
|
-
|
|
66
|
-
If you can't log into the website:
|
|
67
|
-
|
|
68
|
-
- Try a different recovery code
|
|
69
|
-
- Make sure you're typing the 8-character code correctly (no spaces)
|
package/npm-publish.sh
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
|
|
3
|
-
if [ $# -eq 0 ]; then
|
|
4
|
-
echo "❌ Error: Please provide your 6-digit OTP code"
|
|
5
|
-
echo ""
|
|
6
|
-
echo "Usage: ./npm-publish.sh 123456"
|
|
7
|
-
echo ""
|
|
8
|
-
echo "Get your code from Microsoft Authenticator app"
|
|
9
|
-
exit 1
|
|
10
|
-
fi
|
|
11
|
-
|
|
12
|
-
echo "🚀 Publishing cc-context-stats to npm..."
|
|
13
|
-
echo "📦 Package: cc-context-stats@1.3.0"
|
|
14
|
-
echo "🔐 Using OTP: $1"
|
|
15
|
-
echo ""
|
|
16
|
-
|
|
17
|
-
npm publish --otp=$1
|
|
18
|
-
|
|
19
|
-
if [ $? -eq 0 ]; then
|
|
20
|
-
echo ""
|
|
21
|
-
echo "✅ SUCCESS! Package published to npm!"
|
|
22
|
-
echo "📦 Package name: cc-context-stats"
|
|
23
|
-
echo "📦 Version: 1.3.0"
|
|
24
|
-
echo "📦 Install with: npm install cc-context-stats"
|
|
25
|
-
echo "🌐 View at: https://www.npmjs.com/package/cc-context-stats"
|
|
26
|
-
else
|
|
27
|
-
echo ""
|
|
28
|
-
echo "❌ FAILED! Publishing failed."
|
|
29
|
-
echo "💡 Tips:"
|
|
30
|
-
echo " - Make sure your OTP code is current (changes every 30 seconds)"
|
|
31
|
-
echo " - Double-check the 6-digit code"
|
|
32
|
-
echo " - If you lost access, use a recovery code on npm website"
|
|
33
|
-
fi
|
package/publish.sh
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
|
|
3
|
-
echo "npm publish with OTP"
|
|
4
|
-
echo "Usage: ./publish.sh <6-digit-otp-code>"
|
|
5
|
-
echo ""
|
|
6
|
-
|
|
7
|
-
if [ $# -eq 0 ]; then
|
|
8
|
-
echo "Please provide your 6-digit OTP code:"
|
|
9
|
-
echo " ./publish.sh 123456"
|
|
10
|
-
exit 1
|
|
11
|
-
fi
|
|
12
|
-
|
|
13
|
-
echo "Publishing cc-context-stats to npm..."
|
|
14
|
-
npm publish --otp=$1
|
|
15
|
-
|
|
16
|
-
if [ $? -eq 0 ]; then
|
|
17
|
-
echo ""
|
|
18
|
-
echo "✅ Successfully published to npm!"
|
|
19
|
-
echo "Package: cc-context-stats@1.3.0"
|
|
20
|
-
echo "Install with: npm install cc-context-stats"
|
|
21
|
-
else
|
|
22
|
-
echo ""
|
|
23
|
-
echo "❌ Publishing failed. Please check your OTP code."
|
|
24
|
-
fi
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
const fs = require('fs');
|
|
3
|
-
let input = '';
|
|
4
|
-
process.stdin.setEncoding('utf8');
|
|
5
|
-
process.stdin.on('data', chunk => (input += chunk));
|
|
6
|
-
process.stdin.on('end', () => {
|
|
7
|
-
// Log raw JSON to a file
|
|
8
|
-
fs.writeFileSync('/tmp/claude-raw-input.json', input);
|
|
9
|
-
// Also output a simple status line
|
|
10
|
-
console.log('[Claude] debug');
|
|
11
|
-
});
|