<commit_before># hafen RFC

## Scenario: Installing some tool

When I run this:

```bash
hafen install docker-compose
```

Then the service finds information about `docker-compose` in registry, such as:

- Where and how to download the code (`tar`, `zip` and `git` url templates with
  free `version` variable);
- How to build code into a fully self-contained `docker` container (Github link
  of form: `{https://github.com/heimathafen/recipes; /docker-compose}`);
- How to run the final docker image (basically a script, that would imitate an
  actual tool and abstract the fact that it is run inside of docker container,
  i.e.: Github link of form `{https://github.com/heimathafen/recipes;
  /docker-compose/run.sh}`);

And the service builds the docker image for `docker-compose` of last released
version and pushes it to `hub.docker.com` as
`heimathafen/docker-compose:{{version}}` unless it was already built for this
version (or commit SHA);

And the image gets downloaded to my machine;

And the script to run the final docker image gets installed at
`/opt/hafen/docker-compose/bin/docker-compose` and linked to
`/usr/local/bin/docker-compose`,

- Given I already have something in `/usr/local/bin/docker-compose`;
- And it is not a link to `/opt/hafen/*/bin/*`;
- Then `hafen` asks me a (yes/no) question if I want to override it;

When I run `docker-compose --version`;

Then I see a latest released version of `docker-compose`.<commit_msg>fixup! Start the RFC.md; Add simple tool installation example<commit_after># hafen RFC

## Scenario: Installing some tool

When I run this:

```bash
hafen install docker-compose
```

Then the service finds information about `docker-compose` in registry, such as:

- Where and how to download the code (`git` url for now);

And the service builds the docker image for `docker-compose` of last released
version by using `docker` context at `{https://github.com/heimathafen/library;
/docker-compose/build}` and pushes it to `hub.docker.com` as
`heimathafen/docker-compose:{{version}}` unless it was already built for this
version (or commit SHA);

And the image gets downloaded to my machine;

And the script to run the final docker image gets installed at
`$HOME/.hafen/lib/docker-compose/{{version}}/bin/docker-compose` from
`{https://github.com/heimathafen/library; /docker-compose/run}` and linked to
`$HOME/.hafen/bin/docker-compose`,

When I run `docker-compose --version`;

Then I see a latest released version of `docker-compose`, version of `hafen`,
version of `docker-compose` `hafen` build configuration and links to the
project and issue tracker.
{'fraction_non_alphanumeric': 0.10556621880998081, 'fraction_numerical': 0.0, 'mean_word_length': 4.429166666666666, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '266471', 'n_tokens_mistral': 846, 'n_tokens_neox': 780, 'n_words': 333}