Skip to main content

koda_cli/
lib.rs

1//! # koda-cli
2//!
3//! Internal library crate for the `koda` binary.
4//!
5//! **User-facing documentation lives at <https://lijunzh.github.io/koda/>**
6//!
7//! This crate's public API surface is exactly one function:
8//! [`run()`] — called by `main.rs`. Everything else is `pub(crate)`.
9
10// koda requires Unix (macOS or Linux). The Bash tool uses `sh` which does
11// not exist on Windows. Fail at compile time with a clear message.
12#[cfg(not(unix))]
13compile_error!(
14    "koda requires a Unix-like operating system (macOS or Linux). \
15     Windows is not supported. On Windows, use WSL2 instead: \
16     https://learn.microsoft.com/windows/wsl"
17);
18
19pub(crate) mod acp_adapter;
20pub(crate) mod ansi_parse;
21pub(crate) mod app;
22pub(crate) mod builtin_skills;
23pub(crate) mod completer;
24pub(crate) mod diff_render;
25pub(crate) mod headless;
26pub(crate) mod highlight;
27pub(crate) mod history_render;
28pub(crate) mod input;
29pub(crate) mod md_render;
30pub(crate) mod mouse_select;
31pub(crate) mod onboarding;
32pub(crate) mod repl;
33pub(crate) mod scroll_buffer;
34pub(crate) mod server;
35pub(crate) mod sink;
36pub(crate) mod startup;
37pub(crate) mod tool_history;
38pub(crate) mod tui_app;
39pub(crate) mod tui_commands;
40pub(crate) mod tui_context;
41pub(crate) mod tui_handlers_inference;
42pub(crate) mod tui_output;
43pub(crate) mod tui_render;
44pub(crate) mod tui_types;
45pub(crate) mod tui_viewport;
46pub(crate) mod tui_wizards;
47pub(crate) mod widgets;
48pub(crate) mod wrap_input;
49pub(crate) mod wrap_util;
50
51/// Binary entry point. The only public symbol the `koda` binary needs.
52pub async fn run() -> anyhow::Result<()> {
53    app::run().await
54}