rayvn

A shared library framework for bash 5.3+.

First Look

A minimal rayvn script:

#!/usr/bin/env rayvn-bash

usage() {
    show "Usage:" bold "greet" italic "NAME"
    bye "$@"
}

main() {
    init "$@"
    show primary "Hey ${name}!"
}

init() {
    declare -g name
    while (( $# )); do
        case "$1" in
            -h | --help) usage ;;
            -* | --*) usage "unknown option: $1" ;;
            *) name="${1^}" ;;
        esac
        shift
    done
    [[ -n ${name} ]] || usage "NAME is required"
}

source rayvn.up
main "$@"
  • #!/usr/bin/env rayvn-bash ensures bash 5.3+ if available, regardless of system defaults.
  • source rayvn.up bootstraps rayvn and loads the rayvn/core library automatically.
  • The show function is in rayvn/core and supports colored/styled text output.
  • All functions are defined before source rayvn.up so the file is fully parsed before main runs.
  • Pass library names to load additional libraries: source rayvn.up 'rayvn/spinner' 'rayvn/prompt'.

For installation, IDE setup, and development guidance, see the README.

Libraries

Scripting

Library Description
rayvn/core Core utilities, assertions and error handling.
rayvn/debug Debug logging and tracing.
rayvn/prompt Interactive user prompts.
rayvn/terminal Cursor control and terminal output.
rayvn/spinner Terminal spinners.
rayvn/secrets System keychain credential storage.
rayvn/oauth OAuth authorization code flow.
rayvn/theme Color themes.
rayvn/config Configuration file support.
rayvn/process Process management.

Testing

Library Description
rayvn/test Test assertions.
rayvn/test-harness Test runner.

Project Tooling

Library Description
rayvn/release GitHub release workflow.
rayvn/central Project registry.
rayvn/dependencies Dependency checking and Homebrew formula generation.
rayvn/function-docs Audit and update function doc comments.
rayvn/index Generate function indexes for AI agent use.
rayvn/lint Bash requirement linting.
rayvn/asciinema Asciinema cast recording and post-processing.
rayvn/typist Typing jitter model (log-normal distribution approximation).
rayvn/namespace Detect namespace collisions across registered rayvn project libraries.
  • valt — encrypted file archives using age (renovating, coming soon)
  • wardn — encrypted Bitwarden vault backups (renovating, coming soon)