# Bloq Account Setup

Users require a Bloq Account in order to acccess Bloq services. A Bloq account is associated with an individual user. Organizational support will be provided in a future release.

### Install Bloq CLI

To set up your Bloq account, install our [CLI](https://www.npmjs.com/package/@bloq/cloud-cli). Open a terminal window and run the following command:

```shell
npm i -g @bloq/cloud-cli
```

{% hint style="warning" %}
**`WARNING`**

* CLI requires that you have installed [Node.js](https://nodejs.org/en/download/)>= 8.x.x
* If you run into permissioning issues installing npm packages globally, please refer to this [article](https://docs.npmjs.com/resolving-eacces-permissions-errors-when-installing-packages-globally).
  {% endhint %}

### Check CLI Version

Once you install the CLI, you will have access to the global command `bcl`. You can run CLI with `--version` flag to check that everything is working.

```console
$ bcl --version
@bloq/cloud-cli/2.3.2 darwin-x64 node-v8.12.0
```

### Signup

Once you confirm the CLI is functioning, please see the [Bloq Console Signup](https://console.bloq.cloud/signup) page to create your Bloq account.

Through the Bloq Console website, users can perform a variety Bloq Accounts operations, such as:

* Access and update account information and preferences.
* Manage payments and billing information.
* Manage Bloq Nodes and node clusters.

{% hint style="success" %}
**`TIP`**

Some of the steps outlined in later on, such as \`Verify Account , may alternatively be carried out through the Bloq Console.
{% endhint %}

### Verify Account

In order to verfy your account, check your email and have the confirmation email at hand. Run the CLI `verify`command, which will prompt you for your **Email Address**and **Verfication Token** contained in the email.

```shell
bcl verify
```

```console
? Enter your email address or account id your@email.com
? Enter your verification token xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
✔ The account your@email.com has been validated
ℹ You can now start a new session running the command: bcl login -u your@email.com
```

### Login & Start Using Bloq

When your account is successfully created, you can start using Bloq services, manage your user information and generate client keys using the CLI. To start using Bloq services, start a new session using the `login` command:

```shell
bcl login -u your@email.com
```

```console
ℹ Account saved. Next time you only need -p flag (--password) to login.
ℹ Login with user your@email.com
? Enter your password xxxxxxxx
✔ Login success. Your session expires in 12h.
```

#### Password creation important note

When you choose your password, keep in mind that there are some special characters that are handled as **command line modifiers**, depending on your operating system. For example, if your password includes hyphens (-) or exclamation marks (!) and you are under a Linux-ish environment, the `--password` value must be surrounded by quotation marks (') in order to avoid the default shell behavior for these symbols. On Windows environments, such behavior could be present on other symbols, or not be present at all. Please refer to your operating system documentation to check which characters are used as command line modifiers, and how to escape them correctly if you want to use them on your password at the command line.

{% hint style="success" %}
**`TIP`**

* Each CLI session expires in 12h. After that, you will need to re-login to continue using services.
* You can run the `login` command using your **Email Address** or **Bloq Account ID**.
* Most commands allow you to add arguments using flags. If you miss a required flag, you will be prompted to enter the argument manually.
* Run `bcl help` to list available commands and their associated options.
  {% endhint %}
