Skip to content

@tkawen/mystoq-seo-toolkit

English — Comprehensive SEO toolkit: llms.txt + sitemap + Schema.org JSON-LD + OpenGraph + hreflang. Built for the modern AI-aware web.

عربي — حزمة SEO/GEO شاملة: توليد llms.txt و sitemaps و JSON-LD لمتاجر Mystoq.

Terminal window
npm install @tkawen/mystoq-seo-toolkit

The SEO toolkit built for the AI-aware web. llms.txt · sitemap · Schema.org JSON-LD · OpenGraph · hreflang · robots.txt — all in one zero-dependency package.

npm version License: MIT GitHub Stars


Most SEO libraries were built for a pre-LLM world. They generate sitemap.xml and Schema.org JSON-LD, but they ignore the new reality:

  • AI search engines (ChatGPT, Claude, Perplexity, Google AI Overviews) read your site through llms.txt
  • AI crawlers (GPTBot, ClaudeBot, PerplexityBot) need explicit robots.txt policy
  • Schema.org is now the primary way LLMs understand your entity (Person, Organization, Product)
  • OpenGraph + Twitter still drive 60%+ of social traffic
  • hreflang is essential for any non-English site

This toolkit gives you all of it — zero dependencies, ~12KB minified, ESM-first, TypeScript-ready.


Terminal window
npm install @tkawen/mystoq-seo-toolkit
# or
pnpm add @tkawen/mystoq-seo-toolkit
# or
yarn add @tkawen/mystoq-seo-toolkit

import { generateLlmsTxt } from '@tkawen/mystoq-seo-toolkit';
const llms = generateLlmsTxt({
title: 'Acme Corp',
summary: 'Cloud infrastructure for emerging markets.',
details: 'Acme provides identity, payments, and compute APIs serving 50+ countries.',
sections: [
{
title: 'Documentation',
links: [
{ text: 'Getting Started', url: 'https://acme.com/docs/start' },
{ text: 'API Reference', url: 'https://acme.com/api', note: 'OpenAPI 3.1' },
],
},
{
title: 'Products',
links: [
{ text: 'Identity', url: 'https://acme.com/identity' },
{ text: 'Payments', url: 'https://acme.com/payments' },
],
},
],
optional: [
{ text: 'Changelog', url: 'https://acme.com/changelog' },
],
});
// Write to public/llms.txt
import { writeFileSync } from 'node:fs';
writeFileSync('public/llms.txt', llms);
import { generateSitemap } from '@tkawen/mystoq-seo-toolkit';
const xml = generateSitemap([
{
loc: 'https://acme.com/',
lastmod: new Date(),
changefreq: 'daily',
priority: 1.0,
alternates: [
{ hreflang: 'en', href: 'https://acme.com/' },
{ hreflang: 'ar', href: 'https://acme.com/ar/' },
{ hreflang: 'x-default', href: 'https://acme.com/' },
],
},
{ loc: 'https://acme.com/products', changefreq: 'weekly', priority: 0.8 },
]);
import {
schemaOrganization,
schemaProduct,
schemaFAQPage,
schemaArticle,
schemaPerson,
jsonLdScript,
} from '@tkawen/mystoq-seo-toolkit';
const org = schemaOrganization({
name: 'Acme Corp',
url: 'https://acme.com',
logo: 'https://acme.com/logo.png',
founder: 'Jane Doe',
sameAs: [
'https://twitter.com/acme',
'https://github.com/acme',
'https://linkedin.com/company/acme',
],
});
// Drop into your HTML
const html = jsonLdScript(org);
// → <script type="application/ld+json">{ ... }</script>
import { generateRobotsTxt } from '@tkawen/mystoq-seo-toolkit';
const robots = generateRobotsTxt({
groups: [
{ userAgent: '*', allow: ['/'], disallow: ['/admin/', '/api/'] },
],
aiCrawlers: 'allow', // explicitly allows GPTBot, ClaudeBot, PerplexityBot, etc.
sitemap: 'https://acme.com/sitemap.xml',
host: 'acme.com',
});
import { generateOgTags, generateTwitterCard } from '@tkawen/mystoq-seo-toolkit';
const og = generateOgTags({
title: 'How we built a cloud',
description: 'A 4-year journey from idea to 50k customers.',
url: 'https://acme.com/blog/cloud-platform',
image: 'https://acme.com/og/cloud-platform.png',
type: 'article',
siteName: 'Acme Blog',
});
const tw = generateTwitterCard({
card: 'summary_large_image',
site: '@acme',
creator: '@janedoe',
title: 'How we built a cloud',
image: 'https://acme.com/og/cloud-platform.png',
});
import { generateHreflangTags, validateHreflang } from '@tkawen/mystoq-seo-toolkit';
const pairs = [
{ hreflang: 'en', href: 'https://acme.com/products' },
{ hreflang: 'ar', href: 'https://acme.com/ar/products' },
{ hreflang: 'fr', href: 'https://acme.com/fr/products' },
{ hreflang: 'x-default', href: 'https://acme.com/products' },
];
const tags = generateHreflangTags(pairs);
const result = validateHreflang(pairs);
if (!result.ok) console.warn(result.warnings);

