Back to Rome

CLI

website/src/pages/cli.md

0.4.222.5 KB
Original Source

Command summary

rome

Rome official CLI. Use it to check the health of your project or run it to check single files.

Usage: rome COMMAND ...

Available options:

  • -h, --help — Prints help information
  • -V, --version — Prints version information

Available commands:

  • version — Shows the Rome version information and quit
  • rage — Prints information for debugging
  • start — Start the Rome daemon server process
  • stop — Stop the Rome daemon server process
  • check — Run various checks on a set of files.
  • lint — Run various checks on a set of files.
  • format — Run the formatter on a set of files.
  • ci — Command to use in CI environments. Run various checks of a set of files.
  • init — Bootstraps a new rome project. Creates a configuration file with some defaults.
  • lsp-proxy — Acts as a server for the Language Server Protocol over stdin/stdout
  • migrate — It updates the configuration when there are breaking changes

rome version

Shows the Rome version information and quit

Usage: rome version

Global options applied to all commands

  • --colors=<off|force> — Set the formatting mode for markup: "off" prints everything as plain text, "force" forces the formatting of markup using ANSI even if the console output is determined to be incompatible
  • --use-server — Connect to a running instance of the Rome daemon server.
  • --verbose — Print additional verbose advices on diagnostics
  • --config-path=PATH — Set the filesystem path to the directory of the rome.json configuration file
  • --max-diagnostics=NUMBER — Cap the amount of diagnostics displayed (default: 20)
  • --skip-errors — Skip over files containing syntax errors instead of emitting an error diagnostic.
  • --no-errors-on-unmatched — Silence errors that would be emitted in case no files were processed during the execution of the command.
  • --json — Reports information using the JSON format

Available options:

  • -h, --help — Prints help information

rome rage

Prints information for debugging

Usage: rome rage

Global options applied to all commands

  • --colors=<off|force> — Set the formatting mode for markup: "off" prints everything as plain text, "force" forces the formatting of markup using ANSI even if the console output is determined to be incompatible
  • --use-server — Connect to a running instance of the Rome daemon server.
  • --verbose — Print additional verbose advices on diagnostics
  • --config-path=PATH — Set the filesystem path to the directory of the rome.json configuration file
  • --max-diagnostics=NUMBER — Cap the amount of diagnostics displayed (default: 20)
  • --skip-errors — Skip over files containing syntax errors instead of emitting an error diagnostic.
  • --no-errors-on-unmatched — Silence errors that would be emitted in case no files were processed during the execution of the command.
  • --json — Reports information using the JSON format

Available options:

  • -h, --help — Prints help information

rome start

Start the Rome daemon server process

Usage: rome start

Available options:

  • -h, --help — Prints help information

rome stop

Stop the Rome daemon server process

Usage: rome stop

Available options:

  • -h, --help — Prints help information

rome check

Run various checks on a set of files.

Usage: rome check [--apply] [--apply-unsafe] [PATH]...

The configuration that is contained inside the file rome.json

  • --vcs-client-kind=<git> — The kind of client.

  • --vcs-enabled=<true|false> — Whether Rome should integrate itself with the VCS client

  • --vcs-use-ignore-file=<true|false> — Whether Rome should use the VCS ignore file. When [true], Rome will ignore the files specified in the ignore file.

  • --vcs-root=PATH — The folder where Rome should check for VCS files. By default, Rome will use the same folder where rome.json was found.

    If Rome can't find the configuration, it will attempt to use the current working directory. If no current working directory can't be found, Rome won't use the VCS integration, and a diagnostic will be emitted

  • --files-max-size=NUMBER — The maximum allowed size for source code files in bytes. Files above this limit will be ignored for performance reason. Defaults to 1 MiB

  • --files-ignore-unknown=<true|false> — Tells Rome to not emit diagnostics when handling files that doesn't know

  • --indent-style=<tab|space> — The indent style.

    shell rome format --indent-style=tab

  • --indent-size=NUMBER — The size of the indentation, 2 by default

  • --line-width=NUMBER — What's the max width of a line. Defaults to 80.

  • --quote-style=<double|single> — The style for quotes. Defaults to double.

  • --jsx-quote-style=<double|single> — The style for JSX quotes. Defaults to double.

  • --quote-properties=<preserve|as-needed> — When properties in objects are quoted. Defaults to asNeeded.

  • --trailing-comma=<all|es5|none> — Print trailing commas wherever possible in multi-line comma-separated syntactic structures. Defaults to "all".

  • --semicolons=<always|as-needed> — Whether the formatter prints semicolons for all statements or only in for statements where it is necessary because of ASI.

