recraft-cli
CLI for the Recraft AI image API, built to be driven by an LLM coding agent. Writes image files to disk and prints their paths — image bytes never touch stdout.
Spends API credits, never subscription credits.
Unofficial. Not affiliated with, endorsed by, or supported by Recraft AI.
Install
Requires uv.
As a Claude Code plugin — adds recraft to the Bash tool's PATH, plus a skill telling Claude when
to use it:
/plugin marketplace add nbr23/recraft-cli
/plugin install recraft@nbr23
Then allow it once in .claude/settings.json to stop the per-call permission prompt:
{ "permissions": { "allow": ["Bash(recraft:*)"] } }
As a standalone CLI:
uv tool install nbr23-recraft # or: uvx nbr23-recraft --help
Token
From RECRAFT_API_TOKEN, falling back to ~/.config/recraft/token (mode 0600). Get one from the
Recraft API console.
export RECRAFT_API_TOKEN='...'
Examples
recraft balance
# 12345 API credits ($12.345)
recraft generate "a red bicycle on a white background" -o bike.png
# /abs/path/bike.png 1024x1024 recraftv4_1 35 credits ($0.035)
recraft generate "a minimal bicycle icon" --vector -o bike.svg
recraft vectorize bike.png -o bike.svg # ~10 credits
recraft remove-bg bike.png -o bike-cutout.png # ~10 credits
recraft upscale bike.png --mode crisp -o bike-2x.png # ~4 credits; creative is ~250
recraft generate "a red bicycle" --dry-run # print the request, spend nothing
recraft generate "a red bicycle" -o bike.png --json # one JSON object on stdout
recraft models # ids and per-image price
recraft styles # valid style / model combinations
recraft --help lists every command; recraft COMMAND --help documents its flags with an example.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nbr23_recraft-0.1.0.tar.gz.
File metadata
- Download URL: nbr23_recraft-0.1.0.tar.gz
- Upload date:
- Size: 22.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7100c5e59e35886d085e04d3f61d92ef1bf63170e45e52ff041cc121508653a9
|
|
| MD5 |
2e6a1cb0a88ccb6f3e686bb0ea2d4b88
|
|
| BLAKE2b-256 |
2733fa0869f32b17cc77c9b55dc67d6f927a0689e0ee7496507fd4ec73774d73
|
Provenance
The following attestation bundles were made for nbr23_recraft-0.1.0.tar.gz:
Publisher:
publish.yml on nbr23/recraft-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nbr23_recraft-0.1.0.tar.gz -
Subject digest:
7100c5e59e35886d085e04d3f61d92ef1bf63170e45e52ff041cc121508653a9 - Sigstore transparency entry: 2364107893
- Sigstore integration time:
-
Permalink:
nbr23/recraft-cli@ed3b6224abe7a24ab3d1713ef5c12f26d821d59d -
Branch / Tag:
refs/heads/master - Owner: https://github.com/nbr23
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ed3b6224abe7a24ab3d1713ef5c12f26d821d59d -
Trigger Event:
push
-
Statement type:
File details
Details for the file nbr23_recraft-0.1.0-py3-none-any.whl.
File metadata
- Download URL: nbr23_recraft-0.1.0-py3-none-any.whl
- Upload date:
- Size: 17.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2f3adba45a4b217b227653f41fe996d4e4cffac9e809f5a401c38ae5c527366b
|
|
| MD5 |
9f56e1f3d7dc8e0481346706eb2fa4b1
|
|
| BLAKE2b-256 |
034fde817b7053d9f8b52a8b64a41fe007b1bb28043dbee373744dd1e57e011d
|
Provenance
The following attestation bundles were made for nbr23_recraft-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on nbr23/recraft-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nbr23_recraft-0.1.0-py3-none-any.whl -
Subject digest:
2f3adba45a4b217b227653f41fe996d4e4cffac9e809f5a401c38ae5c527366b - Sigstore transparency entry: 2364108085
- Sigstore integration time:
-
Permalink:
nbr23/recraft-cli@ed3b6224abe7a24ab3d1713ef5c12f26d821d59d -
Branch / Tag:
refs/heads/master - Owner: https://github.com/nbr23
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ed3b6224abe7a24ab3d1713ef5c12f26d821d59d -
Trigger Event:
push
-
Statement type: