PHPackages                             inmarelibero/nft-manager - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. inmarelibero/nft-manager

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

inmarelibero/nft-manager
========================

A PHP library to manage NFT.

0.1.1(2y ago)111[1 issues](https://github.com/inmarelibero/NFT-Manager/issues)MITPHPPHP &gt;=7.4

Since Sep 16Pushed 2y ago1 watchersCompare

[ Source](https://github.com/inmarelibero/NFT-Manager)[ Packagist](https://packagist.org/packages/inmarelibero/nft-manager)[ RSS](/packages/inmarelibero-nft-manager/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (5)Versions (7)Used By (0)

NFT Manager
===========

[](#nft-manager)

This package helps the management of a NFT collection. Given that you already generated a (generative) NFT collection with images and metadata, you can use this tool to perform additional operations, such as **obfuscation** (for partial revealing), **update metadata and traits**, and others.

Installation
------------

[](#installation)

The preferred method of installation is via Composer. Run the following command to install the package and add it as a requirement to your project's composer.json:

`composer require inmarelibero/nft-manager`

Operations
----------

[](#operations)

In a single PHP script you can **define one or more steps** that will be **processed sequentially** and independently.

For example, you can:

1. **obfuscate metadata** leaving the first 100 NFTs in clear
2. then **update the "name"** metadata with the format `My super NFT #{id}`
3. and finally **format the metadata** to have a standard format

You can choose to apply an Operation only to a subset of NFTs, by using the `from_id`.

Available operations are:

### 1) Update Metadata

[](#1-update-metadata)

Useful to update the metadata of every NFT, including:

- update `attributes`
- remove `attributes`
- remove `metadata` by key
- update `url` of the "image" metadata
- update `external_url`
- update `name`

### 2) Format Metadata

[](#2-format-metadata)

Run a standard formatter that:

- order metadata by importante
- order attributes alphabetically

### 3) Obfuscation

[](#3-obfuscation)

Lets you replace the `attributes` with a placeholder (eg. "?") to obfuscate traits.

Useful when doing partial revealings, because you can specify a starting ID to obfuscate from.

#### 4) Renumbering

[](#4-renumbering)

Used when:

- your NFTs start from 0 and you want to renumber them starting from 1
- there are holes in your collection

#### 5) Shuffle

[](#5-shuffle)

Shuffle the entire collection randomly.

Usage
-----

[](#usage)

- start from an empty folder, eg. `mkdir my_project`
- enter the folder: `cd my_project`
- install this package: `composer require inmarelibero/nft-manager`
- create folder `my_project/input` with the following subfolders:
    - `input/`
        - `images/` &lt;- put all the NFT images here
        - `metadata/` &lt;- put all the NFT metadata here
- create a php file eg. `/run.php` (see section Run script for the content)
- run script: `php run.php`
- in the `/output` folder you will find the resulting collection

### Run script

[](#run-script)

You must create one PHP script, defining the list of Operations that will be applied sequentially to your input NFT collection.

```
