# SYNTAXIS Bundle Documentation Guide **Quick reference for managing bundle documentation.** --- ## ๐Ÿ“ Where Documents Live All bundle documentation is in `docs/`: ```bash docs/ โ”œโ”€โ”€ BUNDLE_README.md โ† Bundle overview (becomes README.md in bundle) โ”œโ”€โ”€ docs/installation.md โ† Installation guide โ”œโ”€โ”€ QUICK_START.md โ† 5-minute getting started โ”œโ”€โ”€ CONFIG.md โ† Configuration reference โ”œโ”€โ”€ TROUBLESHOOTING.md โ† Common issues & solutions โ”œโ”€โ”€ PACK.md โ† Provisioning system docs โ”œโ”€โ”€ BUNDLE_DOCS_REFERENCE.md โ† (This document - detailed reference) โ”‚ โ”œโ”€โ”€ (Development docs - NOT in bundle) โ”œโ”€โ”€ ARCHITECTURE.md โ”œโ”€โ”€ CLI_QUICK_REFERENCE.md โ”œโ”€โ”€ SURREALDB_*.md โ””โ”€โ”€ PERSISTENCE_*.md ``` --- ## ๐Ÿ”„ Update & Rebuild Cycle ``` 1. Edit docs/ โ†’ 2. Run pack.nu โ†’ 3. Distribute bundle Edit: Build: Users get: docs/docs/installation.md nu scripts/ syntaxis-v0.1.0-*.tar.gz docs/CONFIG.md provisioning/ (includes latest docs) docs/QUICK_START.md pack.nu (any source files) ``` --- ## โœ๏ธ How to Update for Next Pack ### Quick Steps ```bash # 1. Edit a document nano docs/docs/installation.md # 2. Build new bundle nu scripts/provisioning/pack.nu # 3. That's it! Bundle in dist/ has latest docs ``` ### Detailed: Where Each Doc Goes | Source File | Bundle Location | Purpose | |---|---|---| | `docs/BUNDLE_README.md` | `README.md` (root) | First thing users see | | `docs/docs/installation.md` | `docs/installation.md` (root) | High visibility | | `docs/QUICK_START.md` | `QUICK_START.md` (root) | First 5 minutes | | `docs/CONFIG.md` | `docs/CONFIG.md` | Configuration reference | | `docs/TROUBLESHOOTING.md` | `docs/TROUBLESHOOTING.md` | Problem solving | | `docs/PACK.md` | `docs/PACK.md` | Provisioning info | --- ## ๐Ÿ“‹ What to Update When | If... | Edit This | Reason | |---|---|---| | Users report installation issues | `docs/TROUBLESHOOTING.md` | Help future users | | Configuration options change | `docs/CONFIG.md` | Keep docs accurate | | Installation workflow changes | `docs/docs/installation.md` | Users follow new steps | | Getting started changes | `docs/QUICK_START.md` | First impression matters | | Bundle contents change | `docs/BUNDLE_README.md` | Describe what's inside | | Provisioning system changes | `docs/PACK.md` | Document the system | --- ## ๐Ÿ”— Configuration: provisioning.toml Located: `configs/provisioning.toml` Currently references (automatically used by pack.nu): ```toml [artifacts] docs = [ "docs/BUNDLE_README.md", "docs/docs/installation.md", "docs/QUICK_START.md", "docs/CONFIG.md", "docs/TROUBLESHOOTING.md", "docs/PACK.md", ] scripts = [ "scripts/provisioning/provision.sh", "scripts/provisioning/install.sh", "scripts/provisioning/install.nu", "scripts/provisioning/setup-config.sh", ] ``` **To add a new doc:** Add line to `docs = [...]` array, save, run pack.nu. --- ## ๐Ÿ“ฆ Automatic Reuse Each time you run `pack.nu`: โœ… Reads latest `provisioning.toml` โœ… Finds all referenced doc files โœ… Copies latest versions โœ… Renames/places them correctly โœ… Generates SHA256 checksums โœ… Creates bundle archive **No duplication needed.** Edit once, use forever. --- ## ๐Ÿ› ๏ธ Build Commands ```bash # Build for current system nu scripts/provisioning/pack.nu # Build for specific platform nu scripts/provisioning/pack.nu --target x86_64-unknown-linux-gnu # Different format (zip instead of tar.gz) nu scripts/provisioning/pack.nu --format zip # Verify bundle integrity nu scripts/provisioning/pack.nu --verify # Preview what would be packaged nu scripts/provisioning/pack.nu --dry-run ``` --- ## ๐Ÿ“‚ File Structure After Pack Bundle created in: `dist/` ``` dist/ โ”œโ”€โ”€ syntaxis-v0.1.0-aarch64-apple-darwin.tar.gz โ† User distributes this โ”œโ”€โ”€ syntaxis-v0.1.0-aarch64-apple-darwin.checksums.toml โ† Optional checksum file ``` When user extracts: ``` syntaxis-v0.1.0-aarch64-apple-darwin/ โ”œโ”€โ”€ README.md # From docs/BUNDLE_README.md โ”œโ”€โ”€ docs/installation.md # From docs/docs/installation.md โ”œโ”€โ”€ QUICK_START.md # From docs/QUICK_START.md โ”œโ”€โ”€ provision.sh # Master provisioner (recommended) โ”œโ”€โ”€ install.sh # Bash installer (optional) โ”œโ”€โ”€ setup-config.sh # Config helper โ””โ”€โ”€ docs/ โ”œโ”€โ”€ CONFIG.md # From docs/CONFIG.md โ”œโ”€โ”€ TROUBLESHOOTING.md # From docs/TROUBLESHOOTING.md โ””โ”€โ”€ PACK.md # From docs/PACK.md ``` --- ## ๐Ÿ’ก Pro Tips ### Tip 1: Check What's In Your Bundle ```bash # List all files in latest bundle tar -tzf dist/syntaxis-v0.1.0-*.tar.gz | head -30 # Extract and view specific doc tar -xzOf dist/syntaxis-v0.1.0-*.tar.gz \ 'syntaxis-v0.1.0-*/docs/installation.md' | head -20 ``` ### Tip 2: Verify Changes Made It In ```bash # Before and after comparison tar -tzf dist/syntaxis-v0.1.0-*.tar.gz | grep README.md ``` ### Tip 3: Update Multiple Docs at Once ```bash # Edit all bundle docs nano docs/BUNDLE_README.md nano docs/docs/installation.md nano docs/QUICK_START.md nano docs/CONFIG.md # One pack command includes all changes nu scripts/provisioning/pack.nu ``` ### Tip 4: Version Control ```bash # Track doc changes with git git add docs/docs/installation.md git commit -m "docs: update installation steps for new provision script" # Pack the new version nu scripts/provisioning/pack.nu # Users get latest with next bundle distribution ``` --- ## ๐Ÿงน Cleanup Old files removed (superseded by new ones): - ~~`docs/CONFIG_GUIDE.md`~~ โ†’ replaced by `docs/CONFIG.md` - ~~`docs/BUNDLE_docs/installation.md`~~ โ†’ replaced by `docs/docs/installation.md` **Development-only docs (NOT in bundle):** - `docs/ARCHITECTURE.md` - For developers - `docs/CLI_QUICK_REFERENCE.md` - For developers - `docs/SURREALDB_*.md` - Advanced/developer - `docs/PERSISTENCE_*.md` - Advanced/developer --- ## ๐Ÿš€ Example: Adding a New Guide **Scenario:** You want to add a "First Deployment" guide to bundles ```bash # 1. Create the new guide cat > docs/FIRST_DEPLOYMENT.md << 'EOF' # First Deployment Guide ...content here... EOF # 2. Add it to provisioning.toml # Edit: configs/provisioning.toml # In [artifacts] docs array, add: # "docs/FIRST_DEPLOYMENT.md", # 3. Rebuild bundle nu scripts/provisioning/pack.nu # 4. New bundle includes it automatically ``` --- ## ๐Ÿ“ž Quick Reference Card ``` LOCATION: docs/ CONFIG: configs/provisioning.toml [artifacts] docs = [...] BUILD: nu scripts/provisioning/pack.nu OUTPUT: dist/syntaxis-v0.1.0-*.tar.gz EDIT: nano docs/.md THEN: nu scripts/provisioning/pack.nu DONE: Bundle ready for distribution with latest docs ``` --- ## ๐Ÿ“– Related Documentation For more detailed information, see: - **`docs/BUNDLE_DOCS_REFERENCE.md`** - Comprehensive reference - **`docs/PACK.md`** - Provisioning system details - **`docs/docs/installation.md`** - Installation guide - **`configs/provisioning.toml`** - Bundle configuration --- **SYNTAXIS** v0.1.0 Bundle Documentation is user-focused, source-controlled, and automatically included in every pack. Simple workflow: Edit โ†’ Pack โ†’ Distribute โ†’ Users get latest docs.