https://github.com/swagdevops/bohu
https://github.com/swagdevops/bohu
Last synced: 12 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/swagdevops/bohu
- Owner: SwagDevOps
- License: gpl-3.0
- Created: 2018-08-15T21:40:58.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-07-17T21:19:26.000Z (almost 3 years ago)
- Last Synced: 2025-02-17T09:15:12.823Z (about 1 year ago)
- Language: Ruby
- Size: 137 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Bohu
``Bohu`` is intended to easyfy filesystem and administrative tasks,
it provides an application programming interface (API)
to an abstract operating system making
it easier and quicker to develop code for multiple software or platforms.
## Shell
``Bohu`` provides ``sh``, ``capture`` and ``capture!`` low-level methods.
And, configuration permits new methods declaration, using dialects.
```yaml
# config.yml
commands:
adduser:
actions:
create_user:
assign_password: false
login_shell:
- '%s'
- '/bin/bash'
login: '%s'
```
```yaml
# dialects/default/adduser.yml
system: ['-S', true]
login_shell: ['-s', '%s']
assign_password: ['-D', false]
```
Commands are built from ``commands`` configuration, and uses a dialect.
Dialect is responsible to transform known options into command line options.
Config permits to choose used dialect by a command:
```yaml
commands:
adduser:
dialect: default
executable: adduser
```
Dialects paths can be added by configuration:
```yaml
dialects:
paths:
- dialects
```