#image-content #markdown #site #manage #blog #command-line-tool #nuxt

app nuch

A CLI to manage Markdown content and images for Nuxt Content sites

10 stable releases

Uses new Rust 2024

1.3.6 Dec 27, 2025
1.3.0 Dec 26, 2025
1.2.1 Dec 26, 2025
1.1.1 Dec 24, 2025
1.0.2 Dec 21, 2025

#178 in Text processing

MIT license

170KB
857 lines

NUCH (NUxt Content Handler)

A small CLI to help manage Markdown content and associated images for Nuxt Content sites.

Supports all file types handled by Nuxt Content (Markdown, YAML, JSON, CSV).

NUCH Icon

Static Badge

Crates.io Version

GitHub deployments

Quick start

You can install via homebrew:

brew install rivethorn/tap/nuch

You can also install via cargo:

cargo install nuch

or you can install prebuilt binaries via shell script:

Unix/Linux/macOS:

curl --proto '=https' --tlsv1.2 -LsSf https://github.com/rivethorn/nuch/releases/download/v1.3.5/nuch-installer.sh | sh

Windows (PowerShell):

powershell -ExecutionPolicy Bypass -c "irm https://github.com/rivethorn/nuch/releases/download/v1.3.5/nuch-installer.ps1 | iex"

You can also download the binary from Releases

Build from source

  • Requirements: Rust toolchain (cargo), and system git on PATH.

  • Build and run:

# Build
cargo build --release

# Run (shows help)
cargo run -- --help

# Create a sample config
# Unix/Linux/macOS: writes to XDG_CONFIG_HOME/nuch/config.toml or ~/.config/nuch/config.toml
# Windows: writes to %LOCALAPPDATA%\nuch\config.toml (typically C:\Users\<username>\AppData\Local\nuch\config.toml)
cargo run -- --config

Typical usage:

# Publish (interactive): selects a supported file from your configured working dir
nuch publish

# Delete (interactive): select a published post to remove
nuch delete

[!WARNING] The tool requires a valid config file:

  • Unix/Linux/macOS: XDG_CONFIG_HOME/nuch/config.toml or ~/.config/nuch/config.toml
  • Windows: %LOCALAPPDATA%\nuch\config.toml (typically C:\Users\<username>\AppData\Local\nuch\config.toml)

Use --config to generate a sample.

Config file (TOML)

The config describes your working and publishing directories and optional image directories. Example sample written by --config:

[working]
files = "Documents/writings"
images = "Documents/writings/images"

[[collection]]
name = "writing"
files = "your-site/content"
images = "your-site/public/images"

[[collection]]
name = "blogs"
files = "your-site/content/blogs"
# images omitted — optional
  • working files (required): directory containing your drafts/ready-for-publish supported files.
  • working images (optional): directory holding images referenced by your working Content file.
  • collection name (required): unique name for the collection (e.g., "content", "writing").
  • collection files (required): your predefined collection directory, usually inside content directory (where published files should be copied).
  • collection images (optional): directory under the site where images are stored.

The tool validates that working and collection exist, and that working contains at least one file that's supported by Nuxt Content.

Development notes

  • Main modules:

    • src/config.rs — config parsing and validation
    • src/fs.rs — filesystem helpers (copy, backup, image matching)
    • src/publish.rs — publish/delete flows (interactive); includes test-only non-interactive helpers
    • src/git.rs — git wrapper helpers
    • src/ui.rs — user prompts & listing
  • Code style: Rust 2024 edition, uses clap for CLI and inquire for interactive prompts.

Contributing

Open a PR or issue for bug fixes or feature ideas. Add tests for any changes that touch behavior.

Dependencies

~6–12MB
~251K SLoC