Global options applied to all commands

  • --colors=<off|force> — Set the formatting mode for markup: "off" prints everything as plain text, "force" forces the formatting of markup using ANSI even if the console output is determined to be incompatible
  • --use-server — Connect to a running instance of the Rome daemon server.
  • --verbose — Print additional verbose advices on diagnostics
  • --config-path=PATH — Set the filesystem path to the directory of the rome.json configuration file
  • --max-diagnostics=NUMBER — Cap the amount of diagnostics displayed (default: 20)
  • --skip-errors — Skip over files containing syntax errors instead of emitting an error diagnostic.
  • --no-errors-on-unmatched — Silence errors that would be emitted in case no files were processed during the execution of the command.
  • --json — Reports information using the JSON format

Available positional items:

  • PATH — Single file, single path or list of paths

Available options:

  • --apply — Apply safe fixes, formatting
  • --apply-unsafe — Apply safe fixes and unsafe fixes, formatting and import sorting
  • --formatter-enabled=<true|false> — Allow to enable or disable the formatter check.
  • --linter-enabled=<true|false> — Allow to enable or disable the linter check.
  • --organize-imports-enabled=<true|false> — Allow to enable or disable the organize imports.
  • --stdin-file-path=PATH — A file name with its extension to pass when reading from standard in, e.g. echo 'let a;' | rome check --stdin-file-path=file.js"
  • -h, --help — Prints help information

rome lint

Run various checks on a set of files.

Usage: rome lint [--apply] [--apply-unsafe] [PATH]...

The configuration that is contained inside the file rome.json

  • --vcs-client-kind=<git> — The kind of client.

  • --vcs-enabled=<true|false> — Whether Rome should integrate itself with the VCS client

  • --vcs-use-ignore-file=<true|false> — Whether Rome should use the VCS ignore file. When [true], Rome will ignore the files specified in the ignore file.

  • --vcs-root=PATH — The folder where Rome should check for VCS files. By default, Rome will use the same folder where rome.json was found.

    If Rome can't find the configuration, it will attempt to use the current working directory. If no current working directory can't be found, Rome won't use the VCS integration, and a diagnostic will be emitted

  • --files-max-size=NUMBER — The maximum allowed size for source code files in bytes. Files above this limit will be ignored for performance reason. Defaults to 1 MiB

  • --files-ignore-unknown=<true|false> — Tells Rome to not emit diagnostics when handling files that doesn't know

  • --indent-style=<tab|space> — The indent style.

    shell rome format --indent-style=tab

  • --indent-size=NUMBER — The size of the indentation, 2 by default

  • --line-width=NUMBER — What's the max width of a line. Defaults to 80.

  • --quote-style=<double|single> — The style for quotes. Defaults to double.

  • --jsx-quote-style=<double|single> — The style for JSX quotes. Defaults to double.

  • --quote-properties=<preserve|as-needed> — When properties in objects are quoted. Defaults to asNeeded.

  • --trailing-comma=<all|es5|none> — Print trailing commas wherever possible in multi-line comma-separated syntactic structures. Defaults to "all".

  • --semicolons=<always|as-needed> — Whether the formatter prints semicolons for all statements or only in for statements where it is necessary because of ASI.

Global options applied to all commands

  • --colors=<off|force> — Set the formatting mode for markup: "off" prints everything as plain text, "force" forces the formatting of markup using ANSI even if the console output is determined to be incompatible
  • --use-server — Connect to a running instance of the Rome daemon server.
  • --verbose — Print additional verbose advices on diagnostics
  • --config-path=PATH — Set the filesystem path to the directory of the rome.json configuration file
  • --max-diagnostics=NUMBER — Cap the amount of diagnostics displayed (default: 20)
  • --skip-errors — Skip over files containing syntax errors instead of emitting an error diagnostic.
  • --no-errors-on-unmatched — Silence errors that would be emitted in case no files were processed during the execution of the command.
  • --json — Reports information using the JSON format

