Skip to content

armgit / jan

Public Imported from GitHub
0

Jan is an open source alternative to ChatGPT that runs 100% offline on your computer.

2.0 KB
Raw Blame
[package]
name = "jan-cli"
version = "0.8.8"
description = "Headless CLI for Jan: chat with remote AI models in an interactive agent console."
authors = ["Jan <[email protected]>"]
license = "Apache-2.0"
repository = "https://github.com/janhq/jan"
edition = "2021"
# Matches ../Cargo.toml: `agent-client-protocol` (behind `jan acp`) needs 1.88.
rust-version = "1.88"

# A standalone crate (NOT a workspace member of ../Cargo.toml) so the Tauri
# bundler never enumerates it as a bin target of the desktop app -- tauri-cli
# ignores required-features and would otherwise try to copy a `jan` binary the
# desktop build never produces. Standalone also keeps it clear of the desktop
# build's `ctoml package.name "Jan-<channel>"` rename, which a member could not
# resolve its `package = "Jan"` dep against. `.cargo/config.toml` redirects
# output to ../target so `target/release/jan` is unchanged.
[[bin]]
name = "jan"
path = "src/main.rs"

[features]
cli = ["app_lib/cli"]

[dependencies]
app_lib = { path = "..", package = "Jan", default-features = false }
tauri-plugin-agent-tools = { path = "../plugins/tauri-plugin-agent-tools", default-features = false }
chrono = { version = "0.4", features = ["serde"] }
clap = { version = "4", features = ["derive"] }
console = "0.15"
env_logger = "0.11"
serde_json = "1.0"
tokio = { version = "1", features = ["full"] }

# Real-PTY tests (tests/tui_panic.rs, tests/tui_suspend.rs): nix's safe
# `openpty`, `kill` and `waitpid` keep them free of `unsafe`. Pinned to the
# version ../Cargo.toml uses.
[target.'cfg(unix)'.dev-dependencies]
nix = { version = "=0.30.1", features = ["term", "signal", "process"] }

# Mirror the desktop crate's release profile: the CLI inherited it while it was a
# bin of ../Cargo.toml, and a standalone crate would otherwise fall back to the
# default (opt-level 3, no LTO) and ship a differently sized binary.
[profile.release]
opt-level = "z"
lto = "fat"
strip = "symbols"
codegen-units = 1
panic = "unwind"
overflow-checks = false
debug = false
debug-assertions = false
incremental = false
rpath = false