Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
name: Bug report
about: Something in CheckUsage is wrong or a usage meter broke
title: ""
labels: ["bug"]
assignees: []
---

**CheckUsage version**
(Settings → About, or the GitHub release you installed)

**macOS version**


**Providers affected**
(Claude / Cursor / Codex / Copilot / Gemini / Grok / …)

**What happened**


**What you expected**


**Steps to reproduce**
1.
2.

**Notes**

Do **not** paste tokens, cookies, Keychain dumps, `auth.json`, `.credentials.json`, or `state.vscdb` contents. Redact fixtures. See [SECURITY.md](../../SECURITY.md).
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
blank_issues_enabled: true
contact_links:
- name: Security vulnerability
url: https://github.com/sysrootix/check-usage/blob/main/SECURITY.md
about: Report token leakage or other security issues privately — do not file a public issue.
- name: Changelog
url: https://github.com/sysrootix/check-usage/blob/main/CHANGELOG.md
about: What shipped in each release.
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Feature request
about: An idea that fits a local, no-telemetry usage widget
title: ""
labels: ["enhancement"]
assignees: []
---

**Problem**
What is hard today without this change?

**Proposal**
What should CheckUsage do?

**Providers / scope**
Does this need a new unofficial API? If yes, say which official app already calls it. Do not attach live credentials.

**Alternatives**
Anything you already tried (hotkeys, Settings toggles, another tool).
22 changes: 22 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
## What

<!-- User-visible change in one or two sentences. -->

## Why

<!-- Bug, provider response change, or maintainer hygiene. -->

## How I tested

- [ ] `make test`
- [ ] `make app` (if UI, signing, or the bundle changed)

macOS 14+ / Xcode 16+ required. Linux agents cannot run `xcodebuild`; the `macos-15` CI workflow is the gate.

## Checklist

- [ ] No secrets, tokens, cookies, or Keychain blobs in the diff or screenshots
- [ ] Parser changes include a realistic fixture in `Tests/CheckUsageTests` (no live network)
- [ ] New `L10n` / `ExtraL10n` keys exist in every language table
- [ ] User-facing changes are noted under **Unreleased** in `CHANGELOG.md`
- [ ] I have read [CONTRIBUTING.md](../CONTRIBUTING.md) and [SECURITY.md](../SECURITY.md)
30 changes: 28 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,46 @@ on:
branches: [main]
pull_request:

concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
test:
runs-on: macos-15
timeout-minutes: 30
env:
HOMEBREW_NO_AUTO_UPDATE: "1"
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: "1"
steps:
- uses: actions/checkout@v4

- name: Select Xcode
run: sudo xcode-select -s /Applications/Xcode.app

- name: Cache Homebrew downloads
uses: actions/cache@v4
with:
path: ~/Library/Caches/Homebrew
key: brew-${{ runner.os }}-${{ runner.arch }}-xcodegen
restore-keys: |
brew-${{ runner.os }}-${{ runner.arch }}-

- name: Install XcodeGen
run: brew install xcodegen
run: brew list xcodegen >/dev/null 2>&1 || brew install xcodegen

- name: Test
run: make test

- name: Build app
run: make app
- uses: actions/upload-artifact@v4

- name: Upload app
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: actions/upload-artifact@v4
with:
name: CheckUsage.app
path: dist/CheckUsage.app
56 changes: 56 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Release

on:
push:
tags:
- "v*"

concurrency:
group: release-${{ github.ref }}
cancel-in-progress: false

permissions:
contents: write

jobs:
release:
runs-on: macos-15
timeout-minutes: 30
env:
HOMEBREW_NO_AUTO_UPDATE: "1"
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: "1"
steps:
- uses: actions/checkout@v4

- name: Select Xcode
run: sudo xcode-select -s /Applications/Xcode.app

- name: Cache Homebrew downloads
uses: actions/cache@v4
with:
path: ~/Library/Caches/Homebrew
key: brew-${{ runner.os }}-${{ runner.arch }}-xcodegen
restore-keys: |
brew-${{ runner.os }}-${{ runner.arch }}-

- name: Install XcodeGen
run: brew list xcodegen >/dev/null 2>&1 || brew install xcodegen

- name: Build and zip app
run: make zip

- name: Publish GitHub Release
env:
GH_TOKEN: ${{ github.token }}
run: |
set -euo pipefail
TAG="${GITHUB_REF_NAME}"
TITLE="CheckUsage ${TAG#v}"
NOTES="See [CHANGELOG.md](https://github.com/sysrootix/check-usage/blob/${TAG}/CHANGELOG.md) for what shipped."
if gh release view "$TAG" >/dev/null 2>&1; then
gh release upload "$TAG" dist/CheckUsage.app.zip --clobber
else
gh release create "$TAG" dist/CheckUsage.app.zip \
--title "$TITLE" \
--notes "$NOTES"
fi
38 changes: 38 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Changelog

All notable changes to CheckUsage are documented in this file.

The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project uses [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Added

- Community health files: security policy, Contributor Covenant, issue and pull-request templates
- Architecture notes for contributors (`docs/ARCHITECTURE.md`)
- GitHub Actions release workflow: tag `v*` builds `CheckUsage.app.zip` and attaches it to the GitHub Release
- Settings → About links to the public repository, issue tracker, and license
- Additional offline parser fixtures (Claude, Codex, Cursor, Copilot) and forecast / reset-copy edge cases

### Changed

- CI cancels stale runs, keeps `macos-15` + Makefile as the source of truth, and uploads the built app only from `main`

## [1.0.0] - 2026-08-29

First public release.

### Added

- Native Swift 6 menubar extra for macOS 14+: edge pill with provider rings and a detail popover
- Usage meters for Claude, Codex, Cursor, Copilot, Gemini CLI, Grok, Antigravity, OpenCode, OpenRouter, DeepSeek, and Z.ai / GLM
- Reuses official-app sessions (Keychain / local auth files). No extra login. No telemetry
- Spend-pace card and burn forecast against the billing cycle
- Optional 70% / 90% notifications, remaining percent on rings, menu-bar worst remaining percent
- Widget lock, snap-to-edge, tuck-off-edge, custom hotkeys (`⌥⌘U` / `⌥⌘L` by default)
- UI and docs in English, Russian, Simplified Chinese, Japanese, German, Spanish, French, Brazilian Portuguese, and Korean
- `make test` / `make app` and parser fixtures under `Tests/CheckUsageTests`

[Unreleased]: https://github.com/sysrootix/check-usage/compare/v1.0.0...HEAD
[1.0.0]: https://github.com/sysrootix/check-usage/releases/tag/v1.0.0
134 changes: 134 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
# Contributor Covenant Code of Conduct

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, caste, color, religion, or sexual
identity and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the overall
community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or advances of
any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email address,
without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.

Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
sysrootix@gmail.com. All complaints will be reviewed and investigated promptly
and fairly.

All community leaders are obligated to respect the privacy and security of the
reporter of any incident.

Security vulnerabilities are a separate process — see [SECURITY.md](SECURITY.md).
Do not mix exploit details or credentials into a Code of Conduct report.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series of actions.

**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within
the community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.1, available at
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].

Community Impact Guidelines were inspired by
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].

For answers to common questions about this code of conduct, see the FAQ at
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
[https://www.contributor-covenant.org/translations][translations].

[homepage]: https://www.contributor-covenant.org
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
[Mozilla CoC]: https://github.com/mozilla/diversity
[FAQ]: https://www.contributor-covenant.org/faq
[translations]: https://www.contributor-covenant.org/translations
Loading
Loading