Official documentation for Lua CLI and LuaPop Chat Widget. Built with Mintlify.
# Clone the repository
git clone <repository-url>
cd mintlify-docsInstall Mintlify CLI:
npm:
npm install -g mintlifyyarn:
yarn global add mintlifypnpm:
pnpm add -g mintlifyStart local development server:
mintlify dev
# or
mint devThe documentation will be available at http://localhost:3000
mintlify-docs/
βββ docs.json # Main configuration file (navigation, theme, etc.)
βββ index.mdx # Homepage
βββ README.md # This file
β
βββ getting-started/ # Getting started guides
β βββ quick-start.mdx
β βββ installation.mdx
β βββ first-skill.mdx
β
βββ concepts/ # Core concepts
β βββ skills-and-tools.mdx
β βββ platform-apis.mdx
β βββ environment-variables.mdx
β βββ workflows.mdx
β
βββ cli/ # CLI command reference
β βββ overview.mdx
β βββ authentication.mdx
β βββ skill-management.mdx
β βββ development.mdx
β βββ troubleshooting.mdx
β
βββ api/ # API reference
β βββ overview.mdx
β βββ luaskill.mdx
β βββ luatool.mdx
β βββ user.mdx
β βββ data.mdx
β βββ products.mdx
β βββ baskets.mdx
β βββ orders.mdx
β βββ environment.mdx
β
βββ template/ # Template guide
β βββ overview.mdx
β βββ project-structure.mdx
β βββ building-skills.mdx
β βββ multi-skill-projects.mdx
β βββ best-practices.mdx
β
βββ examples/ # Tool examples
β βββ overview.mdx
β βββ weather.mdx
β βββ user-data.mdx
β βββ products.mdx
β βββ baskets.mdx
β βββ custom-data.mdx
β βββ payment.mdx
β
βββ chat-widget/ # LuaPop chat widget docs
β βββ introduction.mdx
β βββ quick-start.mdx
β βββ installation.mdx
β βββ configuration.mdx
β βββ styling.mdx
β βββ events.mdx
β βββ frameworks.mdx
β βββ examples.mdx
β βββ migration.mdx
β βββ voice-chat.mdx
β βββ analytics.mdx
β βββ troubleshooting.mdx
β
βββ logo/ # Brand assets
βββ light.png
βββ dark.png
The documentation has 2 main tabs configured in docs.json:
Building AI skills with TypeScript
- Getting Started (4 pages)
- Core Concepts (4 pages)
- CLI Commands (5 pages)
- API Reference (9 pages)
- Template & Examples (12 pages)
Embeddable chat widget
- Getting Started (3 pages)
- Configuration (3 pages)
- Integration (3 pages)
- Advanced (3 pages)
Create a new .mdx file in the appropriate directory:
---
title: "Page Title"
description: "Brief description for SEO and previews"
---
## Your Content Here
Use Markdown and Mintlify components...Update docs.json to include the new page:
{
"group": "Your Group",
"pages": [
"existing/page",
"your-folder/new-page" // Add this line
]
}mint devThe new page will appear in the navigation automatically.
<Card title="Title" icon="rocket" href="/link">
Description text
</Card>
<CardGroup cols={2}>
<Card title="Card 1" icon="check">Content</Card>
<Card title="Card 2" icon="code">Content</Card>
</CardGroup><Steps>
<Step title="First Step">
Instructions for step one
</Step>
<Step title="Second Step">
Instructions for step two
</Step>
</Steps><Tabs>
<Tab title="Option 1">
Content for option 1
</Tab>
<Tab title="Option 2">
Content for option 2
</Tab>
</Tabs><AccordionGroup>
<Accordion title="Question 1">
Answer to question 1
</Accordion>
<Accordion title="Question 2">
Answer to question 2
</Accordion>
</AccordionGroup>```typescript
// Code example with syntax highlighting
const example = "hello world";
```
```bash
# Terminal commands
npm install package
```<CodeGroup>
```typescript TypeScript
const example: string = "typed";
```
```javascript JavaScript
const example = "untyped";
```
</CodeGroup><Note>
Informational note
</Note>
<Warning>
Important warning
</Warning>
<Check>
Success message
</Check>```mdx
<ParamField path="paramName" type="string" required>
Description of the parameter
**Example:**
```javascript
paramName: "value"
```
</ParamField>
```Every page must have frontmatter:
---
title: "Page Title"
description: "Brief description (50-160 characters)"
---Use semantic heading hierarchy:
## Main Section (H2)
### Subsection (H3)
#### Detail (H4)- Use appropriate language tags:
typescript,javascript,bash,html,css,json,yaml - Include comments to explain complex code
- Show complete, runnable examples
- Use syntax highlighting
Internal links:
[Link text](/path/to/page)External links:
[Link text](https://example.com)Card links:
<Card title="Title" href="/path/to/page" />- Clear and concise - Get to the point quickly
- Action-oriented - Use verbs (Create, Configure, Deploy)
- Include examples - Show, don't just tell
- Progressive disclosure - Start simple, add complexity
- Consistent tone - Professional but friendly
Main configuration file controlling:
{
"name": "Lua CLI", // Site name
"colors": {
"primary": "#8B5CF6", // Brand colors
"light": "#A78BFA",
"dark": "#7C3AED"
},
"navigation": { // Tab and page structure
"tabs": [...]
},
"logo": { // Logo files
"light": "/logo/light.png",
"dark": "/logo/dark.png"
}
}Key sections:
colors- Brand color schemenavigation- Tab and page structurelogo- Brand logos (light/dark modes)navbar- Top navigation linksfooter- Social links
Update brand colors:
"colors": {
"primary": "#8B5CF6",
"light": "#A78BFA",
"dark": "#7C3AED"
}Add new page to navigation:
"pages": [
"existing/page",
"new/page" // Add here
]Update logo:
"logo": {
"light": "/logo/light.png",
"dark": "/logo/dark.png"
}# Start dev server
mint dev
# Make changes to .mdx files
# Save - browser auto-refreshes
# Check for broken links
mint broken-links- Create directory:
mkdir new-section - Create pages:
touch new-section/page1.mdx - Add frontmatter to each page
- Update docs.json with navigation
- Test locally:
mint dev - Commit changes
- Find the page: Navigate to
.mdxfile - Edit content: Maintain Mintlify component syntax
- Preview: Check in local dev server
- Test links: Ensure all links work
- Commit: Push changes
Every page should have:
---
title: "Clear, Descriptive Title"
description: "SEO-friendly description"
---
## Overview
Brief introduction to the topic
## Main Content
Organized into logical sections
## Examples
Practical, runnable code examples
## Next Steps
<CardGroup cols={2}>
<Card title="Related Topic 1" href="/link" />
<Card title="Related Topic 2" href="/link" />
</CardGroup>Good example:
```typescript
import { LuaSkill } from 'lua-cli';
// Create a skill
const skill = new LuaSkill({
name: "my-skill",
description: "What it does",
tools: [new MyTool()]
});
**Include:**
- Complete, runnable code
- Relevant imports
- Clear variable names
- Helpful comments
- Expected output
### Consistency
Maintain consistency across pages:
- β
Same component usage patterns
- β
Similar section structures
- β
Consistent terminology
- β
Matching code style
- β
Similar example complexity
## π Cross-Referencing
Link related pages for better navigation:
```mdx
## Next Steps
<CardGroup cols={2}>
<Card
title="Related Topic"
icon="book"
href="/related/page"
>
Short description of related content
</Card>
</CardGroup>
Internal link paths are relative to root:
/getting-started/quick-startβ../getting-started/quick-startβ
Located in /logo/:
light.png- Used in light modedark.png- Used in dark mode
Requirements:
- PNG format
- Transparent background recommended
- Reasonable size (< 100KB)
Located at root: /favicon.png
Requirements:
- PNG format
- Square dimensions (512x512 recommended)
- Clear at small sizes
Defined in docs.json:
"colors": {
"primary": "#8B5CF6", // Main brand color
"light": "#A78BFA", // Lighter variant
"dark": "#7C3AED" // Darker variant
}Used throughout the docs for:
- Links and buttons
- Code highlights
- Interactive elements
- Hover states
- Test locally:
mint dev - Check all pages load correctly
- Test navigation flows logically
- Verify code examples are correct
- Check broken links:
mint broken-links - Test mobile view (responsive design)
- All code examples have proper syntax highlighting
- All internal links work
- All images load correctly
- Mobile navigation works
- Search functionality works
- No console errors
This repository is connected to Mintlify and automatically deploys on:
- Push to
mainbranch - Pull request merge
If needed to deploy manually:
# Build the documentation
mint build
# Deploy to Mintlify
# (Typically handled by CI/CD)Each page's frontmatter affects SEO:
---
title: "Clear, Keyword-Rich Title"
description: "Compelling description with keywords (50-160 chars)"
---Mintlify's built-in search indexes:
- Page titles
- Descriptions
- Headings
- Content text
- Code comments
Tips for better search:
- Use clear, descriptive titles
- Include common search terms in content
- Add alternative phrasings
- Use semantic headings
- Identify the section where content belongs
- Create the MDX file in appropriate directory
- Add to navigation in
docs.json - Follow style guide for consistency
- Test locally with
mint dev - Create pull request with clear description
- Find the file to update
- Make changes preserving Mintlify syntax
- Test locally to verify
- Commit with descriptive message
- Create pull request
Title format:
feat: Add new section for Xfix: Correct typo in Ydocs: Update example in Zstyle: Improve formatting in W
Description should include:
- What changed and why
- Which pages were affected
- Screenshots if visual changes
- Testing performed
Getting Started - Onboarding new users
- Quick start guide
- Installation instructions
- First skill tutorial
Core Concepts - Fundamental knowledge
- Architecture explanations
- API overviews
- Configuration guides
CLI Commands - Command reference
- All CLI commands
- Usage examples
- Troubleshooting
API Reference - Technical reference
- Class and interface docs
- Method signatures
- Type definitions
Template & Examples - Learning resources
- Template project guide
- Working code examples
- Best practices
Getting Started - Quick setup
- Introduction
- Quick start
- Installation guides
Configuration - Customization
- All config options
- Styling guides
- Event system
Integration - Platform guides
- Framework integration
- Real-world examples
- Migration guides
Advanced - Advanced features
- Voice chat
- Analytics
- Troubleshooting
Cards for navigation:
<CardGroup cols={2}>
<Card title="Next Topic" icon="arrow-right" href="/path">
Brief description
</Card>
</CardGroup>Steps for tutorials:
<Steps>
<Step title="Do this first">
Detailed instructions
</Step>
</Steps>Tabs for alternatives:
<Tabs>
<Tab title="Option A">
Code for option A
</Tab>
<Tab title="Option B">
Code for option B
</Tab>
</Tabs>Accordions for FAQs:
<AccordionGroup>
<Accordion title="Question?">
Answer with details
</Accordion>
</AccordionGroup>Include complete examples:
- All necessary imports
- Full context (not just snippets)
- Expected output
- Error handling
Use appropriate language tags:
typescript- TypeScript codejavascript- JavaScript codetsx- React/TypeScript JSXbash- Shell commandshtml- HTML markupcss- Stylesheetsjson- JSON datayaml- YAML configs
Do:
- β Write clear, concise explanations
- β Use active voice
- β Include practical examples
- β Add "Next Steps" sections
- β Cross-reference related pages
- β Use consistent terminology
Don't:
- β Use jargon without explanation
- β Write overly long paragraphs
- β Include outdated information
- β Forget code syntax highlighting
- β Skip error handling in examples
Command not found:
npm install -g mintlifyPort 3000 in use:
lsof -ti:3000 | xargs kill -9
mint devChanges not reflecting:
- Hard refresh browser (Cmd+Shift+R / Ctrl+Shift+F5)
- Restart dev server
- Clear browser cache
Invalid docs.json:
- Validate JSON syntax
- Check all referenced pages exist
- Verify all URLs are valid
Broken links:
mint broken-linksFix any broken internal links.
Missing images:
- Ensure images exist in repository
- Use correct paths (relative to root)
- Check file extensions match
Mintlify provides built-in analytics for:
- Page views
- Popular searches
- User engagement
- Geographic distribution
Access analytics in Mintlify dashboard.
Add custom tracking if needed:
<!-- In a custom component or page -->
<script>
gtag('event', 'page_view', {
page_title: 'Documentation Page',
page_location: window.location.href
});
</script>Never commit:
- API keys or tokens
- Private agent IDs
- User data or emails
- Internal URLs or endpoints
Safe to commit:
- Example/placeholder IDs
- Public documentation
- Open source code examples
- Generic configurations
For examples requiring sensitive data:
```javascript
// Use placeholders
const apiKey = "your-api-key-here"; // User replaces this
const agentId = "your-agent-id"; // User gets from dashboard
## π Documentation Standards
### File Naming
- Use **kebab-case**: `my-new-page.mdx`
- Be descriptive: `voice-chat.mdx` not `vc.mdx`
- Match content: filename reflects page content
### Directory Organization
- Group related pages in folders
- Keep folder names lowercase
- Use singular for concepts: `api/` not `apis/`
- Use plural for examples: `examples/` not `example/`
### Version Control
**Commit messages:**
```bash
# Good
git commit -m "feat: add voice chat documentation"
git commit -m "fix: correct API endpoint in example"
git commit -m "docs: improve quick start guide"
# Bad
git commit -m "updates"
git commit -m "fixed stuff"
Branch naming:
# Feature branches
git checkout -b feat/add-webhook-docs
# Fix branches
git checkout -b fix/broken-link-in-api
# Documentation updates
git checkout -b docs/update-migration-guideBefore deploying major changes:
- All new pages added to
docs.json - All code examples tested
- All links verified
- Images optimized and loading
- Mobile view tested
- Search works correctly
- No console errors
- Spell check completed
- Peer review done
- Mintlify Docs: https://mintlify.com/docs
- Component Reference: https://mintlify.com/docs/components
- Style Guide: This README
- Mintlify Community: https://mintlify.com/community
- GitHub Issues: For bug reports
- Team Chat: Internal Slack/Discord
# Development
mint dev # Start local server
mint broken-links # Check for broken links
mint --version # Check Mintlify version
# Build
mint build # Build for productionAdd a new page:
- Create
section/new-page.mdx - Add to
docs.jsonnavigation - Test with
mint dev
Update navigation:
- Edit
docs.json - Update
navigation.tabsarray - Test locally
Change colors:
- Edit
docs.json - Update
colorsobject - Refresh to see changes
Update logo:
- Replace files in
/logo/ - Update paths in
docs.jsonif needed - Hard refresh browser
For questions about this documentation:
- Technical Issues: Create GitHub issue
- Content Questions: Contact documentation team
- Urgent Changes: Contact repository maintainers
- Getting Started: https://mintlify.com/docs/quickstart
- Components: https://mintlify.com/docs/components
- Configuration: https://mintlify.com/docs/settings
- Deployment: https://mintlify.com/docs/deployment
- MDX Docs: https://mdxjs.com/
- Markdown Guide: https://www.markdownguide.org/
This documentation is part of the Lua project. See LICENSE for details.
# 1. Clone repository
git clone <repository-url>
cd mintlify-docs
# 2. Install Mintlify
npm install -g mintlify
# 3. Start development
mint dev
# 4. Make changes
# Edit .mdx files in your editor
# 5. Commit & push
git add .
git commit -m "docs: your changes"
git pushHappy documenting! πβ¨