Skip to content

Commit 029ac5b

Browse files
committed
Add CI/CD publishing
1 parent 26a1539 commit 029ac5b

File tree

4 files changed

+127
-21
lines changed

4 files changed

+127
-21
lines changed

.github/workflows/publish.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Publish to npm
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
publish:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write
13+
id-token: write
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
18+
- name: Setup Node
19+
uses: actions/setup-node@v4
20+
with:
21+
node-version: '20'
22+
registry-url: 'https://registry.npmjs.org'
23+
24+
- name: Setup Bun
25+
uses: oven-sh/setup-bun@v2
26+
with:
27+
bun-version: latest
28+
29+
- name: Install dependencies
30+
run: bun install
31+
32+
- name: Check if version changed
33+
id: version
34+
run: |
35+
PACKAGE_NAME=$(jq -r .name package.json)
36+
LOCAL_VERSION=$(jq -r .version package.json)
37+
NPM_VERSION=$(npm view "$PACKAGE_NAME" version 2>/dev/null || echo "0.0.0")
38+
39+
echo "local=$LOCAL_VERSION" >> $GITHUB_OUTPUT
40+
echo "npm=$NPM_VERSION" >> $GITHUB_OUTPUT
41+
42+
if [ "$LOCAL_VERSION" != "$NPM_VERSION" ]; then
43+
echo "changed=true" >> $GITHUB_OUTPUT
44+
echo "Version changed: $NPM_VERSION -> $LOCAL_VERSION"
45+
else
46+
echo "changed=false" >> $GITHUB_OUTPUT
47+
echo "Version unchanged: $LOCAL_VERSION"
48+
fi
49+
50+
- name: Publish to npm
51+
if: steps.version.outputs.changed == 'true'
52+
run: npm publish --access public --provenance
53+
54+
- name: Create GitHub Release
55+
if: steps.version.outputs.changed == 'true'
56+
uses: softprops/action-gh-release@v2
57+
with:
58+
tag_name: v${{ steps.version.outputs.local }}
59+
name: v${{ steps.version.outputs.local }}
60+
generate_release_notes: true

CHANGELOG.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [Unreleased]
9+
10+
## [0.3.0] - 2025-01-02
11+
12+
### Added
13+
14+
- GitHub Actions workflow for automatic npm publishing on version bump
15+
- Automatic GitHub release creation with release notes
16+
17+
## [0.2.0] - 2025-01-02
18+
19+
### Added
20+
21+
- CHANGELOG.md for tracking version history
22+
23+
### Changed
24+
25+
- Improved error handling for missing credentials
26+
27+
## [0.1.0] - 2025-01-02
28+
29+
### Added
30+
31+
- Initial release
32+
- Terminal dashboard for monitoring AI agent usage limits
33+
- Support for Claude Code usage tracking via macOS Keychain
34+
- Support for Codex usage tracking via `~/.codex/auth.json`
35+
- Support for Gemini CLI usage display via `~/.gemini/settings.json`
36+
- Real-time progress bars with color-coded usage indicators
37+
- Trajectory markers showing pace against reset period
38+
- Auto-refresh every 60 seconds
39+
- Keyboard controls: `q` to quit, `r` to refresh
40+
- Standalone binary builds for macOS (arm64 and x64)
41+
- npm package distribution
42+
43+
[Unreleased]: https://github.com/AgentWorkforce/limit/compare/v0.3.0...HEAD
44+
[0.3.0]: https://github.com/AgentWorkforce/limit/compare/v0.2.0...v0.3.0
45+
[0.2.0]: https://github.com/AgentWorkforce/limit/compare/v0.1.0...v0.2.0
46+
[0.1.0]: https://github.com/AgentWorkforce/limit/releases/tag/v0.1.0

README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# agent-monitor
1+
# agent-limit
22

33
Terminal dashboard to monitor Claude Code, Codex, and Gemini CLI usage limits.
44

@@ -7,35 +7,35 @@ Terminal dashboard to monitor Claude Code, Codex, and Gemini CLI usage limits.
77
### Via npm (requires Bun)
88

99
```bash
10-
npm install -g agent-monitor
10+
npm install -g agent-limit
1111
```
1212

1313
### Standalone Binary (no dependencies)
1414

