Rome is a toolchain for the web: formatter, linter and more for JavaScript, TypeScript, JSON, HTML, Markdown, and CSS
—
Rome's daemon mode provides a persistent server process that significantly improves performance for repeated operations by avoiding startup costs and maintaining parsed state between commands.
Control Rome's background server process for improved performance.
/**
* Start the Rome daemon server process
*
* Usage: rome start
*
* Starts a background server process that other Rome commands can connect to
*/
rome start
/**
* Stop the Rome daemon server process
*
* Usage: rome stop
*
* Stops the running background server process
*/
rome stop
/**
* Language Server Protocol over stdin/stdout
*
* Usage: rome lsp-proxy
*
* Acts as a server for the Language Server Protocol, typically used by editors
*/
rome lsp-proxyConnect to the running daemon for faster command execution.
/**
* Connect to running daemon instance
*
* Add --use-server to any Rome command to use the daemon
*/
rome check src/ --use-server
rome format src/ --use-server
rome ci src/ --use-serverThe daemon eliminates the overhead of starting the Rust process for each command:
# Without daemon (cold start each time)
rome check src/ # ~200ms startup
rome format src/ # ~200ms startup
rome ci src/ # ~200ms startup
# With daemon (amortized startup cost)
rome start # ~200ms startup once
rome check src/ --use-server # ~20ms
rome format src/ --use-server # ~20ms
rome ci src/ --use-server # ~20msThe daemon maintains parsed state between operations:
# Start daemon
rome start
# Use daemon for commands (faster execution)
rome check src/ --use-server
rome format src/ --write --use-server
rome ci src/ --use-server
# Stop daemon when done
rome stop# Start daemon at beginning of work session
rome start
# Fast feedback during development
rome check src/components/Button.tsx --use-server
rome format src/components/Button.tsx --write --use-server
# Stop daemon at end of session
rome stop# Start daemon for build pipeline
rome start
# Run multiple checks efficiently
rome check src/ --use-server
rome format src/ --use-server
rome ci tests/ --use-server
# Daemon automatically stops when process ends# Commands will indicate if daemon is not running
rome check src/ --use-server
# Error: ServerNotRunning - start daemon with 'rome start'
# Check if daemon is running (implicit)
rome start # Will report if already running/**
* Print socket information (internal command)
*
* Usage: rome __print_socket
*
* Internal command that prints daemon socket information for debugging
*/
rome __print_socketRome provides LSP support through the daemon:
rome lsp-proxyThis enables:
{
"rome.lspBin": "rome",
"rome.requireConfiguration": true,
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"quickfix.rome": true
}
}require('lspconfig').rome.setup({
cmd = { 'rome', 'lsp-proxy' },
filetypes = { 'javascript', 'typescript', 'json' }
})/**
* Run server process (internal command)
*
* Usage: rome __run_server
*
* Internal command used by 'rome start' to run the actual server process
*/
rome __run_serverThe daemon process:
# Daemon not running
rome check src/ --use-server
# Error: ServerNotRunning
# Daemon connection failed
rome check src/ --use-server
# Falls back to direct execution
# Multiple daemon instances
rome start
# Reports if daemon already runningRecommended for:
Not necessary for:
The daemon maintains caches that use memory:
# Monitor daemon memory usage
ps aux | grep rome
# Restart daemon to clear caches if needed
rome stop
rome startThe daemon can watch for file changes:
# Daemon won't start
rome start
# Check if port/socket is already in use
# Commands hang with --use-server
# Daemon may be unresponsive, restart it:
rome stop
rome start
# Stale cache issues
# Restart daemon to clear all caches:
rome stop
rome start# Enable verbose output
rome start --verbose
# Check socket information
rome __print_socket
# Test daemon connectivity
rome check --version --use-server{
"scripts": {
"start-rome": "rome start",
"stop-rome": "rome stop",
"dev": "rome start && npm run dev:watch && rome stop",
"lint": "rome check src/ --use-server",
"format": "rome format src/ --write --use-server"
}
}#!/bin/sh
# pre-commit hook
rome start 2>/dev/null || true
rome check --staged --use-server || exit 1
rome format --staged --write --use-server || exit 1# Start daemon in container
RUN rome start
# Use daemon for build steps
RUN rome check src/ --use-server
RUN rome format src/ --use-server
# Daemon automatically stops when container exitsInstall with Tessl CLI
npx tessl i tessl/npm-rome