net-cli 0.27.0

Unified `net-mesh` command-line tool for the Net mesh
[package]
name = "net-cli"
version = "0.27.0"
edition = "2021"
description = "Unified `net-mesh` command-line tool for the Net mesh"
license = "Apache-2.0"
repository = "https://github.com/ai-2070/net"
publish = true

[[bin]]
name = "net-mesh"
path = "src/main.rs"

[dependencies]
net-sdk = { package = "net-mesh-sdk", version = "0.27.0", path = "../sdk", default-features = false, features = [
    "net",
    "nat-traversal",
    "cortex",
    "compute",
    "groups",
    "meshos",
    "deck",
    "dataforts",
    "meshdb",
    "aggregator",
    "tool",
] }

# Clap derives the argv parser from typed structs; `env` enables
# `NET_MESH_*` env-var fallback for global flags (`--profile` etc.).
clap = { version = "4", features = ["derive", "env"] }
# `clap_complete` powers `net-mesh completion <shell>`; `clap_mangen`
# powers `net-mesh man`. Release tarballs run those subcommands
# post-build to capture the output into `share/bash-completion/...`
# and `share/man/man1/net-mesh.1`.
clap_complete = "4"
clap_mangen = "0.3"

# Multi-thread tokio for the SDK; macros for `#[tokio::main]`.
tokio = { version = "1", features = [
    "macros",
    "rt-multi-thread",
    "sync",
    "time",
    "signal",
    "fs",
    "io-std",
    "io-util",
] }

# Serde stack for output dispatch + identity/config file parsing.
serde = { version = "1", features = ["derive"] }
serde_json = "1"
serde_yaml = "0.9"

# Pretty terminal tables for `--output table` (Phase 1: read-only
# views).
comfy-table = "7"

# Progress display for `net transfer recv-blob` / `recv-dir`. The SDK
# fetch is a single await with no per-chunk callback, so this drives a
# steady-tick spinner while the fetch runs, then a final one-line
# summary — live feedback for the directory-transfer demo without
# fabricating per-chunk counts the substrate doesn't surface. Drawn to
# stderr and suppressed under `--quiet` / non-TTY so it never pollutes
# `--output json` on stdout.
indicatif = "0.18"

# Tracing-subscriber wires `-v` / `-vv` / `-vvv` to env-filter
# levels. Format pinned to compact for stderr.
tracing-subscriber = { version = "0.3", features = ["env-filter", "fmt"] }
tracing = "0.1"

# XDG paths + TOML for the config + identity stores.
dirs = "6"
toml = "1.0"

# Streaming combinators used by the audit/log/failures ndjson
# outputs and the snapshot watch loop.
futures = "0.3"

# Hex codec for identity material (seed / public key / signature).
hex = "0.4"

# SHA-256 for the operator-visible identity fingerprint. ssh
# uses SHA-256 for the analogous `ssh-keygen -lf` surface; we
# mirror the algorithm so operators recognize the fingerprint
# format at a glance.
sha2 = "0.11"

# Typed errors at the config / identity boundary.
thiserror = "2"

# `cargo binstall net-cli` resolves prebuilt tarballs against the
# `release-binaries-cli.yml` workflow's GitHub Release assets.
# Defaults to the binstall convention except for the tag prefix
# (`cli-v*`, not `net-cli-v*`) and the binary name (the crate is
# `net-cli` but the binary inside is `net-mesh`).
[package.metadata.binstall]
pkg-url = "{ repo }/releases/download/cli-v{ version }/{ name }-v{ version }-{ target }.{ archive-suffix }"
bin-dir = "{ name }-v{ version }-{ target }/net-mesh{ binary-ext }"
pkg-fmt = "tgz"

[package.metadata.binstall.overrides.x86_64-pc-windows-msvc]
pkg-fmt = "zip"

[dev-dependencies]
# Drive the binary in integration tests.
assert_cmd = "2"
predicates = "3"
tempfile = "3"

# Async test helpers — `#[tokio::test]` + the SDK's in-process
# cluster fixtures.
tokio = { version = "1", features = [
    "rt-multi-thread",
    "macros",
    "time",
    "test-util",
] }

# Boot the aggregator-daemon in-process for the remote-attach
# integration test (`tests/aggregator_remote.rs`). The CLI
# subprocess handshakes against this booted daemon's MeshNode.
#
# Path-only on purpose — net-aggregator-daemon is a binary
# crate that doesn't publish to crates.io, so giving this
# dev-dep a `version = ...` field would make `cargo publish
# --dry-run` (and any real publish) fail at the dependency-
# resolution step. With only `path` set, cargo drops the
# dev-dep entirely when packaging.
net-aggregator-daemon = { path = "../aggregator-daemon" }