Skip to content

Latest commit

 

History

History
331 lines (284 loc) · 21.3 KB

File metadata and controls

331 lines (284 loc) · 21.3 KB

Base Bash API Reference

This file is generated from base_api_manifest.yaml; edit the manifest or the module READMEs instead.

Contract

  • Manifest schema: 1
  • API version: 2.0.0
  • Minimum Bash: 4.2

Every module remains a single sourceable file. Signatures, inputs, outputs, statuses, and side effects are normative in the linked module README and API charter.

  • Public functions: base_
  • Globals: BASE_BASH_LIBS_
  • Internals: __base_bash_libs_

Modules

std

  • Kind: sourceable-library
  • Source: lib/bash/std/lib_std.sh
  • Documentation: lib/bash/std/README.md
  • Tests: lib/bash/std/tests/lib_std.bats
  • Dependencies: none
  • Optional commands: awk,basename,cat,command,cp,date,grep,mktemp,mv,printf,rm,sed,tput
  • Stability: stable; since 2.0.0; deprecated: false
  • Inputs: documented per symbol in the module README and API charter
  • Outputs: documented per symbol; named outputs are caller-owned
  • Statuses: documented per symbol; recoverable failures return status
  • Side effects: documented per symbol; sourcing is passive

Public symbols

file

  • Kind: sourceable-library
  • Source: lib/bash/file/lib_file.sh
  • Documentation: lib/bash/file/README.md
  • Tests: lib/bash/file/tests/lib_file.bats
  • Dependencies: std
  • Optional commands: awk,cmp,cp,mv,rm,stat
  • Stability: stable; since 2.0.0; deprecated: false
  • Inputs: documented per symbol in the module README and API charter
  • Outputs: documented per symbol; named outputs are caller-owned
  • Statuses: documented per symbol; recoverable failures return status
  • Side effects: documented per symbol; sourcing is passive

Public symbols

git

  • Kind: sourceable-library
  • Source: lib/bash/git/lib_git.sh
  • Documentation: lib/bash/git/README.md
  • Tests: lib/bash/git/tests/lib_git.bats
  • Dependencies: std
  • Optional commands: git,awk,grep,mktemp,rm,sleep
  • Stability: stable; since 2.0.0; deprecated: false
  • Inputs: documented per symbol in the module README and API charter
  • Outputs: documented per symbol; named outputs are caller-owned
  • Statuses: documented per symbol; recoverable failures return status
  • Side effects: documented per symbol; sourcing is passive

Public symbols

gh

  • Kind: sourceable-library
  • Source: lib/bash/gh/lib_gh.sh
  • Documentation: lib/bash/gh/README.md
  • Tests: lib/bash/gh/tests/lib_gh.bats
  • Dependencies: std
  • Optional commands: gh,awk,grep,mktemp,rm,sleep,timeout,gtimeout
  • Stability: stable; since 2.0.0; deprecated: false
  • Inputs: documented per symbol in the module README and API charter
  • Outputs: documented per symbol; named outputs are caller-owned
  • Statuses: documented per symbol; recoverable failures return status
  • Side effects: documented per symbol; sourcing is passive

Public symbols

str

  • Kind: sourceable-library
  • Source: lib/bash/str/lib_str.sh
  • Documentation: lib/bash/str/README.md
  • Tests: lib/bash/str/tests/lib_str.bats
  • Dependencies: std
  • Optional commands: none
  • Stability: stable; since 2.0.0; deprecated: false
  • Inputs: documented per symbol in the module README and API charter
  • Outputs: documented per symbol; named outputs are caller-owned
  • Statuses: documented per symbol; recoverable failures return status
  • Side effects: documented per symbol; sourcing is passive

Public symbols

arg

  • Kind: sourceable-library
  • Source: lib/bash/arg/lib_arg.sh
  • Documentation: lib/bash/arg/README.md
  • Tests: lib/bash/arg/tests/lib_arg.bats
  • Dependencies: std
  • Optional commands: awk,grep
  • Stability: stable; since 2.0.0; deprecated: false
  • Inputs: documented per symbol in the module README and API charter
  • Outputs: documented per symbol; named outputs are caller-owned
  • Statuses: documented per symbol; recoverable failures return status
  • Side effects: documented per symbol; sourcing is passive

Public symbols

list

  • Kind: sourceable-library
  • Source: lib/bash/list/lib_list.sh
  • Documentation: lib/bash/list/README.md
  • Tests: lib/bash/list/tests/lib_list.bats
  • Dependencies: std
  • Optional commands: none
  • Stability: stable; since 2.0.0; deprecated: false
  • Inputs: documented per symbol in the module README and API charter
  • Outputs: documented per symbol; named outputs are caller-owned
  • Statuses: documented per symbol; recoverable failures return status
  • Side effects: documented per symbol; sourcing is passive

Public symbols

cli

  • Kind: sourceable-library
  • Source: lib/bash/cli/lib_cli.sh
  • Documentation: lib/bash/cli/README.md
  • Tests: lib/bash/cli/tests/lib_cli.bats
  • Dependencies: std
  • Optional commands: none
  • Stability: stable; since 2.0.0; deprecated: false
  • Inputs: documented per symbol in the module README and API charter
  • Outputs: documented per symbol; parsed results use BASE_BASH_LIBS_CLI_RESULT_* globals and named result variables
  • Statuses: documented per symbol; usage and validation errors return status 2
  • Side effects: documented per symbol; sourcing is passive and completion/help are non-mutating

Public symbols

app

  • Kind: sourceable-library
  • Source: lib/bash/app/lib_app.sh
  • Documentation: lib/bash/app/README.md
  • Tests: lib/bash/app/tests/lib_app.bats
  • Dependencies: std,cli
  • Optional commands: none
  • Stability: stable; since 2.0.0; deprecated: false
  • Inputs: documented per symbol in the module README and API charter
  • Outputs: documented per symbol; reports are redacted by the secret attribute
  • Statuses: recoverable failures return status; malformed configuration returns 2
  • Side effects: configuration state and lifecycle hooks are explicit; sourcing is passive

Public symbols

launcher

  • Kind: executable-launcher
  • Source: bin/base-bash
  • Documentation: docs/v2-api-contract.md
  • Tests: tests/launcher.bats
  • Dependencies: std
  • Optional commands: awk,basename,cat,cp,date,dirname,grep,mktemp,mv,readlink,rm,sed,bash,git,gh,timeout,gtimeout
  • Stability: stable; since 2.0.0; deprecated: false
  • Inputs: --help, --version, check, or [--] <script> [args...]; BASE_BASH_LIBS_DIR may select a package path
  • Outputs: help/version/check records and delegated script output; application stdout remains application-owned
  • Statuses: help/version 0; check 0 or 1; usage errors 2; delegated application status is preserved
  • Side effects: sources the stdlib and starts the delegated script; check is non-mutating

Public symbols