Skip to content

feat: CLI — sysora status command for terminal snapshot #12

@chojuninengu

Description

@chojuninengu

Summary

Expose a sysora status CLI command that prints a quick system snapshot
directly in the terminal — RAM, CPU, disk, battery, and temperatures —
for users who live in the terminal and don't want to open the GUI.

Why

Sysora is built in Rust — a CLI is a natural zero-cost extension. Developers
and sysadmins who use the terminal daily will adopt this faster than the GUI.
It also makes Sysora scriptable (e.g. sysora status >> report.txt).

Scope

Rust

  • Add a cli feature flag to Cargo.toml so the binary can run headless
  • Add clap crate for argument parsing:
  clap = { version = "4", features = ["derive"] }
  • Commands to implement:
    • sysora status — compact one-screen snapshot (default)
    • sysora status --json — machine-readable JSON output
    • sysora processes — top 10 processes by RAM
    • sysora processes --top 20 — configurable count
    • sysora disk — disk usage per mount
    • sysora battery — battery health details
  • Reuse all existing data functions from lib.rs (no duplication)
  • Colorised terminal output using colored crate:
    • Green for healthy values
    • Amber for warnings
    • Red for critical

Example output — sysora status

Sysora v0.3.0 · Ubuntu 24.04 · hostname: mx9
RAM ████████░░ 7.97 GB / 19.32 GB (41%)
CPU ███░░░░░░░ 17% · 8 cores · i5-1135G7
Disk █████████░ 462 GB / 468 GB (99%) ⚠
Battery ███████░░░ 73% · Health 71% · 834 cycles
Temp ████░░░░░░ 54°C · Max 67°C

CI/CD

  • Add CLI binary to the GitHub Actions release workflow
  • Upload sysora-linux, sysora-macos, sysora-windows.exe as separate
    release artifacts alongside the GUI installer

Acceptance criteria

  • sysora status runs without launching the GUI
  • --json flag outputs valid parseable JSON
  • Works on Ubuntu, macOS, and Windows
  • CLI binary included in GitHub releases as a standalone download
  • Colors degrade gracefully in terminals that don't support ANSI

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions