Order a custom t-shirt from stdin via Printify.
tshirt << 'EOF'
the mind that is not baffled is not employed,
the impeded stream is the one that sings
EOFecho "what a strange time it is to be a dead star reanimated by chance and patience" | tshirt --subscript "x.com/hormeze"That's it. Text goes in, t-shirt comes out.
- Renders your text as a 4500x5400px PNG
- Uploads the image to Printify
- Creates a product and places an order (after confirmation)
- Python 3.11+
- A Printify account with an API key
- A configured shop with at least one product blueprint
uv pip install -e . # or: pip install -e .Run the setup wizard once before placing orders:
tshirt setupThe wizard will prompt for:
- API key — your Printify API key
- Shop — select from your Printify shops
- Blueprint — select a t-shirt product blueprint
- Print provider — select a fulfillment provider for that blueprint
- Variant — select size/color/style
- Shipping address — name, address, email, etc.
Config is saved to ~/.config/tshirt/config.toml (chmod 600).
# Place a real order (confirms before charging)
echo "Hello, World!" | tshirt
# Render preview only — saves tshirt-preview.png, no order placed
echo "Hello, World!" | tshirt --dry-run
# Re-run the setup wizard to update config
tshirt setupLocation: ~/.config/tshirt/config.toml
api_key = "your-printify-api-key"
shop_id = "12345678"
blueprint_id = 5
print_provider_id = 99
variant_id = 18432
price_cents = 3000
[shipping]
name = "Jane Doe"
address1 = "123 Main St"
city = "Toronto"
region = "ON"
zip = "M5V 1A1"
country = "CA"
email = "jane@example.com"Text is rendered as a 4500x5400px PNG with a white background and black text. Font size is auto-scaled to fit. Multiline text is supported — newlines in stdin are preserved.