A suite of tools for NFT generative art.

Overview

nftool

A suite of tools for NFT generative art.

Features

  • Traits/Attributes/Properties Generation
    • Configure custom rarity
    • Generate collection attributes configuration file
    • Merge collections
    • Shuffle collection
    • Find collisions between collections
  • Image Generation
    • Generate images from collection description
    • Generate images in parallel
  • Rarity
    • Generate traits rarity
    • Generate collection rarity
  • Provenance
    • Generate provenance

Install

Homebrew on Macos

brew install alephao/formulae/nftool

Using Go

go install github.com/alephao/[email protected]

Or clone the repository, change to the root folder and run go install.

Manually

Download the binary from the releases page and move it to your bin path like /usr/local/bin.

Getting Started

To get started, install nftool following the instructions above and cd to the examples folder in this repo.

First generate the configuration file from the layers folders.

mkdir -p out
nftool traits dump --layers ./layers --out ./out/config.yaml

You can open config.yaml and play around with the rarity weights, and optional configuration.

Then generate a collection from the config.yaml

nftool traits make --amount 10 --config ./out/config.yaml --out ./out/collection.json

Now we can use the collection.json to generate the images. Run the following commands:

mkdir -p ./out/images
nftool img gen --width 300 --height 300 --collection ./out/collection.json --config ./out/config.yaml --out ./out/images

We can also generate rarity reports for traits (which trait is more rare and how many times it shows up) and the collection rarity rank.

# Generate traits rarity report
nftool rarity traits --collection ./out/collection.json --out ./out/traits_rarity.json

# Generate collection rarity rank report
nftool rarity collection --collection ./out/collection.json --out ./out/collection_rarity.json

To generate the provenance for this collection it's easy:

nftool provenance --images ./out/images --out ./out/provenance.json --startingIndex 2

Note: the startingIndex should be a number smaller than the total amount of items in the collection and it's usually generated on-chain.

Contributing

  • For requests and questions, please open an issue.
  • PRs accepted.

License

MIT © Aleph Retamal

You might also like...
Tools for understanding, measuring, and applying network policies effectively in kubernetes

Cyclonus network policy explainer, prober, and test case generator! Parse, explain, and probe network policies to understand their implications and he

Serve vanity URLs to Go tools.

goovus serves vanity URLs to Go tools. What's In A Name? go Made for Go. o Open as in open source. vus vanity url server. go + o + vus gives goovus. Q

golang consul tools

中文文档 consult A consul key/value tool for golang Usage install go get -u github.com/xxjwxc/[email protected] New Config conf := consulkv.NewConfig() With

gophertunnel is composed of several packages that may be of use for creating Minecraft related tools
gophertunnel is composed of several packages that may be of use for creating Minecraft related tools

gophertunnel is composed of several packages that may be of use for creating Minecraft related tools. A brief overview of all packages may be found here.

Scripts and other small tools developed against TCM systems

TCM Tools This repo contains scripts and small tools developed against TCM services that do not really have a home other places but we would like to m

many tools implemented in Golang

Go-Tools many tools implemented in Golang tools project comments abtest AB测试分流 dag_flow DAG工作流 hugo_themes Hugo主题 log_monitor 日志监控服务 pepper_cache 内存kv

Google repo tools jiri mirrors

Jiri /jɪəri/ YEER-ee "Jiri integrates repositories intelligently" Jiri is a tool

 Tools for authoring and serving codelabs
Tools for authoring and serving codelabs

Tools for authoring and serving codelabs Codelabs are interactive instructional

A simple port forward tools build on libp2p with holepunch support.

p2p-tun A simple port forward and tun2socks tools build on libp2p with holepunch support. Usage NAME: p2p-tun - port forward and tun2socks through

