> For the complete documentation index, see [llms.txt](https://8bit-1.gitbook.io/solibrary/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://8bit-1.gitbook.io/solibrary/getting-started-using-the-inscriptions-cli.md).

# Getting started using the Inscriptions CLI

Clone the [mpl-inscription repo](https://github.com/metaplex-foundation/mpl-inscription/).

```
git clone https://github.com/metaplex-foundation/mpl-inscription.git
```

The CLI lives in the repo in the `clients/cli` subdirectory. The dependencies must first be installed before it can be run.

```
pnpm install
```

After that bulk Inscribing can be invoked using the following commands. Commands that are optional are indicated

### Download the NFTs <a href="#download-the-nf-ts" id="download-the-nf-ts"></a>

This command is used for initializing the assets that will be inscribed. The Download process will create a cache folder in the running directory and store the JSON (.json) and Media (.png, .jpg, .jpeg) files associated with the NFT there, along with a .metadata file which stores data for other CLI commands. The name of each file will be the mint address of the NFT being inscribed.

If you wish to manually override any of the JSON or media files being inscribed, replace the relevant file in the cache directory with the file you'd like to inscribe instead.

Download your NFT assets.

Bash (Hashlist)

```
pnpm cli download hashlist -r <RPC_URL> -k <KEYPAIR_FILE> -h <HASHLIST_FILE>
```

### Estimate cost (Optional) <a href="#estimate-cost-optional" id="estimate-cost-optional"></a>

The total cost of inscribing an NFT can be determined using this command. It calculates the SOL rent costs for inscribing NFTs based on the account overhead and the file sizes in the cache directory.

Estimate total NFT Inscription cost.

Bash (Hashlist)

```
pnpm cli cost hashlist -h <HASHLIST_FILE>
```

### Trim JSON fields (Optional) <a href="#trim-json-fields-optional" id="trim-json-fields-optional"></a>

This command can be used to trim JSON fields from the .json file associated with an NFT. Oftentimes NFT JSON data includes deprecated fields that can be removed for cost savings during the Inscription process. For example the 'seller\_fee\_basis\_points', 'creators', and 'collection' fields are all deprecated in the JSON data and can be removed to save on rent cost. Additionally, the description field is often long and creators may want to remove this for cost savings. The default fields to be removed if the `--remove` option isn't provided are 'symbol', 'description', 'seller\_fee\_basis\_points', and 'collection'.

Trim JSON fields.

Bash (Hashlist)

```
pnpm cli compress json --fields symbol
```

### Compress Images (Optional) <a href="#compress-images-optional" id="compress-images-optional"></a>

The CLI also offers the ability to compress images before inscribing, to further save on rent cost. They can be compressed on three metrics:

* Quality (number 1-100, default: 80) (only applicable for jpegs) which reduces the overall clarity and colors available in the image.
* Size (number 1-100, default: 100) - Reducing the total image size with lower numbers being smaller images.
* Extension (png or jpg, default: jpg) - Change the image to the specified file type, with jpegs typically being smaller (but lossier) than pngs.

Compress Images.

Bash (Hashlist)

```
pnpm cli compress images -q <QUALITY> -s <SIZE> -e <EXTENSION>
```

### Inscribe! <a href="#inscribe" id="inscribe"></a>

Download your NFT assets.

Bash (Hashlist)

```
pnpm cli inscribe hashlist -r <RPC_URL> -k <KEYPAIR_FILE> -h <HASHLIST_FILE>
```
