boop

Object-oriented programming for bash 4.3+ — real classes, objects, inheritance, and a standard library, in pure bash.


Project maintained by ydbxmhc Hosted on GitHub Pages

boop — Class & Tool Reference

Complete catalog of every class and tool in the boop framework, grouped by namespace.

Jump to: Core · Collection · Data · Games · Geometry · Mixins · Net · Text · Testing · System · Tools · Guides · Project


Core Framework

The framework itself and its primary entry points.

Document Description
boop The framework — object model, dispatch, the subshell-free return system, lifecycle/destroy, and the _Me / _Static / _Property / _Stack core primitives. Start here for how boop works under the hood.
API reference Complete public API surface across the framework
Tutorial Step-by-step introduction to boop

Collection

Containers, sequences, maps, and sets. All share the iterator protocol from Container.

Class Description
Collection.Container Abstract base; provides the iterator protocol and forEach
Collection.List Indexed array — push/pop, shift/unshift, slice, filter/map/reduce
Collection.Map Insertion-ordered key-value store
Collection.Map.Fast Hash-table map — O(1) lookup, no insertion-order guarantee
Collection.Queue FIFO queue
Collection.Queue.Fast Ring-buffer FIFO — O(1) all operations
Collection.Set Unordered unique-value collection — union, intersect, diffs, minus
Collection.Stack LIFO stack
Collection.Stack.Fast Array-backed LIFO with minimal overhead

Data

Class Description
Data.JSON Pure-bash JSON parser and serializer — no jq required
DateTime Date/time parsing, formatting, and arithmetic
Math Arbitrary-precision arithmetic beyond bash builtins
SemVer Semantic version parsing and comparison

Games

Class Description
Games.Card Generic card base — property bag, no game logic
Games.Deck Shuffleable, drawable List (Fisher-Yates shuffle, pop-based draw)
Games.PlayingCard Standard playing card — suit, rank, ANSI render, newDeck factory

See also the combined Games reference for a narrative walkthrough of all three together.


Geometry

Class Description
Geometry.Box 2D axis-aligned bounding box — area, overlap, contains
Geometry.Cube 3D box — volume, surface area; extends Box

Mixins

Composable behaviours that add capability to any boop class without forcing a particular inheritance chain. A class can include multiple mixins.

Mixin Description
Mixins.Eventable Per-object publish/subscribe events — on/emit/off, LIFO dispatch
Mixins.Greetable Adds configurable greeting behaviour
Mixins.Serializable Object serialization and deserialization
Mixins.Taggable Tag and label management
Mixins.Terminal ANSI terminal output — colours, cursor control, clear

See the mixin guide for how to author and apply mixins.


Net

Class Description
Net.Socket Plaintext TCP connection via bash /dev/tcp — no TLS

Text

Class Description
Text.String String objects — transform, inspect, compose in pipelines

Testing

Class Description
Testing.TestSuite Test runner — section grouping, assertion helpers, summary report

System

Class Description
Args Command-line argument parser
Config Structured config reader/writer — flat key=value and INI
Signal LIFO signal handler stacks layered over bash trap
Stream Record-oriented file-descriptor reader

Tools

Standalone command-line tools distributed as single-file scripts from boopshell.com/dist.

Tool Description
lens Interactive class inspector REPL
probe Diagnostic tool — inspect live objects and framework state
boson JSON processor CLI
collider Single-file bundle builder — topological dependency resolver

Guides & References

Document Description
Language comparison boop idioms side by side with Python, Ruby, and Go
Mixin guide How to author and apply mixins
Iterator guide Deep dive into the iterator protocol
CLI tools overview When to reach for lens / boson / probe / collider, and shared conventions
GOTCHAS Common pitfalls and their fixes
STANDARDS Coding standards for boop classes
Bash style guide Shell conventions used throughout the codebase

(The API reference and Tutorial live under Core Framework above.)


Project & Design Notes

Licensing, roadmap, history, design notes, and point-in-time audits.

Document Description
License How boop is licensed — MIT for the code, CC BY 4.0 for the docs
TODO Active roadmap and open design questions
DEVLOG Development log — completed work and the reasoning behind it
PLAN High-level project plan
ArgParser design Design notes for the Args parser
Audit report Full-codebase audit findings
Test audit Test-coverage audit
Bash version audit Bash 4.3+ compatibility audit