Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Getting Started

This guide walks you through installing typub and publishing your first content.

Requirements

  • Rust 1.85+ (edition 2024)
  • Typst (for document compilation)

Installation

cargo install typub

Initialize a Content Project

typub init

This creates the default configuration:

.
├── typub.toml           # typub configuration
├── .typub/               # Status tracking database
└── posts/                # Your content directory

Create Your First Post

Create a Typst document:

// posts/hello-world/content.typ
= Hello World

This is my first post published with typub!

And the metadata file:

# posts/hello-world/meta.toml
title = "Hello World"
created = 2026-02-12
tags = ["tutorial", "typub"]

Configure a Platform

Edit typub.toml to enable a platform:

[platforms.devto]
enabled = true
# API key from environment: DEVTO_API_KEY

Set your API key:

export DEVTO_API_KEY="your-api-key-here"

Publish

# Publish to Dev.to
typub publish posts/hello-world -p devto

# Or publish to all enabled platforms
typub publish posts/hello-world

Development Mode

For local development with live reload:

# Start dev server with live reload
typub dev posts/hello-world -p xiaohongshu

# Or specify a custom port
typub dev posts/hello-world -p xiaohongshu --port 3000

Interactive Dashboard (TUI)

typub provides an interactive terminal dashboard for content management:

# Launch TUI dashboard
typub tui

The TUI provides three main views:

Post List

  • Browse all your posts with publishing status indicators
  • Sort posts by date, title, or modification time (press s)
  • Press Enter to view post details

Post Detail

  • View post metadata and publishing status for each platform
  • Use ↑/↓ to select a platform
  • Press p to preview the selected platform’s rendering
  • Press P to publish to the selected platform
  • Press A to publish to all enabled platforms

Preview

  • View platform-specific preview in plain text
  • Press o to open full HTML preview in browser
  • Scroll with ↑/↓ or PageUp/PageDown

Keyboard Shortcuts:

  • q - Go back or quit
  • r - Reload post list
  • Ctrl+C - Force quit

Check Status

# See what's been published where
typub status posts/hello-world

Next Steps

Basic path

Advanced path