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.
| Area | Commands |
|---|---|
| Account | tnb credits, tnb account, tnb ledger, tnb brand-dna |
| Library | tnb media, tnb elements, tnb projects, tnb upload |
| Tech packs | tnb techpacks, tnb techpack pdf, tnb techpack from-photos, tnb techpack add-section, tnb techpack write-section |
| Moodboards | tnb moodboards, tnb moodboard pdf |
| Shopify | tnb shopify products, tnb shopify publish |
| Social | tnb publish accounts, tnb publish, tnb post |
| AI agents | tnb agents, tnb agent send, tnb agent thread, tnb agent schedule, tnb agent stop |
| Files | tnb 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.
| Door | Where it fits | What it gives |
|---|---|---|
| CLI | A project of code, an AI coding agent, a script, a cron, a CI job | A program already written: local files handled, results saved next to them |
| MCP connector | A conversation: Claude on the web, Claude Desktop, Cursor | The studio while you talk, results shown and reusable in the chat |
| API | Your own backend, your own product | Routes 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.
Related articles
- 4K AI fashion images and 1080p video: The New Black AIUltra AI makes fashion pictures in 4K for 7 credits and videos in 1080p for 15 credits a second, next to Standard and Pro, in 30 studio workflows, the API and your AI agents.
- How to Use AI Training for Fashion Styles and Brand IdentityTrain AI on your own references so every new design matches your brand: reference images, web pages as style sources, and per garment training.
- AI Product Photos for Shopify: The New Black AIAI product photos for a Shopify fashion store: the five shots a product page needs, how to make each from one photo, and how to publish them to Shopify without re-uploading.
- Shopify Variant Images per Color: The New Black AIThe New Black AI adds a Variants tab to the Shopify product window: every variant with its price, SKU and picture, set from your creations, a file, or a creation's tile with Use for a variant.
- AI Fashion Video in 720p, 1080p, Audio: The New Black AIResolution and Audio sit in the panel of every video workflow: 720p or 1080p, and a voice, a music or an ambience described in words and generated with the clip.
- AI Agents for Fashion Brands: What They Do, What They Cost, How to Hire OneWhat an AI agent does for a fashion brand, in practice: catalogue visuals, weekly posts, tech packs from photos. Prices, plans, ceilings, limits, and how to run the first week without wasting credits.
- AI Agent for a Shopify Fashion Store: The New Black AIAn AI agent for your Shopify fashion store: what it reads and does (products, images, SEO, content, ads), how you approve its actions, how to hire one and what it costs.
- Rewrite Shopify theme text with AI: The New Black AISee your Shopify store page by page, every section with its pictures and texts, and rewrite any text with AI: saved straight for pages and articles, or opened on its block in the theme editor.
- AI reel generator for fashion brands: The New Black AIMake fashion reels with AI: describe the animation or pick one of eighteen Motion Design templates, add your photos or clips, export in 9:16. From 1 credit.
- ChatGPT traffic to your Shopify store: The New Black AISee the visits ChatGPT, Perplexity, Gemini, Copilot and Claude send to your Shopify store, and the pages they land on, next to your sales, filtered by country.