xhs-ai-writer
这是一个专为小红书内容创作者打造的AI工具,能够智能分析热门笔记并生成高质量的爆款文案。
Stars: 184
AI小红书爆款文案生成器 is a revolutionary upgrade from 'general model' to 'Little Red Book explosive expert'. It intelligently analyzes popular notes and generates explosive copy with human touch. It features a dual expert system, triple security guarantee, complete content ecosystem, and enhanced user experience. The tool uses Next.js, React, TypeScript, Tailwind CSS, and custom UI components in the frontend, Next.js API Routes for backend, and integrates OpenAI API with intelligent retry mechanism for AI. It ensures content safety, stability, and error handling. Users can input keywords, provide original materials, let AI intelligently create content, and easily copy the generated content for use. The tool supports multiple AI models for high availability and has a smart cache system for faster response and reduced API calls. It also highlights core technical features like dual expert system architecture, threefold security system, intelligent content parsing engine, and user experience optimization.
README:
从"通用模型"到"小红书爆款专家"的革命性升级 智能分析热门笔记,一键生成人味十足的爆款文案
- 🔬 分析专家: 公式化拆解热门笔记,提取可套用的爆款公式
- 🎨 创作专家: 注入真情实感,去除AI味,打造人味十足的内容
- 📋 格式稳定性: 强化Prompt约束 + 后端内容清洗
- 🚨 内容安全性: 105+敏感词库 + 实时流式过滤
- ✅ 验证完整性: 多层验证逻辑 + 智能错误恢复
- 📊 爆款标题: 基于真实数据的标题公式(情感共鸣型、实用价值型、好奇悬念型)
- 📝 正文内容: 5种开头钩子 + 结构化正文 + 5种结尾策略
- 🏷️ 智能标签: 核心词+场景词+人群词+内容类型词的科学组合
- 🎨 配图提示: 基于封面风格分析的AI绘画提示词
- 📱 响应式设计: 完美适配桌面端和移动端
- ⚡ 流式生成: 实时显示创作过程,多阶段加载反馈
- 📋 独立复制: 每个内容模块都有专属复制按钮
- 🎭 引导优化: 三步流程引导 + 详细输入模板
- 框架: Next.js 15 + React 18 + TypeScript 5
- 样式: Tailwind CSS 3 + 自定义Shadcn/ui组件
- 状态管理: React Hooks + 实时流式状态
- UI增强: 渐变设计 + 响应式布局 + 动画效果
- API: Next.js API Routes (Serverless Functions)
- AI集成: OpenAI兼容接口 + 智能重试机制
- 数据处理: 流式传输 + 实时内容过滤
- 缓存系统: 文件缓存 + 智能降级策略
- 内容安全: 敏感词过滤 + 实时安全检查
- 格式稳定: Prompt强化 + 后端内容清洗
- 错误处理: 结构化错误 + 智能重试机制
- Node.js 18+
- npm 或 yarn
npm install复制 .env.local 文件并填入真实配置:
# 第三方AI服务的接入点URL (通常以 /v1 结尾)
THIRD_PARTY_API_URL="https://your-api-provider.com/v1"
# 第三方AI服务API密钥
THIRD_PARTY_API_KEY="your_api_key_here"
# AI模型名称(支持多模型降级,用逗号分隔)
AI_MODEL_NAME="gemini-2.5-pro,gemini-2.5-flash"
# 缓存功能开关 (true=启用, false=禁用)
ENABLE_CACHE=true
# 小红书Cookie(可选,用于真实数据抓取)
XHS_COOKIE="your_xiaohongshu_cookie_here"npm run dev访问 http://localhost:3000 查看应用
- 填写具体的主题关键词(如:
春季敏感肌护肤、职场穿搭技巧、平价美妆好物) - 关键词越具体,分析越精准
使用我们提供的模板,输入详细信息:
产品:XX牌新款玻尿酸精华
特点:质地清爽,吸收快,主打深层补水
我的感受:用了一周,感觉皮肤没那么干了,上妆也更服帖
目标人群:20-30岁的年轻女性,混合皮或干皮
价格:199元,性价比很高
- 分析阶段: AI分析该关键词的热门笔记,提取爆款公式
- 创作阶段: 基于公式和您的素材,生成人味十足的内容
获得完整的小红书内容包:
- 🎯 3个爆款标题 - 不同风格,任您选择
- 📝 正文内容 - 结构清晰,真情实感
- 🏷️ 热门标签 - 科学组合,提升曝光
- 🎨 配图提示 - AI绘画提示词,图文并茂
- 将代码推送到GitHub仓库
- 在Vercel中导入项目
- 配置环境变量(与本地.env.local相同)
- 一键部署完成
├── app/
│ ├── api/
│ │ ├── analyze-hot-posts/ # 热门分析API
│ │ └── generate-content/ # 内容生成API
│ ├── globals.css # 全局样式
│ ├── layout.tsx # 根布局
│ └── page.tsx # 主页面
├── components/
│ └── ui/ # UI组件库
├── lib/
│ └── utils.ts # 工具函数
├── .env.local # 环境变量
└── README.md
应用支持多模型降级策略,确保服务的高可用性:
-
配置方式: 在
AI_MODEL_NAME中用逗号分隔多个模型 - 降级逻辑: 优先使用第一个模型 → 失败后自动切换到备用模型
- 重试机制: 每个模型都有独立的重试次数(默认2次)
- 智能恢复: 下次请求会重新从第一个模型开始尝试
# 单模型配置
AI_MODEL_NAME="gemini-2.5-pro"
# 多模型降级配置(推荐)
AI_MODEL_NAME="gemini-2.5-pro,gemini-2.5-flash"
# 更多模型配置
AI_MODEL_NAME="gpt-4,gemini-2.5-pro,gemini-2.5-flash"- 🎯 主模型尝试: 使用第一个模型(如
gemini-2.5-pro) - 🔄 重试机制: 如果失败,重试2次(带指数退避)
- 🔀 模型切换: 主模型所有重试失败后,切换到备用模型
- ✅ 成功恢复: 备用模型成功后,下次请求重新从主模型开始
应用内置了智能缓存系统,可以显著提升响应速度并减少对小红书API的请求频率:
- 缓存策略: 优先使用有效缓存 → 尝试实时抓取 → 降级到同分类备用缓存
-
缓存时效: 6小时(可在
lib/cache-manager.ts中调整) -
存储位置:
data/cache/目录(自动创建) - 分类管理: 按关键词分类存储,支持跨关键词的备用缓存
在 .env.local 中设置 ENABLE_CACHE 环境变量:
# 启用缓存(默认,推荐)
ENABLE_CACHE=true
# 禁用缓存(每次都重新抓取,响应较慢但数据最新)
ENABLE_CACHE=false- 开发环境: 建议启用缓存,提升开发效率
- 生产环境: 根据需求选择,启用缓存可减少API调用成本
- 数据敏感场景: 如需确保数据实时性,可禁用缓存
- 请确保API密钥的安全性,不要将其提交到公共仓库
- 必须配置有效的API密钥和小红书Cookie,否则服务将无法正常工作
- 建议使用支持JSON格式输出的AI模型以获得最佳效果
- 缓存文件包含抓取的数据,请注意数据隐私保护
// 公式化拆解热门笔记
{
"titleFormulas": {
"suggestedFormulas": ["数字+卖点+人群", "场景+解决方案+情感词"],
"commonKeywords": ["高频词汇"],
"avoidWords": ["过时网络用语"]
},
"contentStructure": {
"openingHooks": ["5种开头钩子策略"],
"bodyTemplate": "痛点→产品→细节→感受→建议",
"endingHooks": ["5种结尾互动策略"]
},
"coverStyleAnalysis": {
"commonStyles": ["杂志风拼贴", "全身镜穿搭", "左右对比图"],
"suggestion": "最适合的封面风格建议"
}
}- 人设注入: 从"AI助手"转变为"和闺蜜分享好物的朋友"
- AI味清除: 禁用"首先"、"其次"、"yyds"、"绝绝子"等机械化表达
- 真情实感: 使用"天啊!"、"我挖到宝了!"、"真的栓Q!"等生活化感叹
- 细节升级: 从"很好看"到"阳光下波光粼粼的感觉,绝了"
// 后端内容清洗
let contentStarted = false;
const startMarker = "## 1. 爆款标题创作";
// 自动过滤AI前置解释文字// 105+敏感词库 + 实时过滤
const sensitiveWords = [
"最", "第一", "治疗", "疗效", "秒杀", "100%有效"
// ... 8大类敏感词汇
];
// 智能替换:'最' → '很', '治疗' → '改善'// 多层验证逻辑
validateTitleFormulas(titleFormulas, errors);
validateContentStructure(contentStructure, errors);
validateTagStrategy(tagStrategy, errors);- 四部分解析: 自动提取标题、正文、标签、AI绘画提示词
- 正则表达式匹配: 支持多种格式变体的智能识别
- 实时流式解析: React useEffect实时监听并分割内容
- 备用降级策略: 正则失败时自动使用固定标记匹配
-
多阶段加载:
🔍 正在分析热门笔记...→✅ 分析完成!正在生成文案... - 独立复制功能: 每个内容模块都有专属复制按钮
- 渐变视觉设计: 粉红到红色的现代化渐变效果
- 响应式布局: 完美适配桌面端和移动端
这个项目由小红书博主精心打造,专注于AI工具开发和内容创作技巧分享。
在我的小红书账号,你可以获得:
- 🔥 最新AI工具使用技巧
- 📝 小红书运营实战经验
- 💡 爆款文案创作心得
- 🚀 内容创作工具推荐
- 如果这个工具对你有帮助,欢迎在小红书私信交流
- 有任何使用问题或改进建议,也可以通过小红书联系我
- 期待看到你用这个工具创作出的爆款内容!
MIT License
For Tasks:
Click tags to check more tools for each tasksFor Jobs:
Alternative AI tools for xhs-ai-writer
Similar Open Source Tools
xhs-ai-writer
AI小红书爆款文案生成器 is a revolutionary upgrade from 'general model' to 'Little Red Book explosive expert'. It intelligently analyzes popular notes and generates explosive copy with human touch. It features a dual expert system, triple security guarantee, complete content ecosystem, and enhanced user experience. The tool uses Next.js, React, TypeScript, Tailwind CSS, and custom UI components in the frontend, Next.js API Routes for backend, and integrates OpenAI API with intelligent retry mechanism for AI. It ensures content safety, stability, and error handling. Users can input keywords, provide original materials, let AI intelligently create content, and easily copy the generated content for use. The tool supports multiple AI models for high availability and has a smart cache system for faster response and reduced API calls. It also highlights core technical features like dual expert system architecture, threefold security system, intelligent content parsing engine, and user experience optimization.
BigBanana-AI-Director
BigBanana AI Director is an industrial AI motion comic and video workbench platform that provides a one-stop solution for creating short dramas and comics. It utilizes a 'Script-to-Asset-to-Keyframe' workflow with advanced AI models to automate the process from script to final production, ensuring precise control over character consistency, scene continuity, and camera movements. The tool is designed to streamline the production process for creators, enabling efficient production from idea to finished product.
AI-Drug-Discovery-Design
AI-Drug-Discovery-Design is a repository focused on Artificial Intelligence-assisted Drug Discovery and Design. It explores the use of AI technology to accelerate and optimize the drug development process. The advantages of AI in drug design include speeding up research cycles, improving accuracy through data-driven models, reducing costs by minimizing experimental redundancies, and enabling personalized drug design for specific patients or disease characteristics.
AIstudioProxyAPI
AI Studio Proxy API is a Python-based proxy server that converts the Google AI Studio web interface into an OpenAI-compatible API. It provides stable API access through Camoufox (anti-fingerprint detection Firefox) and Playwright automation. The project offers an OpenAI-compatible API endpoint, a three-layer streaming response mechanism, dynamic model switching, complete parameter control, anti-fingerprint detection, script injection functionality, modern web UI, graphical interface launcher, flexible authentication system, modular architecture, unified configuration management, and modern development tools.
PersonalExam
PersonalExam is a personalized question generation system based on LLM and knowledge graph collaboration. It utilizes the BKT algorithm, RAG engine, and OpenPangu model to achieve personalized intelligent question generation and recommendation. The system features adaptive question recommendation, fine-grained knowledge tracking, AI answer evaluation, student profiling, visual reports, interactive knowledge graph, user management, and system monitoring.
MaiMBot
MaiMBot is an intelligent QQ group chat bot based on a large language model. It is developed using the nonebot2 framework, utilizes LLM for conversation abilities, MongoDB for data persistence, and NapCat for QQ protocol support. The bot features keyword-triggered proactive responses, dynamic prompt construction, support for images and message forwarding, typo generation, multiple replies, emotion-based emoji responses, daily schedule generation, user relationship management, knowledge base, and group impressions. Work-in-progress features include personality, group atmosphere, image handling, humor, meme functions, and Minecraft interactions. The tool is in active development with plans for GIF compatibility, mini-program link parsing, bug fixes, documentation improvements, and logic enhancements for emoji sending.
Snap-Solver
Snap-Solver is a revolutionary AI tool for online exam solving, designed for students, test-takers, and self-learners. With just a keystroke, it automatically captures any question on the screen, analyzes it using AI, and provides detailed answers. Whether it's complex math formulas, physics problems, coding issues, or challenges from other disciplines, Snap-Solver offers clear, accurate, and structured solutions to help you better understand and master the subject matter.
LLMAI-writer
LLMAI-writer is a powerful AI tool for assisting in novel writing, utilizing state-of-the-art large language models to help writers brainstorm, plan, and create novels. Whether you are an experienced writer or a beginner, LLMAI-writer can help you efficiently complete the writing process.
Daily-DeepLearning
Daily-DeepLearning is a repository that covers various computer science topics such as data structures, operating systems, computer networks, Python programming, data science packages like numpy, pandas, matplotlib, machine learning theories, deep learning theories, NLP concepts, machine learning practical applications, deep learning practical applications, and big data technologies like Hadoop and Hive. It also includes coding exercises related to '剑指offer'. The repository provides detailed explanations and examples for each topic, making it a comprehensive resource for learning and practicing different aspects of computer science and data-related fields.
prompt-optimizer
Prompt Optimizer is a powerful AI prompt optimization tool that helps you write better AI prompts, improving AI output quality. It supports both web application and Chrome extension usage. The tool features intelligent optimization for prompt words, real-time testing to compare before and after optimization, integration with multiple mainstream AI models, client-side processing for security, encrypted local storage for data privacy, responsive design for user experience, and more.
AutoGLM-GUI
AutoGLM-GUI is an AI-driven Android automation productivity tool that supports scheduled tasks, remote deployment, and 24/7 AI assistance. It features core functionalities such as deploying to servers, scheduling tasks, and creating an AI automation assistant. The tool enhances productivity by automating repetitive tasks, managing multiple devices, and providing a layered agent mode for complex task planning and execution. It also supports real-time screen preview, direct device control, and zero-configuration deployment. Users can easily download the tool for Windows, macOS, and Linux systems, and can also install it via Python package. The tool is suitable for various use cases such as server automation, batch device management, development testing, and personal productivity enhancement.
AI_NovelGenerator
AI_NovelGenerator is a versatile novel generation tool based on large language models. It features a novel setting workshop for world-building, character development, and plot blueprinting, intelligent chapter generation for coherent storytelling, a status tracking system for character arcs and foreshadowing management, a semantic retrieval engine for maintaining long-range context consistency, integration with knowledge bases for local document references, an automatic proofreading mechanism for detecting plot contradictions and logic conflicts, and a visual workspace for GUI operations encompassing configuration, generation, and proofreading. The tool aims to assist users in efficiently creating logically rigorous and thematically consistent long-form stories.
AHU-AI-Repository
This repository is dedicated to the learning and exchange of resources for the School of Artificial Intelligence at Anhui University. Notes will be published on this website first: https://www.aoaoaoao.cn and will be synchronized to the repository regularly. You can also contact me at [email protected].
MahoShojo-Generator
MahoShojo-Generator is a web-based AI structured generation tool that allows players to create personalized and evolving magical girls (or quirky characters) and related roles. It offers exciting cyber battles, storytelling activities, and even a ranking feature. The project also includes AI multi-channel polling, user system, public data card sharing, and sensitive word detection. It supports various functionalities such as character generation, arena system, growth and social interaction, cloud and sharing, and other features like scenario generation, tavern ecosystem linkage, and content safety measures.
For similar tasks
xhs-ai-writer
AI小红书爆款文案生成器 is a revolutionary upgrade from 'general model' to 'Little Red Book explosive expert'. It intelligently analyzes popular notes and generates explosive copy with human touch. It features a dual expert system, triple security guarantee, complete content ecosystem, and enhanced user experience. The tool uses Next.js, React, TypeScript, Tailwind CSS, and custom UI components in the frontend, Next.js API Routes for backend, and integrates OpenAI API with intelligent retry mechanism for AI. It ensures content safety, stability, and error handling. Users can input keywords, provide original materials, let AI intelligently create content, and easily copy the generated content for use. The tool supports multiple AI models for high availability and has a smart cache system for faster response and reduced API calls. It also highlights core technical features like dual expert system architecture, threefold security system, intelligent content parsing engine, and user experience optimization.
design-studio
Tiledesk Design Studio is an open-source, no-code development platform for creating chatbots and conversational apps. It offers a user-friendly, drag-and-drop interface with pre-ready actions and integrations. The platform combines the power of LLM/GPT AI with a flexible 'graph' approach for creating conversations and automations with ease. Users can automate customer conversations, prototype conversations, integrate ChatGPT, enhance user experience with multimedia, provide personalized product recommendations, set conditions, use random replies, connect to other tools like HubSpot CRM, integrate with WhatsApp, send emails, and seamlessly enhance existing setups.
koordinator
Koordinator is a QoS based scheduling system for hybrid orchestration workloads on Kubernetes. It aims to improve runtime efficiency and reliability of latency sensitive workloads and batch jobs, simplify resource-related configuration tuning, and increase pod deployment density. It enhances Kubernetes user experience by optimizing resource utilization, improving performance, providing flexible scheduling policies, and easy integration into existing clusters.
Streamer-Sales
Streamer-Sales is a large model for live streamers that can explain products based on their characteristics and inspire users to make purchases. It is designed to enhance sales efficiency and user experience, whether for online live sales or offline store promotions. The model can deeply understand product features and create tailored explanations in vivid and precise language, sparking user's desire to purchase. It aims to revolutionize the shopping experience by providing detailed and unique product descriptions to engage users effectively.
ChatGPT
ChatGPT is a desktop application available on Mac, Windows, and Linux that provides a powerful AI wrapper experience. It allows users to interact with AI models for various tasks such as generating text, answering questions, and engaging in conversations. The application is designed to be user-friendly and accessible to both beginners and advanced users. ChatGPT aims to enhance the user experience by offering a seamless interface for leveraging AI capabilities in everyday scenarios.
chatflow
Chatflow is a tool that provides a chat interface for users to interact with systems using natural language. The engine understands user intent and executes commands for tasks, allowing easy navigation of complex websites/products. This approach enhances user experience, reduces training costs, and boosts productivity.
zodiac
Zodiac is a frontend tool designed to interact with Google's Gemini Pro using vanilla JS. It provides a user-friendly interface for accessing the functionalities of Google AI Suite. The tool simplifies the process of utilizing Gemini Pro's capabilities through a straightforward web application. Users can easily integrate their API key and access various features offered by Google AI Suite. Zodiac aims to streamline the interaction with Gemini Pro and enhance the user experience by offering a simple and intuitive interface for managing AI tasks.
deforum-comfy-nodes
Deforum for ComfyUI is an integration tool designed to enhance the user experience of using ComfyUI. It provides custom nodes that can be added to ComfyUI to improve functionality and workflow. Users can easily install Deforum for ComfyUI by cloning the repository and following the provided instructions. The tool is compatible with Python v3.10 and is recommended to be used within a virtual environment. Contributions to the tool are welcome, and users can join the Discord community for support and discussions.
For similar jobs
StoryToolKit
StoryToolkitAI is a film editing tool that utilizes AI to transcribe, index scenes, search through footage, and create stories. It offers features such as automatic transcription, translation, story creation, speaker detection, project file management, and more. The tool works locally on your machine and integrates with DaVinci Resolve Studio 18. It aims to streamline the editing process by leveraging AI capabilities and enhancing user efficiency.
genai-toolbox
Gen AI Toolbox for Databases is an open source server that simplifies building Gen AI tools for interacting with databases. It handles complexities like connection pooling, authentication, and more, enabling easier, faster, and more secure tool development. The toolbox sits between the application's orchestration framework and the database, providing a control plane to modify, distribute, or invoke tools. It offers simplified development, better performance, enhanced security, and end-to-end observability. Users can install the toolbox as a binary, container image, or compile from source. Configuration is done through a 'tools.yaml' file, defining sources, tools, and toolsets. The project follows semantic versioning and welcomes contributions.
sdialog
SDialog is an MIT-licensed open-source toolkit for building, simulating, and evaluating LLM-based conversational agents end-to-end. It aims to bridge agent construction, user simulation, dialog generation, and evaluation in a single reproducible workflow, enabling the generation of reliable, controllable dialog systems or data at scale. The toolkit standardizes a Dialog schema, offers persona-driven multi-agent simulation with LLMs, provides composable orchestration for precise control over behavior and flow, includes built-in evaluation metrics, and offers mechanistic interpretability. It allows for easy creation of user-defined components and interoperability across various AI platforms.
xhs-ai-writer
AI小红书爆款文案生成器 is a revolutionary upgrade from 'general model' to 'Little Red Book explosive expert'. It intelligently analyzes popular notes and generates explosive copy with human touch. It features a dual expert system, triple security guarantee, complete content ecosystem, and enhanced user experience. The tool uses Next.js, React, TypeScript, Tailwind CSS, and custom UI components in the frontend, Next.js API Routes for backend, and integrates OpenAI API with intelligent retry mechanism for AI. It ensures content safety, stability, and error handling. Users can input keywords, provide original materials, let AI intelligently create content, and easily copy the generated content for use. The tool supports multiple AI models for high availability and has a smart cache system for faster response and reduced API calls. It also highlights core technical features like dual expert system architecture, threefold security system, intelligent content parsing engine, and user experience optimization.
aiyabot
AIYA is a Discord bot interface for Stable Diffusion, offering features like live preview, negative prompts, model swapping, image generation, image captioning, image resizing, and more. It supports various options and bonus features to enhance user experience. Users can set per-channel defaults, view stats, manage queues, upscale images, and perform various commands on images. AIYA requires setup with AUTOMATIC1111's Stable Diffusion AI Web UI or SD.Next, and can be deployed using Docker with additional configuration options. Credits go to AUTOMATIC1111, vladmandic, harubaru, and various contributors for their contributions to AIYA's development.
LLMStack
LLMStack is a no-code platform for building generative AI agents, workflows, and chatbots. It allows users to connect their own data, internal tools, and GPT-powered models without any coding experience. LLMStack can be deployed to the cloud or on-premise and can be accessed via HTTP API or triggered from Slack or Discord.
daily-poetry-image
Daily Chinese ancient poetry and AI-generated images powered by Bing DALL-E-3. GitHub Action triggers the process automatically. Poetry is provided by Today's Poem API. The website is built with Astro.
exif-photo-blog
EXIF Photo Blog is a full-stack photo blog application built with Next.js, Vercel, and Postgres. It features built-in authentication, photo upload with EXIF extraction, photo organization by tag, infinite scroll, light/dark mode, automatic OG image generation, a CMD-K menu with photo search, experimental support for AI-generated descriptions, and support for Fujifilm simulations. The application is easy to deploy to Vercel with just a few clicks and can be customized with a variety of environment variables.