@hej / sigit / commits / 4b58743

Update README and docs for platform support and terminal mode

Clarify siGit's two modes, platform compatibility, and how terminal mode works on Unix vs Windows. Improve documentation comments and error handling for interactive mode.

paydii committed Apr 24, 2026 at 12:34 UTC 4b587436f48fd2ca68a240f472a49e00fdab91f5
2 files changed +45 -21
README.md
+15 -4
@@ -4,7 +4,16 @@
4
5 A coding agent for [smbCloud](https://smbcloud.xyz/) that runs entirely on your machine. No API keys. No cloud round-trips. The model lives in your local HuggingFace cache.
6
7 -Two modes: an ACP agent that Zed (and other ACP-compatible editors) spawns over stdio, or an interactive terminal chat when you run it directly.
7 +siGit has two modes:
8 +
9 +- ACP mode, where Zed or another ACP-compatible editor starts it over stdio
10 +- an interactive terminal chat when you run `sigit` yourself
11 +
12 +Current platform support:
13 +
14 +- macOS: ACP mode and interactive terminal mode
15 +- Linux: ACP mode and interactive terminal mode
16 +- Windows: ACP mode only for now
17
18 ## Install
19
@@ -16,7 +25,7 @@ cargo install sigit
25
26 The first time siGit starts, it downloads a GGUF model (~1–2 GB) from HuggingFace. Subsequent starts load from disk in a few seconds.
27
19 -On macOS, siGit shares the model cache with the siGit desktop app via an App Group container — if you've already downloaded it there, the CLI picks it up automatically.
28 +On macOS, siGit shares its model cache with the siGit desktop app through an App Group container. If the desktop app already downloaded the model, the CLI will reuse it.
29
30 ## Zed setup
31
@@ -33,11 +42,13 @@ Add to `~/.config/zed/settings.json`:
42 }
43 ```
44
36 -Use the absolute path — `~` expansion won't work here.
45 +Use the full absolute path. `~` will not be expanded here.
46
47 ## Terminal mode
48
40 -Running `sigit` directly in a terminal opens an interactive chat UI. Same model, same system prompt — handy for quick questions without opening an editor.
49 +If you run `sigit` directly in a terminal, it opens an interactive chat UI. It uses the same model and system prompt as the editor integration, so it is useful for quick questions when you do not want to open Zed first.
50 +
51 +That terminal mode currently depends on Unix terminal behavior, so it works on macOS and Linux. On Windows, siGit supports ACP/editor mode only right now.
52
53 ## Copyright
54
src/main.rs
+30 -17
@@ -1,17 +1,27 @@
1 -//! siGit Code — an ACP coding agent that runs a local LLM via Onde Inference platform.
1 +//! siGit Code is a local coding agent built on Onde Inference.
2 //!
3 -//! In interactive (TTY) mode **all** process output — `log::` crate events,
4 -//! `tracing` events from mistralrs_core, and even raw `println!` calls buried
5 -//! inside third-party crates — is redirected to `$TMPDIR/sigit.log` by
6 -//! rewiring the stdout/stderr file descriptors with `dup2(2)` before any
7 -//! library code runs. Ratatui receives a private copy of the original
8 -//! terminal fd so its rendering is unaffected.
3 +//! When you run it in an interactive terminal, all process output goes to
4 +//! `$TMPDIR/sigit.log` first. That includes `log::` events, `tracing` output
5 +//! from mistralrs_core, and even stray `println!` calls from dependencies.
6 +//! Ratatui gets its own copy of the real terminal handle, so the UI can keep
7 +//! drawing normally while the noisy stuff goes to the log file.
8 //!
10 -//! Two modes of operation:
9 +//! siGit has two modes:
10 +//! - ACP mode over stdio for editors like Zed
11 +//! - interactive terminal mode when you run it directly in a TTY
12 //!
12 -//! The model loads before the ACP `LocalSet` starts. This matters because
13 -//! `mistralrs` calls `block_in_place` internally, which panics inside
14 -//! `spawn_local` tasks. Loading on a normal multi-thread worker avoids that.
13 +//! Current platform support:
14 +//! - macOS: ACP mode and interactive terminal mode
15 +//! - Linux: ACP mode and interactive terminal mode
16 +//! - Windows: ACP mode only for now
17 +//!
18 +//! The interactive terminal path is still Unix-only because it relies on
19 +//! Unix file-descriptor redirection to keep logs away from the TUI.
20 +//!
21 +//! The model loads before the ACP `LocalSet` starts. That is important because
22 +//! `mistralrs` calls `block_in_place` internally, and that blows up inside
23 +//! `spawn_local` tasks. Loading it on a normal multi-thread worker avoids the
24 +//! problem.
25 //!
26 //! On macOS, the HF cache points at the App Group container shared with the
27 //! siGit desktop app. See [`setup`].
@@ -493,13 +503,16 @@ async fn main() -> anyhow::Result<()> {
503 // Redirect stdout/stderr to $TMPDIR/sigit.log *first* — before any
504 // library code can println!/eprintln!/log to the real terminal.
505 #[cfg(unix)]
496 - let (tty, cleanup_tty) = redirect_output_to_log()?;
506 + {
507 + let (tty, cleanup_tty) = redirect_output_to_log()?;
508 + init_logging(true);
509 + setup::setup_shared_model_cache();
510 + run_interactive(tty, cleanup_tty).await
511 + }
512 #[cfg(not(unix))]
498 - anyhow::bail!("interactive mode requires Unix (macOS / Linux)");
499 -
500 - init_logging(true);
501 - setup::setup_shared_model_cache();
502 - run_interactive(tty, cleanup_tty).await
513 + {
514 + anyhow::bail!("interactive mode requires Unix (macOS / Linux)");
515 + }
516 } else {
517 // ACP mode: no redirect needed, logs go to stderr.
518 init_logging(false);