Toast Cookbook

Recipes for AI-powered Unix workflows.

Getting Started

curl -sSL linuxtoaster.com/install | sh
toast --add Coder

The .crumbs File

Drop a .crumbs file in any project directory to give toast persistent context:

echo "Python 3.11 project using FastAPI" > .crumbs
echo "Follow PEP 8. Prefer type hints." >> .crumbs

Every toast command in that directory now understands your project.

Chat Mode

Start an interactive conversation by running toast or a Slice without arguments:

$ toast
Entering chat mode. Type Ctrl+D or /exit to quit.
Chat history is stored in .chat
---
> What is the capital of France?
The capital of France is Paris.

API

Use the CLI for terminal tasks. Use the API for apps.

curl -X POST https://linuxtoaster.com/api/chat \
  -H "Authorization: Bearer $TOAST_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "coder", "message": "explain recursion"}'

When to Generate Code

The Principle: Don't pipe huge data to AI. Ask AI to write the tool to process the data.

# Expensive: sending all data through AI
cat huge.csv | toast "calculate total revenue"

# Efficient: AI writes the awk, awk does the work
SCRIPT=$(echo "sum col 4, skip header" | toast "write awk one-liner")
cat huge.csv | eval "$SCRIPT"

Image Processing

# Generate ImageMagick commands
TASK="grayscale, resize 800px, white border"
CMD=$(echo "$TASK" | toast "write convert command for in.jpg out.jpg")
eval "$CMD"

Web Interaction Tools

# Fetch and analyze
curl -s https://api.github.com/repos/torvalds/linux/commits | \
  jq '.[].commit.message' | \
  toast "summarize recent kernel changes"

# Scrape and summarize
curl -s https://news.ycombinator.com | \
  lynx -dump -stdin | \
  toast "what are the top 3 tech trends today?"

Writing a Book

A bash workflow for generating long-form content.

#!/bin/bash
TITLE="The Last Algorithm"
mkdir -p book && cd book

# Context
echo "Sci-fi thriller about AI. Tone: Dark, fast-paced." > .crumbs

# 1. Outline
echo "$TITLE" | toast "create 12 chapter outline" > outline.txt

# 2. Write Chapters
for i in {1..12}; do
  cat outline.txt | toast "extract chapter $i summary" > ch${i}_brief.txt
  cat ch${i}_brief.txt | toast "write chapter $i, 2000 words" > ch${i}.md
done

# 3. Compile
cat ch*.md > draft.md

Content Pipeline

Transform loose notes into a multi-channel campaign.

#!/bin/bash
NOTES="meeting_notes.txt"

# Blog Post
cat $NOTES | toast "write a technical blog post" > blog.md

# Twitter Thread
cat blog.md | toast "convert to 6-tweet thread, viral hook" > thread.txt

# Newsletter
cat blog.md | toast "summarize for newsletter, casual tone" > email.txt

Building Websites

# One-liner landing page
echo "SaaS for dog walkers" | \
  toast "create landing page HTML, tailwind css, hero section, pricing" > index.html

# Generate Portfolio
cat resume.txt | \
  toast "turn this into a portfolio website HTML, dark mode" > portfolio.html

Building Agents

Agents are just loops that observe, think, and act.

#!/bin/bash
# organize-agent.sh

TARGET="./downloads"
echo "You are a file organizer. Respond ONLY with category: docs, img, code, other" > .crumbs

for file in $TARGET/*; do
  CATEGORY=$(echo "$file" | toast "categorize this filename")
  mkdir -p "$TARGET/$CATEGORY"
  mv "$file" "$TARGET/$CATEGORY/"
done

Integrations

Slack Webhook

# send-slack.sh
MSG=$(cat | toast "format as friendly slack message")
curl -X POST -d "{\"text\": \"$MSG\"}" $SLACK_WEBHOOK_URL

# Usage
echo "Build failed" | ./send-slack.sh

SQL Generator

QUESTION="top 10 users by spend last month"
SQL=$(echo "$QUESTION" | toast "write postgres query for users/orders tables")
psql -d mydb -c "$SQL"
# Contract Review
pdftotext contract.pdf - | \
  toast "flag risky clauses and indemnification issues"

# Draft Letter
cat notes.txt | toast "draft cease and desist letter, professional tone"

Creative & Ad Agency

# Brainstorming
echo "Energy drink for coders" | \
  toast "10 product names, edgy tone"

# Copy Variations
echo "Sign up now" | toast "10 better CTAs for Gen Z"

Education

# Lesson Plan
echo "Photosynthesis" | \
  toast "create 45min lesson plan for 5th graders"

# Quiz Gen
cat chapter.txt | toast "create 5 multiple choice questions with answer key"

Interviewer

# Roleplay
toast "Act as a Senior Engineer at Google. Interview me for a backend role."

# Scorecard
echo "Candidate answer: ..." | \
  toast "evaluate answer against STAR method, score 1-5"

Fun with Audio

# Sales Announcer (macOS)
tail -f sales.log | toast "announce this sale enthusiastically" | say