Skip to content

Commit ada13a1

Browse files
committed
update readme (#93)
1 parent d342f14 commit ada13a1

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

README.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,52 @@ Create feature-rich bash scripts using simple YAML configuration
1717

1818
</div>
1919

20+
Bashly is a command line application (written in Ruby) that lets you
21+
generate feature-rich bash command line tools.
22+
23+
Bashly lets you focus on your specific code, without worrying about command line
24+
argument parsing, usage texts, error messages and other functions that are
25+
usually handled by a framework in any other programming language.
26+
27+
It is available both as a [ruby gem](https://rubygems.org/gems/bashly) and as
28+
a [docker image](https://hub.docker.com/r/dannyben/bashly).
29+
30+
2031
## Documentation
2132

2233
- [Bashly Homepage][docs]
2334
- [Examples][examples]
2435

36+
## How it works
37+
38+
1. You provide a YAML configuration file, describing commands, sub-commands,
39+
arguments, and flags. Running `bashly init` creates an initial sample YAML
40+
file for you ([example](https://github.com/DannyBen/bashly/tree/master/examples/minimal#bashlyyml)).
41+
2. Bashly then automatically generates a bash script (when you run
42+
`bashly generate`) that can parse and validate user input, provide help
43+
messages, and run your code for each command.
44+
3. Your code for each command is kept in a separate file, and can be merged
45+
again if you change it.
46+
47+
## Features
48+
49+
Bashly is responsible for:
50+
51+
- Generating a **single, standalone bash script**.
52+
- Generating **usage texts** and help screens, showing your tool's arguments, flags and commands (works for sub-commands also).
53+
- Parsing the user's command line and extracting:
54+
- Optional or required **positional arguments**.
55+
- Optional or required **option flags** (with or without flag arguments).
56+
- **Commands** (and sub-commands).
57+
- Standard flags (like **--help** and **--version**).
58+
- Preventing your script from running unless the command line is valid.
59+
- 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.
60+
- Providing you with additional (optional) framework-style, standard library functions:
61+
- **Color output**.
62+
- **Config file management** (INI format).
63+
- **YAML parsing**.
64+
- **Bash completions**.
65+
- and more.
2566

2667
## Contributing / Support
2768

0 commit comments

Comments
 (0)