The New Black AI
← Journal

AI Fashion Images from the Command Line: the tnb CLI for Claude Code, Codex and Cursor

Published 12 September 2026

A CLI is a program you run by typing a command in a terminal instead of clicking in an app. The New Black AI has one, tnb, published on npm as @thenewblack/cli, and it gives every workflow of the studio to anything that can run a command: an AI coding agent such as Claude Code, Codex or Cursor, a shell script, a cron job, a CI pipeline. One command per workflow, your local photos uploaded for you, the results saved next to them.

It matters because AI coding agents cannot make images. Claude Code writes and runs code in your terminal; it has no idea what a garment on a model looks like. Give it this command and it does: you open it on a folder of product photos, you say what you want, and it fills a sub-folder with renders.

What one command does

Installing takes nothing. With Node 18 or later, npx @thenewblack/cli --help runs it without installing; npm install -g @thenewblack/cli keeps it, and the command is then tnb. Signing in is tnb login, which asks once for the API key from your profile's API tab and remembers it. On a server, a container or a CI job, the environment variable TNB_API_KEY wins instead.

From there, one line generates:

tnb generate product_to_model --product_images ./green-dress.jpg --prompt "AI model wearing the product, studio light, neutral background" --ratio 4:5 --wait --out ./renders/

The local file is uploaded for you, the command waits for the result, and the render lands as renders/green-dress-product_to_model.webp, beside the original, under a name you can read. No upload form, no polling loop, no temporary URL to keep track of.

A folder of photos, and an agent that never opens a website

This is the scenario the program exists for. You open your AI coding agent on a folder of product photos, the Code tab of Claude Desktop, Claude Code, Codex or Cursor, and you say: put all these garments on a model with The New Black. The agent installs the CLI, asks for your key once, runs one command per photo, and the renders land in a sub-folder with a short report beside them. Tomorrow you say: do the same with the new ones. Nothing to reinstall, nothing re-uploaded.

You never see the terminal, the API or the parameters. You see sentences, and a folder that fills up. That is the difference between an API and a program: the API is a set of routes waiting to be called from code somebody has to write, and the CLI is the code already written.

One command per workflow, read from the live catalogue

The commands and their flags are not hard coded in the package. They are read from the platform's catalogue at the moment of the call, so the command list is always exactly what the studio offers that day, with the same names as the workflows catalogue. A workflow shipped this morning is in tnb workflows this morning, without a new version to install.

  • tnb workflows lists every workflow with its price in credits.
  • tnb generate virtual_try_on --help prints the flags of one workflow: the live contract, not a copy of the documentation.
  • Images are local files or https urls, and a file uploaded once is remembered.
  • --wait blocks until the result is ready, --out decides where it lands, and everything comes back as JSON when you want to pipe it somewhere.

Everything else of the platform, one command each

Generation is the beginning. The whole account answers to the same program.

AreaCommands
Accounttnb credits, tnb account, tnb ledger, tnb brand-dna
Librarytnb media, tnb elements, tnb projects, tnb upload
Tech packstnb techpacks, tnb techpack pdf, tnb techpack from-photos, tnb techpack add-section, tnb techpack write-section
Moodboardstnb moodboards, tnb moodboard pdf
Shopifytnb shopify products, tnb shopify publish
Socialtnb publish accounts, tnb publish, tnb post
AI agentstnb agents, tnb agent send, tnb agent thread, tnb agent schedule, tnb agent stop
Filestnb files, tnb file, tnb file describe

A nightly script can therefore read the Shopify products that have no visual, generate one for each, and publish them back, without a person and without a browser.

CLI, MCP or API: three doors, one account

The platform opens three ways, and they are not competing. They suit three places you might be working.

DoorWhere it fitsWhat it gives
CLIA project of code, an AI coding agent, a script, a cron, a CI jobA program already written: local files handled, results saved next to them
MCP connectorA conversation: Claude on the web, Claude Desktop, CursorThe studio while you talk, results shown and reusable in the chat
APIYour own backend, your own productRoutes you call from your code, with your own logic around them

The CLI only ever calls that API. Same account, same key, same credits, same prices as clicking in the studio. If you want an agent to know all three, the Claude skill teaches it in one line: npx skills add newblackai/claude-skill --skill thenewblack.

Setting it up inside your agent

In Claude Code, Codex or Cursor, there is nothing specific to configure: the agent runs shell commands, so it runs this one. Tell it once that the tool exists and where the key is, and it will use it. The first run installs the package and calls tnb login.

For a conversation without a terminal, Claude on the web or Claude Desktop, the MCP connector is the right door instead: one server address in the connector settings and the studio answers in the chat.

What it costs

The CLI is free and so is the MCP connector. Generations spend the credits of the account behind the key, at the same prices as in the app, and tnb workflows prints the price of each one before you run it. Reading your library, listing workflows and every --help cost nothing and work without a key. Results stay available on our address for 48 hours, which is why --out saves them locally as they arrive.

Frequently asked questions

What is a CLI, in plain words?+

A command-line interface: a program you run by typing its name in a terminal, instead of clicking in an app. It does one thing per command, it prints its result as text, and it can be put in a script or a scheduled job. That makes it the natural door for automation, and the only door an AI coding agent can use on its own.

Do I need to know how to code?+

No, if you work through an AI coding agent: you describe the job in a sentence and the agent writes the commands. Yes, a little, if you want to write the loop yourself, in which case a shell for loop over a folder is the whole skill required.

Which agents and tools can use it?+

Anything that can run npm and a shell command: Claude Code, the Code tab of Claude Desktop, Codex, Cursor, a GitHub Action, a cron job, a no-code tool with a shell step. Assistants that only chat, with no terminal, should use the MCP connector instead.

How is this different from a generic AI image CLI?+

A generic one gives you a text prompt and a model. This one gives you the fashion workflows: virtual try-on, product to model, ghost mannequin, model videos, tech packs generated from photos, and publishing to your Shopify store and your social accounts. The product knowledge is in the workflow, not in your prompt, and the commands follow the catalogue as it grows.

Does the CLI follow new workflows automatically?+

Yes, without a new version. The command list and the flags are read from the live catalogue at the moment of the call, so a workflow added to the studio today is available in the CLI today.

Where do my files go?+

Where you say. --out ./renders/ saves each result in that folder as the input name followed by the workflow name; --out file.webp names one result directly. Your creations also stay in your studio grid, organised in projects, like everything else you make.

Does it need an account?+

Yes, for anything that generates. tnb login keeps the API key from your profile's API tab, and TNB_API_KEY in the environment works for a server or a CI job. Every generation spends the credits of that account.