tokentracker-cli

LOW
maintainer thisisayande 0 votes scanned 2026-08-25 19:27:42.084104
View on AUR
Why flagged

Uploaded within the last 14 days with 2 or fewer community votes — little peer review so far.

Triggered rules

Low Few votes, recently uploaded zero_votes_recent

Uploaded within the last 14 days with 2 or fewer community votes — little peer review so far.

PKGBUILD

1# Maintainer: Ayan De <deayan252@gmail.com>
2
3# Headless companion binary for the omarchy-tokentracker shell plugin.
4#
5# This is deliberately not the desktop app: the widget only needs
6# `tokentracker snapshot`, so this package builds the backend crate alone and
7# pulls in none of the GUI stack (webkit2gtk, gtk3, appindicator) that
8# tokentracker-bin requires. Both can be installed side by side; they share the
9# same cache and settings under ~/.config/CodexBar.
10#
11# VCS package: the snapshot subcommand is not in a tagged release yet. Switch
12# source= to a release tarball and drop pkgver() once one exists.
13
14pkgname=tokentracker-cli
15pkgver=0.1.12.r42.g3dddb8f
16pkgrel=1
17pkgdesc="Headless AI provider quota reporter — JSON snapshots for bars and scripts"
18arch=('x86_64' 'aarch64')
19url="https://github.com/ayan-de/Token-Tracker"
20license=('MIT')
21# The binary links only glibc and libgcc: reqwest is built with rustls rather
22# than OpenSSL, and rusqlite bundles SQLite, so neither is a runtime dependency.
23depends=('glibc' 'gcc-libs')
24makedepends=('git' 'cargo')
25provides=('tokentracker-cli')
26# Arch enables LTO globally. The `ring` crate (pulled in by rustls) links
27# prebuilt assembly that LTO discards, so the build dies with undefined
28# ring_core_* symbols at link time.
29options=('!lto')
30source=("$pkgname::git+$url.git")
31sha256sums=('SKIP')
32
33pkgver() {
34 cd "$srcdir/$pkgname"
35 git describe --long --tags --abbrev=7 2>/dev/null \
36 | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' \
37 || printf "0.0.0.r%s.g%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
38}
39
40prepare() {
41 cd "$srcdir/$pkgname"
42 export RUSTUP_TOOLCHAIN=stable
43 cargo fetch --locked --target "$(rustc -vV | sed -n 's/^host: //p')"
44}
45
46build() {
47 cd "$srcdir/$pkgname"
48 export RUSTUP_TOOLCHAIN=stable
49 export CARGO_TARGET_DIR=target
50 # Only the backend crate: src-tauri would drag in the whole desktop toolchain.
51 cargo build --frozen --release --package backend
52}
53
54check() {
55 cd "$srcdir/$pkgname"
56 export RUSTUP_TOOLCHAIN=stable
57 export CARGO_TARGET_DIR=target
58 # Restricted to the snapshot contract the widget depends on; the wider suite
59 # reaches for network and provider credentials that are absent in a chroot.
60 cargo test --frozen --release --package backend -- snapshot widget_snapshot
61}
62
63package() {
64 cd "$srcdir/$pkgname"
65 install -Dm755 "target/release/backend" "$pkgdir/usr/bin/tokentracker-cli"
66 install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
67}
68

Scan history

Scanned at (UTC)SeverityRules
2026-08-25 19:27:42 Low 1

Report a package

Reports go to the AURWatch maintainer (one person) and are read by hand. No login required.

0 / 4000
Your suggestion