Blitz (blitz v0.3.0)

Copy Markdown View Source

Lightweight parallel command execution for Elixir tooling.

Blitz runs isolated OS commands with bounded concurrency and prefixes streamed output with a stable command id so parallel logs remain readable.

For config-driven Mix monorepos, see Blitz.MixWorkspace.

Summary

Functions

Builds a %Blitz.Command{} from a keyword list or map.

Runs commands in parallel and returns their results.

Runs commands in parallel and raises if any command fails.

Types

command()

@type command() :: Blitz.Command.t()

run_option()

@type run_option() ::
  {:announce?, boolean()}
  | {:max_concurrency, pos_integer()}
  | {:prefix_output?, boolean()}
  | {:timeout, timeout()}

Functions

command(attributes)

@spec command(keyword() | map()) :: Blitz.Command.t()

Builds a %Blitz.Command{} from a keyword list or map.

run(commands, opts \\ [])

@spec run([command()], [run_option()]) ::
  {:ok, [Blitz.Result.t()]} | {:error, Blitz.Error.t()}

Runs commands in parallel and returns their results.

run!(commands, opts \\ [])

@spec run!([command()], [run_option()]) :: [Blitz.Result.t()]

Runs commands in parallel and raises if any command fails.