# `Omni.Tools.Bash`
[🔗](https://github.com/aaronrussell/omni_tools/blob/v0.1.0/lib/omni/tools/bash.ex#L1)

An `Omni.Tool` for executing shell commands.

Runs commands in a configured shell (bash by default, falling back to sh)
with a working directory, optional environment variables, and timeout.

    tool = Omni.Tools.Bash.new(dir: "/path/to/workspace")
    tool = Omni.Tools.Bash.new(dir: "/app", timeout: 60_000, env: [{"NODE_ENV", "test"}])

The tool delegates execution to `Omni.Tools.Bash.Runner`, which can also
be used independently of the tool machinery.

## Options

- `:dir` (required) — working directory. Must exist at init time.
- `:env` — extra environment variables as `[{String.t(), String.t()}]`.
  Merged additively with the inherited environment. Default `[]`.
- `:timeout` — execution timeout in milliseconds. Default `30_000`.
- `:max_output` — output truncation limit in bytes. Tail-biased, snapped to
  line boundaries. Default `50_000`.
- `:shell` — explicit shell as `{executable, args}` tuple.
  Default: auto-resolved (bash then sh fallback).
- `:command_prefix` — string prepended to every command. Default `nil`.

# `new`

Builds a `%Omni.Tool{}` struct with a bound handler.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
