Examples

The examples folder in the GitHub repository contains many detailed and documented example configuration files, with their output.

View Examples on GitHub

All examples are listed below for convenience.

Basic use

Basic features

Advanced configuration features

Customization

Bashly library features

  • config - using the config library for easy access to INI files
  • ini - using the ini library for direct, low level access to INI files
  • yaml - using the YAML reading functions
  • colors - using the color print feature
  • completions - adding bash completion functionality
  • validations - adding validation functions for arguments, flags or environment variables
  • hooks - adding before/after hooks
  • stacktrace - adding stacktrace on error

Real-world-like examples

  • docker-like - a sample script with deep commands (like docker container run)
  • git-like - a sample script with subcommands similar to git

Documentation generation

Other examples

  • settings - using the settings.yml file to adjust bashly's behavior
  • help-command - adding a help command to your script

Real world examples

If you're interested in real-world examples developed by the bashly community, check out the Made with Bashly wiki page.