ai-pdf-builder
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseAI PDF Builder
AI PDF Builder
YC-style docs in seconds. AI-powered PDF generator for legal documents, pitch decks, and professional reports.
Generate SAFEs, NDAs, term sheets, whitepapers, and memos from simple prompts. Works with Claude, GPT, Cursor, and AI coding agents. Perfect for:
- Whitepapers & Litepapers
- Term Sheets
- SAFEs & NDAs
- Memos & Reports
- Legal Agreements
数秒即可生成YC风格的文档,AI驱动的PDF生成工具,可用于生成法律文档、融资演示文稿和专业报告。
可通过简单的提示词生成SAFE协议、NDA保密协议、投资条款清单、白皮书和备忘录。支持对接Claude、GPT、Cursor和AI编程Agent,非常适合生成以下类型的文档:
- 白皮书与精简白皮书
- 投资条款清单
- SAFE协议与NDA保密协议
- 备忘录与报告
- 法律协议
What's New in v1.1.0
v1.1.0版本更新内容
- AI Content Generation - Generate documents from prompts using Claude
- Flag - Inject company name directly via CLI
--company - Command - Improve existing content with AI
enhance - Command - Generate executive summaries from documents
summarize - Content Sanitization - Automatic cleanup of AI-generated content
- AI内容生成 - 可通过Claude基于提示词生成文档
- 参数 - 支持通过CLI直接注入公司名称
--company - 命令 - 借助AI优化现有内容
enhance - 命令 - 为文档生成执行摘要
summarize - 内容净化 - 自动清理AI生成内容中的冗余内容
Requirements
使用要求
Option A: Local Generation (Free, Unlimited)
bash
undefined选项A:本地生成(免费、无使用限制)
bash
undefinedmacOS
macOS
brew install pandoc
brew install --cask basictex
sudo tlmgr install collection-fontsrecommended fancyhdr titlesec enumitem xcolor booktabs longtable geometry hyperref graphicx setspace array multirow
brew install pandoc
brew install --cask basictex
sudo tlmgr install collection-fontsrecommended fancyhdr titlesec enumitem xcolor booktabs longtable geometry hyperref graphicx setspace array multirow
Linux
Linux
sudo apt-get install pandoc texlive-full
**Option B: Cloud API (Coming Soon)**
No install required. Get API key at ai-pdf-builder.com
**For AI Features:**
Set your Anthropic API key:
```bash
export ANTHROPIC_API_KEY="your-key-here"sudo apt-get install pandoc texlive-full
**选项B:云API(即将上线)**
无需安装任何依赖,可前往ai-pdf-builder.com获取API密钥。
**AI功能使用要求:**
设置你的Anthropic API密钥:
```bash
export ANTHROPIC_API_KEY="your-key-here"Usage
使用方法
Check System
系统环境检查
bash
npx ai-pdf-builder checkbash
npx ai-pdf-builder checkGenerate via CLI
通过CLI生成文档
bash
undefinedbash
undefinedFrom markdown file
基于Markdown文件生成
npx ai-pdf-builder generate whitepaper ./content.md -o output.pdf
npx ai-pdf-builder generate whitepaper ./content.md -o output.pdf
With company name
携带公司名称生成
npx ai-pdf-builder generate whitepaper ./content.md -o output.pdf --company "Acme Corp"
npx ai-pdf-builder generate whitepaper ./content.md -o output.pdf --company "Acme Corp"
Document types: whitepaper, memo, agreement, termsheet, safe, nda, report, proposal
支持的文档类型:whitepaper(白皮书)、memo(备忘录)、agreement(协议)、termsheet(条款清单)、safe(SAFE协议)、nda(保密协议)、report(报告)、proposal(提案)
undefinedundefinedAI Content Generation (New!)
AI内容生成(新功能!)
bash
undefinedbash
undefinedGenerate a whitepaper from a prompt
基于提示词生成白皮书
npx ai-pdf-builder ai whitepaper "Write a whitepaper about decentralized identity" -o identity.pdf
npx ai-pdf-builder ai whitepaper "Write a whitepaper about decentralized identity" -o identity.pdf
Generate with company branding
携带公司品牌信息生成
npx ai-pdf-builder ai whitepaper "AI in healthcare" -o healthcare.pdf --company "HealthTech Inc"
npx ai-pdf-builder ai whitepaper "AI in healthcare" -o healthcare.pdf --company "HealthTech Inc"
Generate other document types
生成其他类型文档
npx ai-pdf-builder ai termsheet "Series A for a fintech startup" -o termsheet.pdf
npx ai-pdf-builder ai memo "Q4 strategy update" -o memo.pdf --company "TechCorp"
undefinednpx ai-pdf-builder ai termsheet "Series A for a fintech startup" -o termsheet.pdf
npx ai-pdf-builder ai memo "Q4 strategy update" -o memo.pdf --company "TechCorp"
undefinedEnhance Existing Content (New!)
优化现有内容(新功能!)
bash
undefinedbash
undefinedImprove and expand existing markdown
优化并拓展现有Markdown内容
npx ai-pdf-builder enhance ./draft.md -o enhanced.md
npx ai-pdf-builder enhance ./draft.md -o enhanced.md
Enhance and convert to PDF in one step
一步完成内容优化并转换为PDF
npx ai-pdf-builder enhance ./draft.md -o enhanced.pdf --pdf
undefinednpx ai-pdf-builder enhance ./draft.md -o enhanced.pdf --pdf
undefinedSummarize Documents (New!)
生成文档摘要(新功能!)
bash
undefinedbash
undefinedGenerate executive summary
生成执行摘要
npx ai-pdf-builder summarize ./long-document.md -o summary.md
npx ai-pdf-builder summarize ./long-document.md -o summary.md
Summarize as PDF
生成PDF格式的摘要
npx ai-pdf-builder summarize ./report.pdf -o summary.pdf --pdf
undefinednpx ai-pdf-builder summarize ./report.pdf -o summary.pdf --pdf
undefinedGenerate via Code
通过代码调用
typescript
import { generateWhitepaper, generateTermsheet, generateSAFE, aiGenerate, enhance, summarize } from 'ai-pdf-builder';
// AI-Generated Whitepaper
const aiResult = await aiGenerate('whitepaper',
'Write about blockchain scalability solutions',
{ company: 'ScaleChain Labs' }
);
// Whitepaper from content
const result = await generateWhitepaper(
'# My Whitepaper\n\nContent here...',
{ title: 'Project Name', author: 'Your Name', version: 'v1.0', company: 'Acme Corp' }
);
if (result.success) {
fs.writeFileSync('whitepaper.pdf', result.buffer);
}
// Enhance existing content
const enhanced = await enhance(existingMarkdown);
// Summarize a document
const summary = await summarize(longDocument);
// Term Sheet with company
const termsheet = await generateTermsheet(
'# Series Seed Term Sheet\n\n## Investment Amount\n\n$500,000...',
{ title: 'Series Seed', subtitle: 'Your Company Inc.', company: 'Investor LLC' }
);
// SAFE
const safe = await generateSAFE(
'# Simple Agreement for Future Equity\n\n...',
{ title: 'SAFE Agreement', subtitle: 'Your Company Inc.' }
);typescript
import { generateWhitepaper, generateTermsheet, generateSAFE, aiGenerate, enhance, summarize } from 'ai-pdf-builder';
// AI生成白皮书
const aiResult = await aiGenerate('whitepaper',
'Write about blockchain scalability solutions',
{ company: 'ScaleChain Labs' }
);
// 基于现有内容生成白皮书
const result = await generateWhitepaper(
'# My Whitepaper\n\nContent here...',
{ title: 'Project Name', author: 'Your Name', version: 'v1.0', company: 'Acme Corp' }
);
if (result.success) {
fs.writeFileSync('whitepaper.pdf', result.buffer);
}
// 优化现有内容
const enhanced = await enhance(existingMarkdown);
// 生成文档摘要
const summary = await summarize(longDocument);
// 携带公司信息生成投资条款清单
const termsheet = await generateTermsheet(
'# Series Seed Term Sheet\n\n## Investment Amount\n\n$500,000...',
{ title: 'Series Seed', subtitle: 'Your Company Inc.', company: 'Investor LLC' }
);
// 生成SAFE协议
const safe = await generateSAFE(
'# Simple Agreement for Future Equity\n\n...',
{ title: 'SAFE Agreement', subtitle: 'Your Company Inc.' }
);Document Types
支持的文档类型
| Type | Function | Best For |
|---|---|---|
| | Technical docs, litepapers |
| | Executive summaries |
| | Legal contracts |
| | Investment terms |
| | SAFE agreements |
| | Non-disclosure agreements |
| | Business reports |
| | Business proposals |
| 类型 | 对应函数 | 适用场景 |
|---|---|---|
| | 技术文档、精简白皮书 |
| | 执行摘要 |
| | 法律合同 |
| | 投资条款 |
| | SAFE协议 |
| | 保密协议 |
| | 商业报告 |
| | 商业提案 |
Custom Branding
自定义品牌配置
typescript
const result = await generateWhitepaper(content, metadata, {
customColors: {
primary: '#E85D04', // Signal Orange
secondary: '#14B8A6', // Coordinate Teal
accent: '#0D0D0D' // Frontier Dark
},
fontSize: 11,
margin: '1in',
paperSize: 'letter'
});typescript
const result = await generateWhitepaper(content, metadata, {
customColors: {
primary: '#E85D04', // 主色调:信号橙
secondary: '#14B8A6', // 次色调:协调青
accent: '#0D0D0D' // 强调色:前沿黑
},
fontSize: 11,
margin: '1in',
paperSize: 'letter'
});Agent Instructions
Agent使用说明
When a user asks to generate a PDF:
- Check what type of document they need (whitepaper, term sheet, memo, etc.)
- Determine if they want AI generation or have existing content
- Get the content - either from their message, a file, or use AI to generate
- Ask for metadata if not provided (title, author, company name)
- Use flag to inject company branding
--company - Check if Pandoc is installed:
which pandoc - If Pandoc missing, provide install instructions or suggest cloud API
- Generate the PDF using the appropriate function
- Send the PDF file to the user
AI Commands Quick Reference:
- - Generate new document from prompt
ai <type> "<prompt>" - - Improve existing content
enhance <file> - - Create executive summary
summarize <file> - - Add company branding to any command
--company "Name"
当用户要求生成PDF时,请按照以下步骤操作:
- 确认用户需要的文档类型(白皮书、条款清单、备忘录等)
- 确认用户是需要AI生成内容,还是已有现成内容
- 获取内容:可来自用户的消息、上传的文件,或者使用AI生成
- 如果用户未提供元数据(标题、作者、公司名称),请向用户询问
- 使用参数注入公司品牌信息
--company - 检查是否已安装Pandoc:执行
which pandoc - 如果未安装Pandoc,提供安装指引,或者建议使用云API
- 使用对应的函数生成PDF
- 将生成的PDF文件发送给用户
AI命令速查:
- - 基于提示词生成新文档
ai <type> "<prompt>" - - 优化现有内容
enhance <file> - - 生成执行摘要
summarize <file> - - 为任意命令添加公司品牌信息
--company "Name"