Skip to content

AI Cookbook

Intermediate
ai creative frontend health

Generate personalized recipes from your available ingredients with AI-powered recipe creation and beautiful food photography.

Transform your available ingredients into culinary masterpieces with the AI Cookbook. This intelligent recipe generator analyzes what you have on hand and creates complete, customized recipes tailored to your dietary preferences and cuisine choices.

Features at a Glance

  • Smart Ingredient Matching: Input what's in your kitchen and let AI do the magic
  • Beautiful AI Images: Every recipe comes with stunning, AI-generated food photography
  • Dietary Flexibility: Supports gluten-free, vegan, vegetarian, and more
  • Nutritional Insights: Get estimated calories, macros, and dietary information
  • Shopping Assistant: Identifies missing ingredients with smart substitutions

Perfect for home cooks looking to reduce food waste, try new cuisines, or find inspiration when staring at a fridge full of random ingredients.


Run Your .habit File

Run on Mobile

  • [ ] Download the Cortex App from store or the downloads page
  • [ ] Open the Cortex App on your device
  • [ ] Tap "Open Habit" or "+" button
  • [ ] Select your .habit file from your device storage
  • [ ] The habit will be loaded and ready to run

Run on Desktop

  • [ ] Download the Cortex App for your platform from the downloads page
  • [ ] Install and open the Cortex App
  • [ ] Click "Open Habit" or drag & drop your .habit file
  • [ ] The habit will be loaded and ready to run
  • [ ] Optional: Place a .env file in the same directory as your .habit file to override environment variables

Run on Server

Run your .habit file as a server using the Cortex CLI:

bash
# Install and run in one command
npx @ha-bits/cortex --config ./your-app.habit
  • [ ] Make sure Node.js 20+ is installed
  • [ ] Run the command above with your .habit file path
  • [ ] Server will start on the specified port (default: 3000)
  • [ ] Access the app at http://localhost:3000
  • [ ] Optional: Place a .env file next to your .habit file - it will automatically override any embedded environment variables

Run Serverless

For serverless or containerized deployments, we recommend using Docker:

bash
# Using Docker (recommended for serverless)
docker run -p 3000:3000 -v $(pwd)/your-app.habit:/app/habit.habit \
  node:20-alpine npx @ha-bits/cortex --config /app/habit.habit --host 0.0.0.0

Or create a Dockerfile:

dockerfile
FROM node:20-alpine
WORKDIR /app
COPY your-app.habit ./
COPY .env ./ # Optional: include environment variables
RUN npm install -g @ha-bits/cortex
EXPOSE 3000
CMD ["cortex", "--config", "./your-app.habit", "--host", "0.0.0.0"]
  • [ ] Create a Dockerfile or use the Docker run command above
  • [ ] Deploy to your preferred cloud provider (AWS, GCP, Azure, etc.)
  • [ ] Configure environment variables via your cloud provider's secrets management
  • [ ] Set up health checks at /habits/base/api endpoint

Workflow Visualization

Requirements

  • OpenAI API key (for GPT-4o and DALL-E 3)
  • SQLite (auto-configured)

Quick Start

Run using the Habits CLI wrapper, recommended if you develop local Habits

# First, download the example files
npx habits@latest cortex --config ./ai-cookbook/stack.yaml

Get in touch

Want this habit running in your environment?

This habit is a starting point. Tell us about your stack and we'll help you get it working exactly the way your team needs.

Released under the AGPL-3.0 License.