Page Sync

Pull and push pages as local markdown files.

Sync your LumifyHub pages to your local machine as markdown files. Edit in your favorite text editor, then push changes back.

Overview

When you run lh pull, pages are saved as markdown files with YAML frontmatter:

~/.lumifyhub/pages/{workspace}/{page-slug}.md

Commands

Pull Pages

Download pages from LumifyHub to your local machine.

# Pull all pages from all workspaces
lh pull

# Pull from a specific workspace
lh pull -w my-workspace

# Force overwrite local changes
lh pull --force

Push Changes

Upload local changes back to LumifyHub.

# Push all modified pages
lh push

# Push from a specific workspace
lh push -w my-workspace

Check Status

See which pages have local modifications.

lh status

Search Pages

Search through your local pages.

lh search "keyword"
lh search "meeting notes" -w work

File Format

Each page is saved as a markdown file with YAML frontmatter:

---
id: "page-abc123"
title: "Meeting Notes"
workspace_id: "ws-456"
workspace_slug: "my-workspace"
slug: "meeting-notes-abc123"
updated_at: "2025-01-30T10:00:00Z"
local_hash: "a1b2c3d4"
remote_hash: "a1b2c3d4"
---

# Meeting Notes

## Attendees
- Alice
- Bob

## Action Items
- [ ] Follow up with client
- [ ] Send proposal

Creating New Pages

Quick Add

Capture a quick note:

lh add "Remember to call back tomorrow"

Create with Title

Create a page with a specific title:

lh new "Project Proposal"

Create with Content

Include initial content:

lh new "Meeting Notes" -c "# Attendees\n\n- Alice\n- Bob"

Import from File

Create a page from an existing file:

lh new "Documentation" --from-file ./README.md

Import from Clipboard

Create a page from clipboard contents:

lh new "Pasted Content" --from-clipboard

Editing Pages

  1. Open the markdown file in any editor (VS Code, Vim, etc.)
  2. Edit the content (below the frontmatter)
  3. Save the file
  4. Run lh push

Note: Don't modify the frontmatter fields like id or workspace_id - these are used for syncing.

Conflict Handling

If you have local changes and try to pull:

$ lh pull
  Conflict: my-workspace/meeting-notes
    Use --force to overwrite local changes

Options:

  1. Push your changes first: lh push
  2. Discard local changes: lh pull --force

Tips

Use Your Favorite Editor

Since pages are just markdown files, use whatever editor you prefer:

  • VS Code with markdown preview
  • Obsidian for linked notes
  • Vim for quick edits

Batch Operations

Edit multiple files at once using standard Unix tools:

# Find all pages mentioning "TODO"
grep -r "TODO" ~/.lumifyhub/pages/

# Replace text across all pages
sed -i 's/old text/new text/g' ~/.lumifyhub/pages/**/*.md

Sync Across Machines

The pages directory is a git repo. You can push it to GitHub for cross-machine sync:

cd ~/.lumifyhub/pages
git remote add origin [email protected]:you/lumifyhub-pages.git
git push -u origin main