Skip to content

Commit ade8b16

Browse files
efoutsclaude
andcommitted
refactor: remove CLI references - this is a status line script, not a CLI tool
- Remove bin entry from package.json (no longer installable as CLI command) - Remove shebang from main script file - Update documentation to reflect Node.js script usage instead of CLI - Update installation instructions to use direct Node.js execution - Remove executable permission references - Update ESLint comments and test descriptions The tool is designed to be executed by Claude Code's status line system, not as a standalone CLI tool. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent f73dc3d commit ade8b16

File tree

6 files changed

+16
-18
lines changed

6 files changed

+16
-18
lines changed

.eslintrc.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ module.exports = {
119119
'logical-assignment-operators': 'error',
120120
'no-promise-executor-return': 'error',
121121

122-
// === CLI-SPECIFIC ===
122+
// === NODE.JS SCRIPT ===
123123
// Input/Output consistency
124124
'eol-last': 'error',
125125
'no-trailing-spaces': 'error',

CLAUDE.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
## Project Structure
1212

1313
**Key files:**
14-
- `src/context-status.js` - Main executable script
14+
- `src/context-status.js` - Main status line script
1515
- `tests/` - Native Node.js test suite (functionality, security, benchmarks)
1616
- `package.json` - Uses pnpm (not npm)
1717
- `.eslintrc.cjs` - Security-focused linting rules
@@ -141,8 +141,7 @@ pnpm run test:all
141141

142142
1. **Node.js version:** Ensure using Node.js 18+ for native test runner support
143143
2. **pnpm not found:** Install with `npm install -g pnpm`
144-
3. **Permission errors:** Ensure `src/context-status.js` is executable (`chmod +x`)
145-
4. **Path issues:** Use absolute paths in Claude Code configuration
144+
3. **Path issues:** Use absolute paths in Claude Code configuration
146145

147146
## Contributing Guidelines
148147

README.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,21 @@ Custom Claude Code status line to restore context window visibility for AWS Bedr
2525
**Choose Method 1 if:** You want automatic updates and minimal maintenance
2626
**Choose Method 2 if:** You need offline access or want to modify the script
2727

28-
### Method 1: NPX (Recommended)
28+
### Method 1: Direct Node.js (Recommended)
29+
30+
Install the package and reference it directly:
31+
32+
```bash
33+
npm install @thisdot/claude-code-context-status-line
34+
```
2935

3036
Add this to your Claude Code settings (`~/.claude/settings.json`):
3137

3238
```json
3339
{
3440
"statusLine": {
3541
"type": "command",
36-
"command": "npx @thisdot/claude-code-context-status-line"
42+
"command": "node ./node_modules/@thisdot/claude-code-context-status-line/src/context-status.js"
3743
}
3844
}
3945
```
@@ -77,19 +83,17 @@ chmod +x context-status.js
7783
**Status line shows "- (-)" constantly:**
7884
1. Check Claude Code version: `claude --version`
7985
2. Verify settings.json syntax with a JSON validator
80-
3. Test the command manually:
86+
3. Test the script manually:
8187
```bash
82-
echo '{"transcript_path":"/path/to/transcript.jsonl"}' | node context-status.js
88+
echo '{"transcript_path":"/path/to/transcript.jsonl"}' | node ./node_modules/@thisdot/claude-code-context-status-line/src/context-status.js
8389
```
84-
4. Check file permissions on the script
8590

8691
**Node.js not found errors:**
8792
- Ensure Node.js 18+ is installed: `node --version`
8893
- Check PATH includes Node.js installation
8994
- On macOS: Try `brew install node` if using Homebrew
9095

9196
**Permission denied errors:**
92-
- Make script executable: `chmod +x context-status.js`
9397
- Check Claude Code has access to the script location
9498
- Use absolute paths in Claude Code configuration
9599

package.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
{
22
"name": "@this-dot/claude-code-context-status-line",
33
"version": "0.1.0",
4-
"description": "CLI tool to restore context window visibility for AWS Bedrock users in Claude Code by displaying real-time token usage in the status line",
4+
"description": "Custom Claude Code status line to restore context window visibility for AWS Bedrock users by displaying token usage.",
55
"type": "module",
66
"main": "src/context-status.js",
7-
"bin": {
8-
"claude-code-context-status-line": "src/context-status.js"
9-
},
107
"files": [
118
"src/",
129
"README.md",

src/context-status.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#!/usr/bin/env node
2-
31
/**
42
* Claude Code Context Usage Status Line Script
53
*

tests/context-status.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,11 +166,11 @@ describe('Integration Tests', () => {
166166
const execAsyncPromise = promisify(exec);
167167

168168
try {
169-
// Check if Claude Code CLI is available
169+
// Check if Claude Code is available
170170
try {
171171
await execAsyncPromise('which claude', { timeout: 5000 });
172172
} catch (error) {
173-
console.warn('Claude Code CLI not found, skipping integration test');
173+
console.warn('Claude Code not found, skipping integration test');
174174
return;
175175
}
176176

0 commit comments

Comments
 (0)