15-
Download from [GitHub Releases](https://github.com/AgentWorkforce/monitor/releases):
15+
Download from [GitHub Releases](https://github.com/AgentWorkforce/limit/releases):
1616

1717
```bash
1818
# Apple Silicon
19-
curl -L https://github.com/AgentWorkforce/monitor/releases/latest/download/agent-monitor-darwin-arm64 -o /usr/local/bin/agent-monitor
20-
chmod +x /usr/local/bin/agent-monitor
19+
curl -L https://github.com/AgentWorkforce/limit/releases/latest/download/agent-limit-darwin-arm64 -o /usr/local/bin/agent-limit
20+
chmod +x /usr/local/bin/agent-limit
2121

2222
# Intel Mac
23-
curl -L https://github.com/AgentWorkforce/monitor/releases/latest/download/agent-monitor-darwin-x64 -o /usr/local/bin/agent-monitor
24-
chmod +x /usr/local/bin/agent-monitor
23+
curl -L https://github.com/AgentWorkforce/limit/releases/latest/download/agent-limit-darwin-x64 -o /usr/local/bin/agent-limit
24+
chmod +x /usr/local/bin/agent-limit
2525
```
2626

2727
## Quick Start
2828

2929
```bash
30-
agent-monitor usage
30+
agent-limit usage
3131
```
3232

3333
## CLI
3434

3535
| Command | Description |
3636
|---------|-------------|
37-
| `agent-monitor usage` | Show usage dashboard |
38-
| `agent-monitor help` | Show help message |
37+
| `agent-limit usage` | Show usage dashboard |
38+
| `agent-limit help` | Show help message |
3939

4040
## Dashboard Controls
4141

@@ -62,7 +62,7 @@ agent-monitor usage
6262
## Development
6363

6464
```bash
65-
git clone https://github.com/AgentWorkforce/monitor.git
65+
git clone https://github.com/AgentWorkforce/limit.git
6666
cd monitor
6767
bun install
6868
```
@@ -98,7 +98,7 @@ Binaries are output to `dist/`.
9898

9999
## How It Works
100100

101-
agent-monitor reads credentials from standard locations:
101+
agent-limit reads credentials from standard locations:
102102

103103
- **Claude Code**: macOS Keychain (`Claude Code-credentials`)
104104
- **Codex**: `~/.codex/auth.json`

package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
{
2-
"name": "agent-monitor",
3-
"version": "0.1.0",
2+
"name": "agent-limit",
3+
"version": "0.3.0",
44
"description": "Terminal dashboard to monitor Claude Code, Codex, and other agent usage limits",
55
"type": "module",
66
"main": "src/index.tsx",
77
"bin": {
8-
"agent-monitor": "./bin/cli.tsx"
8+
"agent-limit": "./bin/cli.tsx"
99
},
1010
"scripts": {
1111
"start": "bun run src/index.tsx",
1212
"dev": "bun --watch run src/index.tsx",
13-
"build": "bun build --compile --target=bun-darwin-arm64 ./bin/cli.tsx --outfile=dist/agent-monitor-darwin-arm64 && bun build --compile --target=bun-darwin-x64 ./bin/cli.tsx --outfile=dist/agent-monitor-darwin-x64",
14-
"build:arm64": "bun build --compile --target=bun-darwin-arm64 ./bin/cli.tsx --outfile=dist/agent-monitor-darwin-arm64",
15-
"build:x64": "bun build --compile --target=bun-darwin-x64 ./bin/cli.tsx --outfile=dist/agent-monitor-darwin-x64"
13+
"build": "bun build --compile --target=bun-darwin-arm64 ./bin/cli.tsx --outfile=dist/agent-limit-darwin-arm64 && bun build --compile --target=bun-darwin-x64 ./bin/cli.tsx --outfile=dist/agent-limit-darwin-x64",
14+
"build:arm64": "bun build --compile --target=bun-darwin-arm64 ./bin/cli.tsx --outfile=dist/agent-limit-darwin-arm64",
15+
"build:x64": "bun build --compile --target=bun-darwin-x64 ./bin/cli.tsx --outfile=dist/agent-limit-darwin-x64"
1616
},
1717
"files": [
1818
"bin",
@@ -36,12 +36,12 @@
3636
"license": "MIT",
3737
"repository": {
3838
"type": "git",
39-
"url": "git+https://github.com/AgentWorkforce/monitor.git"
39+
"url": "git+https://github.com/AgentWorkforce/limit.git"
4040
},
4141
"bugs": {
42-
"url": "https://github.com/AgentWorkforce/monitor.git/issues"
42+
"url": "https://github.com/AgentWorkforce/limit/issues"
4343
},
44-
"homepage": "https://github.com/AgentWorkforce/monitor.git",
44+
"homepage": "https://github.com/AgentWorkforce/limit",
4545
"engines": {
4646
"bun": ">=1.0.0"
4747
},

0 commit comments

Comments
 (0)