harn-cli 0.8.40

CLI for the Harn programming language — run, test, REPL, format, and lint
Documentation
[package]
name = "harn-cli"
version.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true
homepage.workspace = true
description = "CLI for the Harn programming language — run, test, REPL, format, and lint"
build = "build.rs"
# Two bins ship in this crate: `harn` (the main CLI) and
# `harn-container-probe` (a tiny tool used by the Dockerfile healthcheck,
# introduced in #186). `default-run` makes plain `cargo run -p harn-cli`
# invoke the main CLI so hooks and release scripts don't need to spell
# out `--bin harn` everywhere.
default-run = "harn"
# portal-dist/ is a gitignored build artifact produced by `npm run build` in
# crates/harn-cli/portal. It is embedded at compile time via include_dir! in
# src/commands/portal/assets.rs, so it must ship with the published crate.
# The release workflow (scripts/release_ship.sh) builds the portal before
# invoking cargo publish; this `include` field forces cargo to package the
# resulting portal-dist/ tree even though it is gitignored.
include = [
    "src/**/*",
    "data/**/*",
    "assets/**/*",
    "build.rs",
    "Cargo.toml",
    "portal-dist/**/*",
]

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

[dependencies]
harn-lexer = { path = "../harn-lexer", version = "0.8" }
harn-parser = { path = "../harn-parser", version = "0.8" }
harn-ir = { path = "../harn-ir", version = "0.8" }
harn-vm = { path = "../harn-vm", version = "0.8", features = ["otel", "testbench-wasi"] }
harn-hostlib = { path = "../harn-hostlib", version = "0.8", optional = true }
harn-lint = { path = "../harn-lint", version = "0.8" }
harn-modules = { path = "../harn-modules", version = "0.8" }
harn-fmt = { path = "../harn-fmt", version = "0.8" }
harn-serve = { path = "../harn-serve", version = "0.8" }
harn-skills = { path = "../harn-skills", version = "0.8" }
harn-stdlib = { path = "../harn-stdlib", version = "0.8" }
async-trait = "0.1"
axum = { version = "0.8", features = ["ws"] }
axum-server = { version = "0.8", features = ["tls-rustls"] }
tokio = { version = "1", features = ["rt-multi-thread", "macros", "net", "io-util", "signal", "sync", "time", "process"] }
serde_json = "1"
serde_yml = "0.0.12"
semver = "1"
reedline = "0.47"
nu-ansi-term = "0.50"
toml = "1.1"
serde = { version = "1", features = ["derive"] }
notify = "8"
reqwest = { version = "0.12", default-features = false, features = ["json", "rustls-tls", "blocking", "stream"] }
futures = "0.3"
blake3 = "1"
sha2 = "0.11"
hmac = "0.13"
tar = { version = "0.4", default-features = false }
flate2 = "1"
subtle = "2.6"
base64 = "0.22"
ed25519-dalek = { version = "2", features = ["pem", "pkcs8"] }
url = "2"
webbrowser = "1"
rand = "0.10"
regex = "1"
jsonschema = { version = "0.46.4", default-features = false }
jsonwebtoken = { version = "10", default-features = false, features = ["use_pem", "aws_lc_rs"] }
clap = { version = "4", features = ["derive", "env", "string"] }
clap_complete = "4"
rpassword = "7"
tower = { version = "0.5", features = ["util"] }
time = { version = "0.3", features = ["formatting", "parsing"] }
tempfile = "3"
include_dir = "0.7"
uuid = { version = "1", features = ["v4", "v7"] }
chrono-tz = "0.10.4"
croner = "3.0.1"
jmespath = "0.5.0"
rustls = { version = "0.23", features = ["aws-lc-rs"] }
tracing = "0.1"
fs2 = "0.4"
thiserror = "2"
which = "8"

[target.'cfg(unix)'.dependencies]
libc = "0.2"

# Build-time dependencies for the AOT bytecode embedding step (G7 / harn#2300).
# `build.rs` reuses the runtime compiler + cache-artifact encoder to emit a
# `.harnbc` for every script in `harn_stdlib::STDLIB_CLI_SCRIPTS`; the
# resulting bytes are embedded via `include_bytes!` and made discoverable
# through `harn_cli::cli_bytecode::find_cli_script_bytecode`. Both crates are
# downstream of `harn-cli` only via runtime deps, so no cycle is introduced.
#
# Feature flags here mirror the runtime `[dependencies]` `harn-vm` entry on
# purpose: resolver=2 isolates build- and runtime-dep feature sets, and a
# divergent set would compile `harn-vm` twice with different cfgs. Keeping
# the lists in sync lets Cargo dedupe and keeps clippy diagnostics aligned
# across the two compile units.
[build-dependencies]
harn-vm = { path = "../harn-vm", version = "0.8", features = ["otel", "testbench-wasi"] }
harn-stdlib = { path = "../harn-stdlib", version = "0.8" }

[features]
default = ["hostlib"]
# Wire `harn-hostlib`'s code-intelligence and tool builtins into the ACP
# server. Default-on so `harn run`-driven scripts that name a hostlib
# builtin work without extra flags. Disable with `--no-default-features` if
# you want a slimmer build that doesn't pull tree-sitter/notify/etc.
hostlib = ["dep:harn-hostlib", "harn-serve/hostlib"]

[dev-dependencies]
harn-mcp-rc-compat = { path = "../harn-mcp-rc-compat" }
rcgen = "0.14"
tokio-tungstenite = { version = "0.29", default-features = false, features = ["connect", "rustls-tls-webpki-roots"] }
wat = "1"