aranet-cli 0.2.1

Command-line interface for Aranet environmental sensors
Documentation
[package]
name = "aranet-cli"
version.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true
rust-version.workspace = true
description = "Command-line interface for Aranet environmental sensors"
readme = "README.md"
keywords = ["aranet", "ble", "bluetooth", "sensors", "cli"]
categories = ["command-line-utilities", "hardware-support"]
include = ["src/**/*", "Cargo.toml", "README.md", "assets/**/*"]

[[bin]]
name = "aranet"
path = "src/main.rs"

# These tests run `aranet <subcommand>`, and subcommands only exist with `cli`.
# Without `cli` the binary starts the TUI whatever the arguments, so skip them.
# The explicit path lets the manifest parse in the Docker builds, which don't copy tests/.
[[test]]
name = "cli_integration"
path = "tests/cli_integration.rs"
required-features = ["cli"]

[features]
default = ["cli", "tui"]
# CLI feature - enables command-line interface with subcommands
cli = ["dep:aranet-service", "dep:clap", "dep:clap_complete", "dep:dialoguer", "dep:indicatif", "dep:tabled"]
# TUI feature - enables terminal user interface dashboard
tui = ["dep:ratatui", "dep:crossterm"]
# GUI feature - enables native desktop GUI (egui/eframe) with system tray and native menus
# Note: tray-icon re-exports muda, so we use that for menu bar to avoid Obj-C class conflicts
gui = ["dep:egui", "dep:eframe", "dep:egui_plot", "dep:image", "dep:tray-icon", "dep:notify-rust", "dep:open", "dep:objc2", "dep:objc2-app-kit", "dep:objc2-foundation"]

[dependencies]
aranet-core = { workspace = true, features = ["service-client"] }
aranet-store.workspace = true
aranet-types.workspace = true
anyhow.workspace = true
serde.workspace = true
serde_json.workspace = true
time.workspace = true
tokio.workspace = true
tokio-util = { version = "0.7", features = ["rt"] }
tracing.workspace = true
tracing-subscriber.workspace = true
dirs = "6.0.0"
toml.workspace = true
futures.workspace = true
owo-colors = "4"
terminal_size = "0.4"

# CLI-only dependencies (optional)
# `aranet server` runs the aranet-service HTTP API and collector in-process
aranet-service = { workspace = true, optional = true }
clap = { workspace = true, features = ["env"], optional = true }
clap_complete = { version = "4", optional = true }
dialoguer = { version = "0.12.0", optional = true }
indicatif = { version = "0.18.3", optional = true }
tabled = { version = "0.20.0", optional = true, features = ["ansi"] }

# TUI-only dependencies (optional)
ratatui = { workspace = true, optional = true }
crossterm = { workspace = true, optional = true }

# GUI-only dependencies (optional)
egui = { workspace = true, optional = true }
eframe = { workspace = true, optional = true }
egui_plot = { version = "0.34.0", optional = true }
image = { version = "0.25", optional = true, default-features = false, features = ["png"] }

# System tray and native menu support (GUI only)
# Note: tray-icon re-exports muda internally for menu bar support
tray-icon = { version = "0.21", optional = true }
notify-rust = { version = "4", optional = true }
open = { version = "5", optional = true }

# macOS dock icon control (for hide-to-tray)
[target.'cfg(target_os = "macos")'.dependencies]
objc2 = { version = "0.5", optional = true }
objc2-app-kit = { version = "0.2", optional = true, features = ["NSApplication", "NSRunningApplication", "NSImage"] }
objc2-foundation = { version = "0.2", optional = true, features = ["NSData"] }

[dev-dependencies]
tempfile = "3"
btleplug = { workspace = true }
uuid = { workspace = true }

# cargo-dist configuration for this binary
[package.metadata.dist]
# Include this package in distributions
dist = true

# cargo-deb configuration for Debian package generation
[package.metadata.deb]
# Package name (defaults to crate name with underscores replaced by dashes)
name = "aranet"
# Maintainer field for the .deb package
maintainer = "Cameron Rye <cameronrye@users.noreply.github.com>"
# Short description for package managers
copyright = "2024-2026, Cameron Rye"
# Extended description for apt
extended-description = """
Aranet is a command-line interface for Aranet environmental sensors.
It supports Aranet4 (CO2), Aranet2 (temperature/humidity), AranetRn+ (radon),
and Aranet Radiation sensors via Bluetooth Low Energy (BLE).

Features:
 - Scan for nearby Aranet devices
 - Read current sensor measurements
 - Download and export historical data
 - Configure device settings
 - Continuous monitoring with watch mode
 - Interactive terminal dashboard (TUI)
 - Local SQLite cache for offline access
"""
# Debian section
section = "utils"
# Priority
priority = "optional"
# Assets to include in the package
assets = [
    # Binary
    ["target/release/aranet", "usr/bin/aranet", "755"],
    # Man page (if exists)
    # ["target/release/aranet.1", "usr/share/man/man1/", "644"],
    # Shell completions
    # ["target/release/completions/aranet.bash", "usr/share/bash-completion/completions/aranet", "644"],
    # ["target/release/completions/aranet.zsh", "usr/share/zsh/vendor-completions/_aranet", "644"],
    # ["target/release/completions/aranet.fish", "usr/share/fish/vendor_completions.d/aranet.fish", "644"],
]
# Runtime dependencies
depends = "$auto, libc6, libdbus-1-3"
# Suggested packages
suggests = "bluetooth"
# Conflicts with other packages
# conflicts = ""
# Replaces other packages
# replaces = ""

# cargo-release: aranet-cli is the "representative" crate, so the steps that must
# happen once per release (the vX.Y.Z tag and the CHANGELOG heading) happen here.
# See release.toml for the workspace-wide settings.
[package.metadata.release]
tag = true
tag-name = "v{{version}}"
tag-message = "chore: release v{{version}}"
# Turn "## [Unreleased]" into "## [X.Y.Z] - <date>" under a fresh "## [Unreleased]".
# Skipped for pre-releases (cargo-release's `prerelease = false` default).
pre-release-replacements = [
  { file = "../../CHANGELOG.md", search = "## \\[Unreleased\\]", replace = "## [Unreleased]\n\n## [{{version}}] - {{date}}", exactly = 1 },
]