GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - bashly-framework/bashly: Bash command line framework and CLI generator

BranchesTags
Open more actions menu

Latest commit

 

History

1,765 Commits
1,765 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
.vscode
.vscode
 
 
bin
bin
 
 
edge
edge
 
 
examples
examples
 
 
lib
lib
 
 
schemas
schemas
 
 
spec
spec
 
 
support
support
 
 
.codespellrc
.codespellrc
 
 
.dockerignore
.dockerignore
 
 
.envrc.example
.envrc.example
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
.rspec
.rspec
 
 
.rubocop.yml
.rubocop.yml
 
 
.rubycritic.yml
.rubycritic.yml
 
 
CHANGELOG.md
CHANGELOG.md
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
Dockerfile
Dockerfile
 
 
Gemfile
Gemfile
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
bashly.gemspec
bashly.gemspec
 
 
docker-compose.yml
docker-compose.yml
 
 
release.md
release.md
 
 
runfile
runfile
 
 

Repository files navigation

Bashly - Bash CLI Framework and Generator

Create feature-rich bash scripts using simple YAML configuration

bashly.dev


demo

repocard

Bashly is a command line application (written in Ruby) that lets you generate feature-rich bash command line tools.

Bashly lets you focus on your specific code, without worrying about command line argument parsing, usage texts, error messages and other functions that are usually handled by a framework in any other programming language.

It is available both as a ruby gem and as a docker image.

Documentation

  • Bashly Homepage
  • Examples
  • Bashly AI Assistant

How it works

  1. You provide a YAML configuration file, describing commands, sub-commands, arguments, and flags. Running bashly init creates an initial sample YAML file for you (example).
  2. Bashly then automatically generates a bash script (when you run bashly generate) that can parse and validate user input, provide help messages, and run your code for each command.
  3. Your code for each command is kept in a separate file, and can be merged again if you change it (example).

Features

Bashly is responsible for:

  • Generating a single, standalone bash script.
  • Generating a human readable, shellcheck-compliant and shfmt-compliant script.
  • Generating usage texts and help screens, showing your tool's arguments, flags and commands (works for sub-commands also).
  • Parsing the user's command line and extracting:
    • Optional or required positional arguments.
    • Optional or required option flags (with or without flag arguments).
    • Commands (and sub-commands).
    • Standard flags (like --help and --version).
  • Preventing your script from running unless the command line is valid.
  • Providing you with a place to input your code for each of the functions your tool performs, and merging it back to the final script.
  • Providing you with additional (optional) framework-style, standard library functions:
    • Color output.
    • Config file management (INI format).
    • YAML parsing.
    • Shell completions (bash, fish and zsh).
    • and more.
  • Auto-generating markdown and man page documentation for your script.

Contributing / Support

If you experience any issue, have a question or a suggestion, or if you wish to contribute, feel free to open an issue or start a discussion.

Visit the How to contribute page for more information.

About

Bash command line framework and CLI generator

bashly.dev

Topics

bashbash-scriptingclicli-frameworkcli-generatorcode-generatorruby

Resources

Readme
MIT license

Contributing

Contributing
Activity
Custom properties

Stars

2.5k stars

Watchers

14 watching

Forks

95 forks
Report repository

Releases

Sponsor this project

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.