<commit_before># ynh-dev - Yunohost dev environnement manager

Report issues here: https://github.com/yunohost/issues

ynh-dev is a CLI tool to manage your local development environement for YunoHost. This allow you to develop on the various repository of the YunoHost project.

In particular, it allows :

 * to create a directory with a clone of each repository of the YunoHost project ;
 * to replace already installed yunohost debian packages by symlinks to those git clones ;
 * to manage yunohost instances on your host machine with Vagrant by:
   * creating a Vagrant VM with a pre-installed Yunohost system ;
   * sharing the dev environnement your host the VM (so you can develop directly on your host)
   * finding the ip address of your yunohost vagrant vm

yhn-dev can be used :

1. on your local machine with VMs (more comfortable)
2. on a remote machine dedicated to dev (e.g. if you need the VM to be exposed on internet : test let's encrypt, email stack ...)

## Develop on your local machine

Here is the development flow:

1. [first time] Setup ynh-dev and the development environnement
2. Create or run a yunohost vagrant instance
3. Upgrade, postinstall and deploy development version from repositories
4. Develop on your host
5. Test via the CLI or webadmin
6. Suspend or kill your vm

### 1. [first time] Setup ynh-dev and the development environnement

These operation need to be done on the host machine.

#### Install dependencies

- Debian, Ubuntu, Mint

```bash
sudo apt-get install vagrant virtualbox git
```

- Fedora
<commit_msg>[doc] add instruction to use upstream vagrant version<commit_after># ynh-dev - Yunohost dev environnement manager

Report issues here: https://github.com/yunohost/issues

ynh-dev is a CLI tool to manage your local development environement for YunoHost. This allow you to develop on the various repository of the YunoHost project.

In particular, it allows :

 * to create a directory with a clone of each repository of the YunoHost project ;
 * to replace already installed yunohost debian packages by symlinks to those git clones ;
 * to manage yunohost instances on your host machine with Vagrant by:
   * creating a Vagrant VM with a pre-installed Yunohost system ;
   * sharing the dev environnement your host the VM (so you can develop directly on your host)
   * finding the ip address of your yunohost vagrant vm

yhn-dev can be used :

1. on your local machine with VMs (more comfortable)
2. on a remote machine dedicated to dev (e.g. if you need the VM to be exposed on internet : test let's encrypt, email stack ...)

## Develop on your local machine

Here is the development flow:

1. [first time] Setup ynh-dev and the development environnement
2. Create or run a yunohost vagrant instance
3. Upgrade, postinstall and deploy development version from repositories
4. Develop on your host
5. Test via the CLI or webadmin
6. Suspend or kill your vm

### 1. [first time] Setup ynh-dev and the development environnement

These operation need to be done on the host machine.

#### Install dependencies

Please consider using the [latest Vagrant version from their website](https://www.vagrantup.com/downloads.html), distribution versions can include weird bugs that have been fixed upstream. If you still prefer to do that, here are the instructions:

- Debian, Ubuntu, Mint

```bash
sudo apt-get install vagrant virtualbox git
```

- Fedora

{'fraction_non_alphanumeric': 0.05371294393894922, 'fraction_numerical': 0.005283240387437629, 'mean_word_length': 4.041420118343195, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 3, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 5, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1932712', 'n_tokens_mistral': 946, 'n_tokens_neox': 912, 'n_words': 509}