Available positional items:

  • PATH — Single file, single path or list of paths

Available options:

  • --apply — Apply safe fixes, formatting
  • --apply-unsafe — Apply safe fixes and unsafe fixes, formatting and import sorting
  • --stdin-file-path=PATH — A file name with its extension to pass when reading from standard in, e.g. echo 'let a;' | rome lint --stdin-file-path=file.js"
  • -h, --help — Prints help information

rome format

Run the formatter on a set of files.

Usage: rome format [--write] [PATH]...

Options applied to the formatter

  • --indent-style=<tab|space> — The indent style.

    shell rome format --indent-style=tab

  • --indent-size=NUMBER — The size of the indentation, 2 by default

  • --line-width=NUMBER — What's the max width of a line. Defaults to 80.

Set of properties to integrate Rome with a VCS software.

  • --vcs-client-kind=<git> — The kind of client.

  • --vcs-enabled=<true|false> — Whether Rome should integrate itself with the VCS client

  • --vcs-use-ignore-file=<true|false> — Whether Rome should use the VCS ignore file. When [true], Rome will ignore the files specified in the ignore file.

  • --vcs-root=PATH — The folder where Rome should check for VCS files. By default, Rome will use the same folder where rome.json was found.

    If Rome can't find the configuration, it will attempt to use the current working directory. If no current working directory can't be found, Rome won't use the VCS integration, and a diagnostic will be emitted

The configuration of the filesystem

  • --files-max-size=NUMBER — The maximum allowed size for source code files in bytes. Files above this limit will be ignored for performance reason. Defaults to 1 MiB
  • --files-ignore-unknown=<true|false> — Tells Rome to not emit diagnostics when handling files that doesn't know

Global options applied to all commands

  • --colors=<off|force> — Set the formatting mode for markup: "off" prints everything as plain text, "force" forces the formatting of markup using ANSI even if the console output is determined to be incompatible
  • --use-server — Connect to a running instance of the Rome daemon server.
  • --verbose — Print additional verbose advices on diagnostics
  • --config-path=PATH — Set the filesystem path to the directory of the rome.json configuration file
  • --max-diagnostics=NUMBER — Cap the amount of diagnostics displayed (default: 20)
  • --skip-errors — Skip over files containing syntax errors instead of emitting an error diagnostic.
  • --no-errors-on-unmatched — Silence errors that would be emitted in case no files were processed during the execution of the command.
  • --json — Reports information using the JSON format

Available positional items:

  • PATH — Single file, single path or list of paths.

Available options:

  • --quote-style=<double|single> — The style for quotes. Defaults to double.
  • --jsx-quote-style=<double|single> — The style for JSX quotes. Defaults to double.
  • --quote-properties=<preserve|as-needed> — When properties in objects are quoted. Defaults to asNeeded.
  • --trailing-comma=<all|es5|none> — Print trailing commas wherever possible in multi-line comma-separated syntactic structures. Defaults to "all".
  • --semicolons=<always|as-needed> — Whether the formatter prints semicolons for all statements or only in for statements where it is necessary because of ASI.
  • --stdin-file-path=PATH — A file name with its extension to pass when reading from standard in, e.g. echo 'let a;' | rome format --stdin-file-path=file.js".
  • --write — Writes formatted files to file system.
  • -h, --help — Prints help information

rome ci

Command to use in CI environments. Run various checks of a set of files.

Usage: rome ci [--formatter-enabled=<true|false>] [--linter-enabled=<true|false>] [--organize-imports-enabled=<true|false>] [PATH]...

