CLI command
product
Read one Echo content product by its id.
Invocation#
echo-cli product <id>Inputs and output#
The id positional input is required. There are no named options.
The command writes one indented JSON object to stdout when the id matches, or null when it does not. A returned object contains exactly id, name, description, niche, target_platforms, and created_at.
State effect#
The command performs a bounded SELECT from products with an exact id filter. It does not create, update, or delete a product and does not trigger content generation.
Refusals#
- Without the id positional input it prints exactly "id is required" to stderr and exits 1 before opening a database client.
- Without NEXT_PUBLIC_SUPABASE_URL it prints exactly "NEXT_PUBLIC_SUPABASE_URL is not configured" to stderr and exits 1.
- After the URL is present, without SUPABASE_SERVICE_ROLE_KEY it prints exactly "SUPABASE_SERVICE_ROLE_KEY is not configured" to stderr and exits 1.
- If Supabase refuses the SELECT, the CLI prints the returned database error message to stderr and exits 1.