Quick start for developers.
| Tool | Minimum |
|---|---|
| Rust | stable (1.75+) |
| Git | recent |
Rust + Cargo is the only supported toolchain.
Wire your local checkout straight into Waybar so every build shows up on the next poll:
git clone git@github.com:othavioquiliao/agent-bar.git
cd agent-bar
cargo build
./target/debug/agent-bar setupsetup symlinks ~/.local/bin/agent-bar to the debug binary inside this
checkout. Rebuild with cargo build; the next Waybar tick picks it up.
If you already have a non-dev install, wipe it first to avoid the symlink fighting your changes:
unlink ~/.local/bin/agent-bar 2>/dev/null
rm -rf ~/.agent-bar ~/.config/agent-bar ~/.cache/agent-bar
rm -rf ~/.config/waybar/agent-baragent-bar update refuses to run from a dev checkout. Use git pull instead.
cargo build # Debug build
cargo build --release # Release build
cargo run -- status # Run from source
cargo test # Full test suite
cargo clippy --all-targets -- -D warnings # Lint (must pass clean)
cargo fmt # FormatCommit messages use Conventional Commits written in Portuguese, subject ≤ 50 chars:
| Prefix | Use for |
|---|---|
feat: |
New functionality |
fix: |
Bug fix |
refactor: |
Refactor without behavior change |
test: |
Tests added or changed |
docs: |
Documentation |
chore: |
Maintenance (deps, CI, configs) |
perf: |
Performance |
style: |
Formatting only |
build: |
Build system or dependencies |
ci: |
CI configuration |
Examples:
feat: adiciona provider para Gemini
fix: corrige parsing do reset time no Amp
test: cobre cenários de cache expirado
- Rust stable. No
unsafewithout explicit justification. Nounwrap()in production paths — use explicit error handling that produces user-facing messages. - Identifiers and file names in English,
snake_case. Repo communication and commits in Portuguese. cargo fmtfor formatting.cargo clippy --all-targets -- -D warningsmust pass clean.
Tests live in tests/. No real credentials, no live CLIs, no network, no real
Waybar — mock filesystem, fetch, spawn, and app-server data.
cargo test # All
cargo test cache # Filter by nameWhen using XDG_CONFIG_HOME / XDG_CACHE_HOME in a test, set them before
any code that reads config paths, since config resolves paths at initialization.
Restore env and global state after each test.
Releases are cut by bumping version in Cargo.toml, updating CHANGELOG.md,
committing, and creating a GitHub Release with tag v<version>. The
publish.yml workflow triggers on release: published.
See docs/new-provider.md for the full checklist.
Short version: implement the Provider trait from src/providers/types.rs,
register it in src/providers/mod.rs, add tests under tests/, drop an icon
in icons/.