Skip to main content

Module bash

Module bash 

Source
Expand description

Shared-state wrapper for bash execution.

Bash holds execution configuration — environment variables, PTY mode, and working directory — so callers don’t have to reconstruct options on every invocation.

§Example

ⓘ
use cosh_tools::bash::Bash;

let bash = Bash::new().cwd("/project");
let mut stream = bash.run("ls -la")?;

Re-exports§

pub use types::BashRunInput;

Modules§

bsh
Bash executor with security pattern validation and async streaming output.
types

Structs§

Bash
Shared-state wrapper for bash execution.

Constants§

DEFAULT_TIMEOUT_MS
Default execution timeout in milliseconds: 10 minutes (600_000 ms).

Functions§

strip_ansi
Clean PTY output for display and model consumption.