# matr-art-generator

> Generate Solana NFT artwork and Metaplex metadata with a single command.

Latest version **1.0.9** (published 2022-08-21) · ISC license · 0 weekly downloads

## Install

```sh
npm install matr-art-generator
pnpm add matr-art-generator
yarn add matr-art-generator
bun add matr-art-generator
```

Provides the command `matr-art-generator`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.9 |
| Published | 2022-08-21 |
| First published | 2022-08-19 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 7 |
| Unpacked size | 40.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | matr |
| Maintainers | matrbuilders |

## Links

- npm: https://www.npmjs.com/package/matr-art-generator
- Repository: https://github.com/matr-builders/mag
- Homepage: https://github.com/matr-builders/mag#readme
- Issues: https://github.com/matr-builders/mag/issues
- npm.io page: https://npm.io/package/matr-art-generator

## Dependencies (7)

- [sha1](https://npm.io/package/sha1.md) ^1.1.1
- [chalk](https://npm.io/package/chalk.md) ^4.1.2
- [canvas](https://npm.io/package/canvas.md) ^2.9.3
- [figlet](https://npm.io/package/figlet.md) ^1.5.2
- [fs-extra](https://npm.io/package/fs-extra.md) ^10.1.0
- [cli-spinner](https://npm.io/package/cli-spinner.md) ^0.2.10
- [cli-progress](https://npm.io/package/cli-progress.md) ^3.11.2

## Recent versions

- 1.0.9 (latest) — 2022-08-21
- 1.0.8 — 2022-08-20
- 1.0.7 — 2022-08-20
- 1.0.6 — 2022-08-19
- 1.0.5 — 2022-08-19
- 1.0.4 — 2022-08-19
- 1.0.3 — 2022-08-19
- 1.0.2 — 2022-08-19
- 1.0.1 — 2022-08-19
- 1.0.0 — 2022-08-19

## README

# 🎨 Matr NFT Art & Metadata Generator

Generate Solana NFT artwork and Metaplex metadata with a single command.

*If you have any questions feel free to reach out on [Discord](http://discord.gg/phV7X425ke) or [Twitter](https://twitter.com/matrbuilders).*

🖥 [Web UI (matr.world/art)](https://matr.world/art)

📦 [Download Example Project](https://raw.githubusercontent.com/matr-builders/matr.art.generator/main/assets/matr-art-gen-demo.zip)

![demo](https://raw.githubusercontent.com/matr-builders/matr.art.generator/main/assets/demo.gif)

## ⚡️ Usage
Once your project is set up and you have a `matr.config.json` file next to your attribute folders, you can run the following command to run `matr-art-generator`.

#### 💡 Tip
To get your project folder path into terminal, drag your project folder into terminal and it will paste the path. Once the path has been added, hit ENTER to start the generator.

```bash
npx matr-art-generator YOUR_PROJECT_FOLDER
```

### 🎉 Result
The resulting metadata and artwork will be exported to `YOUR_PROJECT_FOLDER/build`.

# 🤝 Getting Started
### Install Node
Node is required for the `npx` command and generator to work.
Install https://nodejs.org/en/download/ LTS.

### ⚠️ Issues when trying to run?
If you're having trouble installing/running the generator, try switching your Node version to 15. There is a known issue we are trying to fix where on some systems you have to be using Node 15.

You can view your current node version by running `node --version` in terminal.

To switch your Node version, you can use [NVM](https://github.com/nvm-sh/nvm) which allows you to switch between Node versions and do something along the lines of `nvm install 15` & `nvm use 15`.

## 📦 Project Structure
Structure your attribute directories and value files like the following.
- Each attribute has its own value files.
- Attribute values must be `.png` format.
- A `matr.config.json` exists at the top of the project.
```
my-project
    | - Background
        | - Black.png
        | - Red.png
        | - Yellow.png
    | - Face
        | - Happy.png
        | - Sad.png
        | - Sexy.png
    matr.config.json
```

## ⚒️ Config
![demo](https://raw.githubusercontent.com/matr-builders/matr.art.generator/main/assets/ui.gif)

In order for the generator to run, there needs to be a `matr.config.json` file at the top of your project. You can use our UI to design a config found at [matr.world/art](https://matr.world/art), or you can write your own using the following spec.

```json
{
    "name": "PROJECT_NAME",
    "symbol": "YOUR_SYMBOL",
    "external_url": "YOUR_WEBSITE",
    "description": "YOUR_DESCRIPTION",
    "baseUri": "YOUR_IMAGE_HOSTING",
    "seller_fee_basis_points": 1000,
    "creators": [
        {
            "address": "YOUR_WALLET",
            "share": 100
        }
    ],
    "artwork": [
        {
            "count": 333,
            "attributes": [
                {
                    "directory": "ATTRIBUTE_DIRECTORY"
                },
                {
                    "directory": "ATTRIBUTE_DIRECTORY",
                    "name": "ATTRIBUTE_NICE_NAME"
                },
            ]
        }
    ]
}
```
| Property | Description
|-|-|
`name` | The name of your project and what will be before each NFTs edition. For example, a generated NFTs name could be `PROJECT_NAME #111`.|
`symbol`                    |  Project symbol. |
`external_url`              |      Project website. |
`description`               |  Project description. |
`baseUri`                   |  Where your images are hosted. NFT image paths will be `baseUri/some_number.png`. |
`seller_fee_basis_points`   |  Royalties. `1000` is 10%. |
`creators`   |  A list of creators and percentage amounts to split the royalties. |
`artwork`   |  A list of objects where each object represents an attribute directory. By default, the attribute Name will be the directory name. If you want the name to be something else, you can use the `name` property and still point to whatever `directory` you want to.|

### 🔥 Multiple Attribute Combinations
You can pass multiple attribute configs into the same generation. This lets you do cool things like only generate a set amount of a certain combo making them more rare.
```json
{
    "artwork": [
        {
            "count": 333,
            "attributes": [
                {
                    "directory" : "ATTRIBUTE_DIRECTORY"
                },
                {
                    "directory" : "ATTRIBUTE_DIRECTORY",
                    "name": "ATTRIBUTE_NICE_NAME"
                }
            ]
        },
        {
            "count": 100,
            "attributes": [
                {
                    "directory": "ATTRIBUTE_DIRECTORY"
                },
                {
                    "directory": "ATTRIBUTE_DIRECTORY",
                    "name": "ATTRIBUTE_NICE_NAME"
                },
                {
                    "directory": "SPECIAL_THING",
                },
            ]
        }
    ]
}
```

---
_Source: https://npm.io/package/matr-art-generator · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