The configuration that is contained inside the file rome.json

  • --vcs-client-kind=<git> — The kind of client.

  • --vcs-enabled=<true|false> — Whether Rome should integrate itself with the VCS client

  • --vcs-use-ignore-file=<true|false> — Whether Rome should use the VCS ignore file. When [true], Rome will ignore the files specified in the ignore file.

  • --vcs-root=PATH — The folder where Rome should check for VCS files. By default, Rome will use the same folder where rome.json was found.

    If Rome can't find the configuration, it will attempt to use the current working directory. If no current working directory can't be found, Rome won't use the VCS integration, and a diagnostic will be emitted

  • --files-max-size=NUMBER — The maximum allowed size for source code files in bytes. Files above this limit will be ignored for performance reason. Defaults to 1 MiB

  • --files-ignore-unknown=<true|false> — Tells Rome to not emit diagnostics when handling files that doesn't know

  • --indent-style=<tab|space> — The indent style.

    shell rome format --indent-style=tab

  • --indent-size=NUMBER — The size of the indentation, 2 by default

  • --line-width=NUMBER — What's the max width of a line. Defaults to 80.

  • --quote-style=<double|single> — The style for quotes. Defaults to double.

  • --jsx-quote-style=<double|single> — The style for JSX quotes. Defaults to double.

  • --quote-properties=<preserve|as-needed> — When properties in objects are quoted. Defaults to asNeeded.

  • --trailing-comma=<all|es5|none> — Print trailing commas wherever possible in multi-line comma-separated syntactic structures. Defaults to "all".

  • --semicolons=<always|as-needed> — Whether the formatter prints semicolons for all statements or only in for statements where it is necessary because of ASI.

Global options applied to all commands

  • --colors=<off|force> — Set the formatting mode for markup: "off" prints everything as plain text, "force" forces the formatting of markup using ANSI even if the console output is determined to be incompatible
  • --use-server — Connect to a running instance of the Rome daemon server.
  • --verbose — Print additional verbose advices on diagnostics
  • --config-path=PATH — Set the filesystem path to the directory of the rome.json configuration file
  • --max-diagnostics=NUMBER — Cap the amount of diagnostics displayed (default: 20)
  • --skip-errors — Skip over files containing syntax errors instead of emitting an error diagnostic.
  • --no-errors-on-unmatched — Silence errors that would be emitted in case no files were processed during the execution of the command.
  • --json — Reports information using the JSON format

Available positional items:

  • PATH — Single file, single path or list of paths

Available options:

  • --formatter-enabled=<true|false> — Allow to enable or disable the formatter check.
  • --linter-enabled=<true|false> — Allow to enable or disable the linter check.
  • --organize-imports-enabled=<true|false> — Allow to enable or disable the organize imports.
  • -h, --help — Prints help information

rome init

Bootstraps a new rome project. Creates a configuration file with some defaults.

Usage: rome init

Available options:

  • -h, --help — Prints help information

rome lsp-proxy

Acts as a server for the Language Server Protocol over stdin/stdout

Usage: rome lsp-proxy [--colors=<off|force>] [--use-server] [--verbose] [--config-path=PATH] [--max-diagnostics=NUMBER] [--skip-errors] [--no-errors-on-unmatched]

Global options applied to all commands

  • --colors=<off|force> — Set the formatting mode for markup: "off" prints everything as plain text, "force" forces the formatting of markup using ANSI even if the console output is determined to be incompatible
  • --use-server — Connect to a running instance of the Rome daemon server.
  • --verbose — Print additional verbose advices on diagnostics
  • --config-path=PATH — Set the filesystem path to the directory of the rome.json configuration file
  • --max-diagnostics=NUMBER — Cap the amount of diagnostics displayed (default: 20)
  • --skip-errors — Skip over files containing syntax errors instead of emitting an error diagnostic.
  • --no-errors-on-unmatched — Silence errors that would be emitted in case no files were processed during the execution of the command.
  • --json — Reports information using the JSON format

Available options:

  • -h, --help — Prints help information

rome migrate

It updates the configuration when there are breaking changes

Usage: rome migrate [--write]

Global options applied to all commands

  • --colors=<off|force> — Set the formatting mode for markup: "off" prints everything as plain text, "force" forces the formatting of markup using ANSI even if the console output is determined to be incompatible
  • --use-server — Connect to a running instance of the Rome daemon server.
  • --verbose — Print additional verbose advices on diagnostics
  • --config-path=PATH — Set the filesystem path to the directory of the rome.json configuration file
  • --max-diagnostics=NUMBER — Cap the amount of diagnostics displayed (default: 20)
  • --skip-errors — Skip over files containing syntax errors instead of emitting an error diagnostic.
  • --no-errors-on-unmatched — Silence errors that would be emitted in case no files were processed during the execution of the command.
  • --json — Reports information using the JSON format

Available options:

  • --write — Writes the new configuration file to disk
  • -h, --help — Prints help information