Comments
  • png image size

    png image size

    Hi, First I have to say, this is a pretty cool tool! Thanks for that.

    I have an issue with the file size of the png images. They are about 25 MB and they should be about 40 kB. Is there a solution for this? I've been messing about with the imgen.go file and put in BestCompression but this doesn't solve the file size.

    Looking forward to hear from you!

    opened by mindp0wer 10
  • small things

    small things

    usually all NFTs go to an API because of instant reveal .... and file permissions. .idea because I use Goland and some formatting that happened when I pressed save lol

    opened by AndreiD 3
  • Adjust output images dimensions

    Adjust output images dimensions

    Looks like the weight and height property of nftool images doesn't adjust output dimension.

    For example, the traits all have 3000x3000 dimension, but I want the output to be 1080x1080 to save size.

    Specifying 1080 for height and weight in nfttool images gives distorted images. It works fine when the orig dimension is provided (3000).

    Does the library support this?

    opened by kabaluyot 2
  • Rarity Weight

    Rarity Weight

    ❤❤❤❤❤❤❤ Hi, I was trying to generate arts with the exact weights, finally, I found this module and tried. But I was a bit surprised because I didn't see the result that I wanted.

    Layer Structure

        00-Background
            |- 1.blue.png
            |- 2.white.png
            |- 3.green.png
        01-Body
            |- 1-maroon.png
            |- 2-nut.png
            |- 3-standard.png
            |- 4-yellow.png
        02-Expressions
            |- 1-dot.png
            |- 2-std_lord.png
            |- 3-standard.png
    

    config.yaml

    name: 'My Collection #{id}'
    description: An awesome collection
    external_link: https://myexternallink.com
    image: ipfs://myHash/{id}
    traits:
    - trait_type: Background
      variants:
      - value: blue
        weight: 1
      - value: white
        weight: 2
      - value: green
        weight: 3
      is_optional: false
      optional_weight: 1
    - trait_type: Body
      variants:
      - value: maroon
        weight: 1
      - value: nut
        weight: 2
      - value: standard
        weight: 3
      - value: yellow
        weight: 4
      is_optional: false
      optional_weight: 1
    - trait_type: Expressions
      variants:
      - value: dot
        weight: 1
      - value: std_lord
        weight: 2
      - value: standard
        weight: 3
      is_optional: false
      optional_weight: 1
    path_map:
      Background/blue: ./layers/00-Background/1-blue.png
      Background/green: ./layers/00-Background/3-green.png
      Background/white: ./layers/00-Background/2-white.png
      Body/maroon: ./layers/01-Body/1-maroon.png
      Body/nut: ./layers/01-Body/2-nut.png
      Body/standard: ./layers/01-Body/3-standard.png
      Body/yellow: ./layers/01-Body/4-yellow.png
      Expressions/dot: ./layers/02-Expressions/1-dot.png
      Expressions/standard: ./layers/02-Expressions/3-standard.png
      Expressions/std_lord: ./layers/02-Expressions/2-std_lord.png
    

    traits_rarity.json

      {
        "total": 30,
        "traits": {
          "Background": {
            "blue": { "Total": 9, "Percentage": 0.3 },  //  Origin: 5               
            "green": { "Total": 10, "Percentage": 0.3333333333333333 }, // Origin: 10
            "white": { "Total": 11, "Percentage": 0.36666666666666664 } // Origin: 15
          },
          "Body": {
            "maroon": { "Total": 4, "Percentage": 0.13333333333333333 },  //  Origin: 3
            "nut": { "Total": 9, "Percentage": 0.3 }, //  Origin: 6
            "standard": { "Total": 8, "Percentage": 0.26666666666666666 },  //  Origin: 9
            "yellow": { "Total": 9, "Percentage": 0.3 } //  Origin: 12
          },
          "Expressions": {
            "dot": { "Total": 10, "Percentage": 0.3333333333333333 }, //  Origin: 5
            "standard": { "Total": 11, "Percentage": 0.36666666666666664 }, //  Origin: 10  
            "std_lord": { "Total": 9, "Percentage": 0.3 } //  Origin: 15
          }
        }
      }
    

    🙋‍♂️ Please let me know what I made a mistake, and how I can solve this problem perfectly.

    🙏 Thanks.

    opened by CaCaBlocker 2
Releases(v0.5.0)
Owner
Aleph Retamal
writing software for fun and profit
Aleph Retamal
A proxy to hide NFT metadata during the sale and prevent people from sniping specific NFTs.

NFT Sale Proxy A proxy to hide NFT metadata during the sale and prevent people from sniping specific NFTs. Check alephao/nft-sale-proxy-examples to se

Aleph Retamal 25 Nov 1, 2022
Bridge REMOV will allow you to safely transfer NFT from RMRK to MOVR and backwards

remov Inspiration Our aim is to expand the capabilities of blockchain and make a secure way for transferring NFT between RMRK and MOVR blockchain. The

null 1 Dec 5, 2021
Our aim is to expand the capabilities of blockchain and make a secure way for transferring NFT between RMRK and MOVR blockchain.

remov Inspiration Our aim is to expand the capabilities of blockchain and make a secure way for transferring NFT between RMRK and MOVR blockchain. The

RMRK Team 3 Jul 25, 2022
This is repository for nft-analyzer

Основная информация Запуск: Склонировать репозиторий Настройка env (см. далее) docker-compose up -d Написать команду go mod download Запустить go run

Maximqa 0 Jan 11, 2022
Fix Burp Suite's horrible TLS stack & spoof any browser fingerprint

Awesome TLS This extension hijacks Burp's HTTP and TLS stack to make it more powerful and less prone to fingerprinting by all kinds of WAFs. It does t

Sleeyax 183 Nov 23, 2022
gNXI Tools - gRPC Network Management/Operations Interface Tools

gNxI Tools gNMI - gRPC Network Management Interface gNOI - gRPC Network Operations Interface A collection of tools for Network Management that use the

Google 226 Nov 11, 2022
Tools - This subrepository holds the source for various packages and tools that support

Go Tools This subrepository holds the source for various packages and tools that

Rohan 0 Jan 12, 2022
MPD client inspired by ncmpcpp written in GO with builtin cover art previews.

goMP MPD client inspired by ncmpcpp written in GO demo.mp4 Roadmap Add Functionality to Sort out most played songs Add a config parser Image Previews

Aditya Kurdunkar 40 Nov 9, 2022
Archiving Street Art in a distributed manner

Graffiti Repository provides a tool for graffiti community to keep track and preserving street artwork in their areas. Features Distributed storage Th

Roman Blanco 4 Oct 27, 2022
🌕 Server application for storing doujinshi, manga, art collections and other galleries with API and user control. Written in Go.

?? Server application for storing doujinshi, manga, art collections and other galleries with API and user control. Written in Go.

null 17 Nov 4, 2022