The short answer
Download one file with curl, log in once with your Culinary Card account, and you get commands for everything: `whoami` shows your credit balance, `list` and `view` read your collection, and `create` turns any pasted text, file, or URL into a structured recipe card — same AI pipeline as the web app, same credits, no browser required. Every command takes a --json flag, which makes it trivially scriptable and safe to hand to an AI agent.
Step-by-step
- 1
Download it and log in once
The CLI is a single zero-dependency file — grab it with curl, no repo access or npm install required. It authenticates against the Culinary Card API directly: log in with your email and password, or — if you sign in with Google — generate a one-time code in the app (Profile Settings → Preferences → Command Line Access) and use connect. Your session is stored locally (chmod 600) and refreshes itself automatically.
curl -fsSL https://www.culinarycard.app/cli.js -o cli.js node cli.js login [email protected] # email + password accounts node cli.js connect ABCD-2345 # Google sign-in accounts (one-time code) - 2
Check your account and browse your collection
whoami shows your email, credit balance, and recipe count. list takes search and limit flags, where --search matches recipe titles. view prints a full recipe, ingredients and steps and notes, formatted for the terminal.
node cli.js whoami node cli.js list --search "chicken" --limit 10 node cli.js view <recipe-id> - 3
Create recipes without opening a browser
Pipe in raw text, point at a file, or hand it a URL. The same AI that powers the web app structures it into a clean recipe card and saves it to your book. Text costs 1 credit, URL imports cost 2 — identical to the web app.
node cli.js create --text "Grandma's lemonade: juice of 6 lemons, 1 cup sugar, 6 cups water..." node cli.js create --file ./recipe-notes.txt node cli.js create --url https://example.com/best-focaccia - 4
Add --json and hand it to your agent
Every command emits machine-readable JSON with --json, exits non-zero on failure, and reports errors as JSON on stderr. That means Claude Code, a ChatGPT tool, a cron job, or any script can drive your recipe book reliably — no HTML scraping, no brittle automation.
node cli.js list --json | jq '.recipes[].title' node cli.js create --url "$URL" --json > new-recipe.json - 5
Or skip the CLI and hit the API directly
The CLI is a thin client over a stable JSON API. If you're building your own integration or agent tool, POST /api/cli/login gets you a token, and the /api/cli/recipes endpoints do the rest — with generous rate limits designed for programmatic use.
curl -s -X POST https://culinary-card-production.up.railway.app/api/cli/login \ -H "Content-Type: application/json" \ -d '{"email":"[email protected]","password":"..."}'
Common mistakes to avoid
- ✕
Letting your recipes live only in AI chat threads
If you cook with ChatGPT or Claude, the recipes you refine together vanish into scrollback. One `create --text` call and the final version is saved, searchable, and rendered as a proper card.
- ✕
Scraping your own data out of a web UI
Browser automation against a recipe site breaks every time the UI changes. A real API with JSON output is the difference between an agent workflow that works once and one that works every week.
- ✕
Handing an agent unlimited spend
Recipe creation costs the same credits as the web app and is rate-limited server-side, so a runaway loop can't drain your account. Reads are effectively free and generously limited.
- ✕
Storing platform API keys in scripts
The CLI never sees or stores infrastructure keys — you log in with your own account, tokens live in a permission-restricted file in your home directory, and you can revoke them any time by logging out.
Why Culinary Card works for this
Culinary Card is built AI-first, and that now includes how you access it. The same structured-output pipeline that turns messy text into beautiful recipe cards in the app is exposed through a clean, documented command set — so terminal power users get a fast keyboard-driven workflow, and agent builders get a reliable JSON surface their tools can call. Your recipe book stops being an app you visit and becomes infrastructure your workflows can build on.
Frequently asked questions
Do I need to install anything?
Just Node 18+. The CLI has zero dependencies — it's a single script that uses the built-in fetch. Download it with `curl -fsSL https://www.culinarycard.app/cli.js -o cli.js` and run it with node. No repo access, no npm install.
I sign in with Google — how do I log in without a password?
Use connect instead of login. In the app, go to Profile Settings → Preferences → Command Line Access and generate a one-time code, then run `node cli.js connect <code>`. The code is valid for 10 minutes and single-use; the CLI gets its own session that refreshes automatically.
Can AI agents like Claude Code use it?
Yes, and it was designed for that from the start. In practice you tell the agent the CLI exists, paste the help text once, and it composes commands from there. The thing that makes this work is boring rather than clever: deterministic flags, structured errors, and honest exit codes matter far more to an agent than readable output does.
Does CLI usage cost the same as the web app?
Yes. Creating a recipe from text costs 1 credit and importing from a URL costs 2 — exactly like the web app. Listing and viewing recipes is free. Rate limits are generous: 120 reads per minute and 20 recipe creations per hour.
Is it secure to let a script log in as me?
Your session token is stored in ~/.culinarycard.json with owner-only file permissions and refreshes automatically. Nothing else is stored. Run logout to delete it instantly, and login attempts are rate-limited server-side.
What can't the CLI do yet?
Editing, deleting, and image generation are web-app-only for now. If the CLI matters to your workflow, send feedback in the app — it directly shapes what gets built next.