![EBSI Logo](https://ec.europa.eu/cefdigital/wiki/images/logo/default-space-logo.svg)

# EBSI Command Line Interface

The EBSI CLI is a Command Line Interface to connect and test some of the EBSI Core Services provided on the European Blockchain Service Infrastructure (EBSI).

**IMPORTANT REMARKS:**

- EBSI CLI is a sample code to help Early Adopters (EA), this is not perfect code (nor audited code) but we share it in beta version to help EA better understanding through real User Code, how to consume EBSI Core Services.

- For optimal stability, we highly recommend to use the [**Node.js version 20.12**](https://nodejs.org/en/download).

## Start the tool

You can start the tool by running:

```sh
npx @cef-ebsi/cli
```

When the CLI prompts `==>` it will be ready to receive commands. There is no need to install the package. It needs NodeJS v18 or superior version as a prerequisite.

## Documentation

For more details about the use of this tool see the full documentation in https://hub.ebsi.eu/tools/cli

## Publishing

### From main branch

Create `chore/release` branch off `main` and run the following command to bump version and update change log:

```
yarn prepare:release
```

In the case of a major release run:

```
yarn prepare:release major
```

Push the changes including the tag:

```
git push
git push --tags
```

Create a PR on Bitbucket and merge it **without squashing it!**

Then, from the updated `main` run:

```
npm publish
```

### From upcoming branch

Create `chore/release` branch off `upcoming` and run the following command to bump version and update change log:

```
yarn prepare:release --preRelease=alpha
```

In the case of a major release run:

```
yarn prepare:release major --preRelease=alpha
```

Push the changes including the tag:

```
git push
git push --tags
```

Create a PR on Bitbucket and merge it **without squashing it!**

Then, from the updated `upcoming` run:

```
npm publish --tag upcoming
```

## License <a name="license"></a>

Copyright (C) 2024 European Union

This program is free software: you can redistribute it and/or modify it under the terms of the EUROPEAN UNION PUBLIC LICENCE v. 1.2 as published by the European Union.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the EUROPEAN UNION PUBLIC LICENCE v. 1.2 for further details.

You should have received a copy of the EUROPEAN UNION PUBLIC LICENCE v. 1.2. along with this program. If not, see <https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12>.
