Quartz Syncer supports the Obsidian CLI for automating publishing workflows from the terminal. This requires Obsidian v1.12 or later, and Obsidian must be running for CLI commands to work.
Obsidian must be running
The Obsidian CLI is a remote control for the desktop app — it does not run headless. Obsidian will launch automatically if it is not already running when you execute a CLI command.
Required. Confirms the upgrade. Without force, the command returns an error.
dry-run
Check for available updates without applying them.
format
Output format: json or text (default).
Merge conflicts
If the upgrade encounters merge conflicts (other than quartz.lock.json, which is auto-resolved), the command will fail and list the conflicting files. Resolve them manually in your repository.
quartz-syncer:version
Show plugin, Obsidian, and Quartz version information.
Dot-notation config key (e.g., pageTitle, theme.typography.header, theme.colors.lightMode.secondary). Required for get and set.
value
New value. Required for set.
format
Output format: json or text (default).
Values are validated against the Quartz v5 schema. Boolean keys (enableSPA, enablePopovers, theme.cdnCaching) accept true or false. The theme.fontOrigin key only accepts googleFonts or local.
Note: ignorePatterns and analytics cannot be set via CLI due to their complex structure. Use the plugin settings UI for these.
Flags
Global flags (all commands)
format=json — Returns structured JSON output, useful for scripts and CI pipelines.
format=text — Returns human-readable text (default).
help (or h) — Show command-specific help and available flags.
Command-specific flags
dry-run — Preview what would happen without making changes. Supported by sync, publish, delete, mark, and upgrade.
force — Required for destructive operations. Supported by sync (delete phase), delete, upgrade, and plugin (remove/update).
Long-running commands include timing information in the output (e.g., Published 47 files. (23.4s)).
Example workflows
Basic publish
# Check what needs publishingobsidian quartz-syncer:status# Publish all pending notesobsidian quartz-syncer:publish
Full sync with deletions
# Preview all changesobsidian quartz-syncer:sync dry-run# Apply all changes including deletionsobsidian quartz-syncer:sync force
Batch mark and publish
# Mark all notes in a folder for publishingobsidian quartz-syncer:mark path="blog/**/*.md" value=true# Publish themobsidian quartz-syncer:publish
CI/CD Integration
# Use JSON output for scriptingSTATUS=$(obsidian quartz-syncer:status format=json)# Sync and capture resultRESULT=$(obsidian quartz-syncer:sync force format=json)