惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Blog — PlanetScale
Blog — PlanetScale
爱范儿
爱范儿
MongoDB | Blog
MongoDB | Blog
腾讯CDC
aimingoo的专栏
aimingoo的专栏
月光博客
月光博客
Engineering at Meta
Engineering at Meta
C
Check Point Blog
N
Netflix TechBlog - Medium
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
L
LangChain Blog
大猫的无限游戏
大猫的无限游戏
IT之家
IT之家
Microsoft Security Blog
Microsoft Security Blog
GbyAI
GbyAI
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
T
The Blog of Author Tim Ferriss
Last Week in AI
Last Week in AI
B
Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
人人都是产品经理
人人都是产品经理
博客园 - 叶小钗
WordPress大学
WordPress大学
博客园 - 司徒正美

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Build a tarot reader in Node.js with an open 78-card data...
Merva Yalçın · 2026-06-24 · via DEV Community

Merva Yalçın

I wanted tarot card meanings as clean, structured data for a side project, and quickly hit the usual wall: the good interpretations live in long blog posts, and nobody wants to scrape and parse that. So I ended up packaging all 78 cards as an open, MIT-licensed dataset with npm and Python packages (and an MCP server, more on that at the end).

This post is a quick, practical tour: install it, pull a card, build a 3-card spread, and see where else the data lives. No scraping, no API key.

Install

npm install tarot-card-meanings

It ships with TypeScript types, has zero dependencies, and includes upright, reversed, love, career, and yes/no fields for every Major and Minor Arcana card.

Quick start

const tarot = require('tarot-card-meanings');

// Pull a random card
const card = tarot.getRandomCard();
console.log(card.name);     // e.g. "The Star"
console.log(card.upright);  // upright meaning
console.log(card.reversed); // reversed meaning

// Look up a specific card
const fool = tarot.getCard('The Fool');
console.log(fool.love);     // love-context interpretation
console.log(fool.career);   // career-context interpretation

// A built-in yes/no reading
const reading = tarot.getYesOrNo();
console.log(`${reading.card}: ${reading.answer}`);

Every card object has the same shape, so you can render it however you like.

Build a 3-card spread

The classic past / present / future spread is just three unique cards. Here is a tiny helper that draws without repeats:

const tarot = require('tarot-card-meanings');

function drawSpread(positions) {
  const deck = [...tarot.getAllCards()];
  return positions.map((label) => {
    const i = Math.floor(Math.random() * deck.length);
    const card = deck.splice(i, 1)[0]; // remove so it can't repeat
    return { position: label, ...card };
  });
}

const spread = drawSpread(['Past', 'Present', 'Future']);
for (const c of spread) {
  console.log(`\n${c.position}: ${c.name}`);
  console.log(c.upright);
}

That is the whole core of a reading app. Swap the position labels for ['Situation', 'Obstacle', 'Advice'] and you have a decision spread instead.

Same data in Python

If your stack is Python, the identical dataset is on PyPI:

pip install tarot-card-meanings

For the ML / data crowd

The raw dataset is also published on Hugging Face and archived with a DOI, so it is citable in a paper or notebook:

It is handy as a small, clean, labeled text corpus for embedding/semantic-search demos.

Bonus: let an AI assistant read tarot (MCP)

Because Model Context Protocol is having a moment, I also wrapped the dataset in an MCP server so an AI assistant can query card meanings as a tool:

Point a compatible client at it and your assistant can pull meanings and spreads on demand instead of hallucinating them.

See it running

If you want to see the data powering a real UI before you build your own, there is a free no-signup reader here: https://deckaura.com/pages/free-tarot-reading

All of the above is open and MIT licensed by Deckaura; the package source and issues are on GitHub, and there is a full index of the open data and tools at deckaura.com/pages/ai-data-sources. PRs and label corrections welcome.

Happy building, and if you make something with it I would love to see it in the comments.