# Hosting CLI

## Overview

<figure><img src="https://4107147272-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEVHC4TEQKrh3Bfvq5dDi%2Fuploads%2FSsrSsBulN4qDDotzGpfR%2Fimage.png?alt=media&#x26;token=5292ca7e-e436-4acf-a37f-7f41ba92b9b3" alt=""><figcaption></figcaption></figure>

{% hint style="success" %}
Hosting offers a command-line interface for the 4EVERLAND CLI, which enables you to deploy and manage projects with a set of commands. This makes it easier for you to interact with the platform using a terminal or automated system.&#x20;
{% endhint %}

## Getting started with 4EVERLAND CLI

#### Installation <a href="#installation" id="installation"></a>

To install the CLI, run the following command:

```npmignore
npm install -g @4everland/hosting-cli
```

#### View Version <a href="#view-version" id="view-version"></a>

You can view the current version of the 4everland CLI by running the command:

```npmignore
4ever-hosting -v
```

#### Login <a href="#login" id="login"></a>

You can login your Hosting account via the 4everland CLI by running the command:

```npmignore
4ever-hosting login

```

#### Enter Token <a href="#enter-token" id="enter-token"></a>

You can see your token in the Hosting setting.

<figure><img src="https://4107147272-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEVHC4TEQKrh3Bfvq5dDi%2Fuploads%2FFN9FFqhZ9n2JBYsci2qX%2Fimage.png?alt=media&#x26;token=c4134812-bcf4-44c2-8591-0b9b0af4edbf" alt=""><figcaption></figcaption></figure>

The following operations are available only after successful login:

* Project Deployment
* Domain Operation

### Deployment

To deploy a project, please run the '4ever-hosting deploy' command.

```
4ever-hosting deploy
```

After entering the build command you need to do two steps&#x20;

* Give the project a name.&#x20;
* Select the platform on which the project will be deployed.

{% hint style="info" %}
Currently IPFS, Arweave, Internet Computer and BNB Greenfield are supported.
{% endhint %}

### Platform Quick Deployment

Build and deploy a project to a given platform, run the following command.

Deploy on IPFS

```
4ever-hosting deploy -ipfs
```

Deploy on Arweave

```
4ever-hosting deploy -ar
```

Deploy on Internet Computer

```
4ever-hosting deploy -ic
```

Deploy on BNB Greenfield&#x20;

```
4ever-hosting deploy -gnfd
```

### IPNS

IPNS can be obtained by running the command ''`4ever-hosting getipns`'' in the project directory(only valid for IPFS projects).

```
4ever-hosting getipns
```

Use the IPNS Deployment, fill the `<ipns>` of deployment.

```
4ever-hosting ipns <ipns>
```

Select the platform(IPFS, Arweave, Internet Computer and BNB Greenfield) for deployment by using the following commands.

```
4ever-hosting ipns <ipns> -ipfs
```

```
4ever-hosting ipns <ipns> -ar
```

```
4ever-hosting ipns <ipns> -ic
```

```
4ever-hosting ipns <ipns> -gnfd
```

Update the corresponding CID to IPNS and redeploy.

```
4ever-hosting update <ipns>
```

### CID

Use the CID to deploy the project, fill the `<cid>` of deployment.

```Plain
4ever-hosting cid <cid> -ipfs
```

```Plain
4ever-hosting cid <cid> -ar
```

```Plain
4ever-hosting cid <cid> -ic
```

```
4ever-hosting cid <cid> -gnfd
```

#### Help

If you need to see all the CLI commands, you can run the help command.

```
4ever-hosting -h
```

{% hint style="info" %}
If you have any questions, please join our [Discord server](https://discord.com/invite/Cun2VpsdjF), or send us an email at <contact@4everland.org>.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.4everland.org/hositng/hosting-cli.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