Terminal window
# One-command setup
npx @tkawen/mystoq-seo-toolkit init
# Generates llms.txt, robots.txt, organization.jsonld in the current dir.
Terminal window
# Generate llms.txt from a config file
npx @tkawen/mystoq-seo-toolkit llmstxt llms.config.json > public/llms.txt
Terminal window
# Generate sitemap.xml from a JSON array of URLs
echo '[{"loc":"https://acme.com"}, {"loc":"https://acme.com/about"}]' > urls.json
npx @tkawen/mystoq-seo-toolkit sitemap urls.json > public/sitemap.xml

ModuleWhat it generatesSpec
llmstxtllms.txt + llms-full.txtllmstxt.org
sitemapsitemap.xml, sitemap index, image sitemapsitemaps.org
robotsrobots.txt with AI crawler groupsRFC 9309
schemaSchema.org JSON-LD (10 entity types)schema.org
ogOpenGraph + Twitter Card meta tagsogp.me
hreflang<link rel="alternate"> clusterhreflang spec

The web is being read by two audiences now:

  1. Humans clicking from Google search results
  2. AI agents answering questions on behalf of humans

If you only optimize for #1, you’re invisible to half your future traffic.

This toolkit makes you visible to both:

  • llms.txt lets ChatGPT/Claude/Perplexity efficiently understand your site
  • ✅ AI-aware robots.txt lets you opt in (or out) of each LLM crawler
  • ✅ Rich Schema.org JSON-LD makes you the structured-data source LLMs prefer
  • ✅ Classic SEO (sitemap, OG, hreflang) keeps you ranking for human searches

Author of Mystoq (e-commerce platform), Algeria Certify (national credentialing), and TKAWEN (cloud ecosystem).

Used in production across 11 platforms serving 50,000+ users.


MIT — Use it freely in commercial and open-source projects.



PRs welcome. See CONTRIBUTING.md for guidelines.

If this saves you time, sponsor the project or contribute back.


🏛️ TKAWEN Ecosystem · منظومة تكوّن

Section titled “🏛️ TKAWEN Ecosystem · منظومة تكوّن”

EN — Part of TKAWEN, Algeria’s software ecosystem: commerce, certification, meetings and AI infrastructure. One organisation, one trust layer.

عربي — جزء من تكوّن، المنظومة البرمجية الجزائرية: تجارة، توثيق، اجتماعات، وبنية ذكاء اصطناعي. مؤسّسة واحدة، طبقة ثقة واحدة.

Packages · الحزم: @tkawen/mystoq-sdk · @tkawen/mystoq-react · @tkawen/mystoq-mcp-server · @tkawen/mystoq-seo-toolkit · @tkawen/mystoq-maystro-bridge · @tkawen/mystoq-whatsapp-bridge · @tkawen/mystoq-yalidine-bridge · @tkawen/liqaa-js · @tkawen/liqaa-react

MCP Gateway: mcp.tkawen.com — official in the Model Context Protocol Registry (com.tkawen/intelligence-gateway)

Web: tkawen.com · Author · المؤلّف: Hartem Yaakoub · License: MIT