Commands
Reference of xbsl commands and options: checking sources, the LSP and MCP servers, the web panel, code templates.
This reference is generated from the tool itself – the same text xbsl --help prints, gathered on one page.
With no command xbsl checks the paths you give it: that is the default mode and its options are in the first block. The other commands address the rest of the toolkit.
The output language follows --lang, the XBSL_LANG variable, or the system locale.
No command: checking sources
Linter for 1C:Element sources (.yaml/.xbsl pairs).
usage: xbsl [paths] [options] (no command: check the sources)
xbsl <command> [options]
Arguments
| Option | Description |
|---|---|
paths |
files or directories to check |
Options
| Option | Description |
|---|---|
-h, --help |
show this help message and exit |
--select ID/GROUP/TIER |
check only these rules (comma-separated or by repeating the flag: id, group – the part of the id before ‘/’ (e.g. style) – or a tier letter A/B/C/D) |
--ignore ID/GROUP/TIER |
exclude these rules (comma-separated or by repeating the flag: id, group or tier letter) |
--enable ID/GROUP/TIER |
add rules disabled by default ON TOP of the standard set (--select replaces the set); the value forms are the same |
--baseline FILE |
suppress findings frozen in a baseline file (created by --write-baseline); new findings are reported as usual |
--write-baseline FILE |
instead of a report, write all current findings to a baseline file (freeze the debt; paths in the file are relative to its directory) |
--fix |
fix mechanical findings in place (trailing spaces, typographic characters, line endings) and report the rest; only unambiguous fixes |
--jobs N |
processes for file-scope rules: 0 – auto (kicks in on large runs), 1 – sequential, N – an explicit worker count |
--list-rules |
print the list of rules and exit |
--where |
show the Element data root (path, source, versions) and exit |
--element-version VERSION |
Element data version (default: the latest in the bundle) |
--data-dir DIR |
Element data root (a directory with index.json); also env XBSL_DATA_DIR |
--lang {ru,en} |
linter output language (default: env XBSL_LANG / system locale / ru) |
--format {text,json,codeclimate} |
output format: text (default), json (machine-readable: diagnostics + summary) or codeclimate (a GitLab Code Quality report – the merge request widget) |
--stdin |
check a single buffer from stdin (for editor integration); --filename sets the file kind and the reported path |
--index |
instead of checking, print a JSON project index (objects, methods, form components) for editor navigation; the path is the project root |
--filename NAME |
name of the buffer checked with --stdin (e.g. Форма.xbsl); the extension sets the file kind |
--version |
show program’s version number and exit |
Commands
| Command | Description |
|---|---|
lint <paths> |
check the sources – the same as with no command |
lsp |
LSP server for the editor |
mcp |
MCP server for the agent |
web |
web panel |
templates |
code templates: list, export, import, save |
self-update |
update xbsl by unpacking the wheel from PyPI |
Command options: xbsl <command> --help. The options above apply to the check mode.
xbsl lsp
The xbsl LSP server (stdio)
usage: xbsl-lsp [-h] [--project-root PROJECT_ROOT] [--select SELECT] [--ignore IGNORE]
[--enable ENABLE] [--baseline BASELINE] [--templates TEMPLATES]
[--data-dir DATA_DIR] [--lang {ru,en}]
Options
| Option | Description |
|---|---|
-h, --help |
show this help message and exit |
--project-root PROJECT_ROOT |
the source root (absolute or relative to the workspace folder) |
--select SELECT |
these rules only (comma-separated) |
--ignore IGNORE |
exclude these rules (comma-separated) |
--enable ENABLE |
enable rules on top of the default set |
--baseline BASELINE |
the baseline file (absolute or relative to the workspace folder) – the findings frozen there are suppressed; a missing file is not an error, it appears with the first exclusion |
--templates TEMPLATES |
the code templates file (absolute or relative to the workspace folder) – it extends the builtin set and replaces templates of the same name |
--data-dir DATA_DIR |
the Element data root (the folder with index.json) |
--lang {ru,en} |
the language of the diagnostics text |
xbsl mcp
The xbsl MCP server (stdio): linting, the Element documentation and metadata scaffolding as agent tools.
usage: xbsl-mcp [-h]
Options
| Option | Description |
|---|---|
-h, --help |
show this help message and exit |
No flags: the server starts without parameters and talks over stdio.
The diagnostics language follows XBSL_LANG (then the system locale, then ru).
Registration in Claude Code: claude mcp add xbsl – xbsl-mcp
xbsl web
The XBSL linter web interface
usage: xbsl-web [-h] [--host HOST] [--port PORT]
Options
| Option | Description |
|---|---|
-h, --help |
show this help message and exit |
--host HOST |
the address (default 127.0.0.1) |
--port PORT |
the port (default 8771) |
xbsl templates
code templates: the builtin set and the user’s file (EDT export format)
usage: xbsl templates [-h] {list,export,import,save} ...
Arguments
| Option | Description |
|---|---|
list |
list templates (builtin and user) |
export |
export templates to an EDT-format file |
import |
merge an export into the user’s templates file |
save |
replace the user’s templates file (a JSON envelope from stdin) |
Options
| Option | Description |
|---|---|
-h, --help |
show this help message and exit |
xbsl templates list
usage: xbsl templates list [-h] [--format {text,json}] [--file FILE]
Options
| Option | Description |
|---|---|
-h, --help |
show this help message and exit |
--format {text,json} |
|
--file FILE |
the user’s templates file (default .xbsl-templates.json); it extends the builtin set and overrides same-named templates |
xbsl templates export
usage: xbsl templates export [-h] --output OUTPUT [--custom-only] [--file FILE]
Options
| Option | Description |
|---|---|
-h, --help |
show this help message and exit |
--output OUTPUT |
where to write the export |
--custom-only |
user templates only, without the builtin ones |
--file FILE |
the user’s templates file (default .xbsl-templates.json); it extends the builtin set and overrides same-named templates |
xbsl templates import
usage: xbsl templates import [-h] [--file FILE] source
Arguments
| Option | Description |
|---|---|
source |
an export (ours or from 1C:EDT) |
Options
| Option | Description |
|---|---|
-h, --help |
show this help message and exit |
--file FILE |
the user’s templates file (default .xbsl-templates.json); it extends the builtin set and overrides same-named templates |
xbsl templates save
usage: xbsl templates save [-h] [--file FILE]
Options
| Option | Description |
|---|---|
-h, --help |
show this help message and exit |
--file FILE |
the user’s templates file (default .xbsl-templates.json); it extends the builtin set and overrides same-named templates |
xbsl self-update
update xbsl by unpacking the wheel from PyPI
usage: xbsl self-update [-h] [--version VERSION]
Options
| Option | Description |
|---|---|
-h, --help |
show this help message and exit |
--version VERSION |
target version (default: the latest from PyPI) |
Metadata scaffolding
These commands create and edit sources: objects, fields, routes, methods, forms, subsystems. Each prints its result as JSON and lints what it wrote; --dry-run computes the changes without touching the files.
xbsl new-project
usage: xbsl new-project [-h] [--representation REPRESENTATION] [--version VERSION]
[--compatibility COMPATIBILITY] [--subsystem SUBSYSTEM] [--library]
[--dry-run]
root vendor name
Arguments
| Option | Description |
|---|---|
root |
|
vendor |
|
name |
Options
| Option | Description |
|---|---|
-h, --help |
show this help message and exit |
--representation REPRESENTATION |
|
--version VERSION |
|
--compatibility COMPATIBILITY |
|
--subsystem SUBSYSTEM |
|
--library |
|
--dry-run |
show the changes (with file texts) without writing anything |
xbsl new-object
usage: xbsl new-object [-h] [--scope SCOPE] [--environment ENVIRONMENT] [--access ACCESS]
[--routes ROUTES] [--report REPORT] [--dry-run]
directory kind name
Arguments
| Option | Description |
|---|---|
directory |
|
kind |
|
name |
Options
| Option | Description |
|---|---|
-h, --help |
show this help message and exit |
--scope SCOPE |
|
--environment ENVIRONMENT |
|
--access ACCESS |
|
--routes ROUTES |
HttpСервис routes: “GET /, POST /, GET /{id}” |
--report REPORT |
report description (JSON: source, rows, columns, measures) |
--dry-run |
show the changes (with file texts) without writing anything |
xbsl add-field
usage: xbsl add-field [-h] [--type TYPE] [--tabular TABULAR] [--dry-run] yaml_path field_kind name
Arguments
| Option | Description |
|---|---|
yaml_path |
|
field_kind |
реквизит, измерение, ресурс, значение, параметр, поле, табличная-часть |
name |
Options
| Option | Description |
|---|---|
-h, --help |
show this help message and exit |
--type TYPE |
|
--tabular TABULAR |
tabular section name (the attribute is added into it) |
--dry-run |
show the changes (with file texts) without writing anything |
xbsl add-route
usage: xbsl add-route [-h] [--dry-run] yaml_path routes
Arguments
| Option | Description |
|---|---|
yaml_path |
|
routes |
Options
| Option | Description |
|---|---|
-h, --help |
show this help message and exit |
--dry-run |
show the changes (with file texts) without writing anything |
xbsl add-method
usage: xbsl add-method [-h] [--params PARAMS] [--returns RETURNS] [--annotations ANNOTATIONS]
[--after AFTER] [--before BEFORE] [--body BODY] [--dry-run]
module_path name
Arguments
| Option | Description |
|---|---|
module_path |
|
name |
Options
| Option | Description |
|---|---|
-h, --help |
show this help message and exit |
--params PARAMS |
parameter list as in the signature |
--returns RETURNS |
return value type |
--annotations ANNOTATIONS |
annotations separated by spaces, e.g. ‘НаСервере ВПроекте’ |
--after AFTER |
insert after this method |
--before BEFORE |
insert before this method |
--body BODY |
a one-line body instead of the // TODO stub |
--dry-run |
show the changes (with file texts) without writing anything |
xbsl add-form
usage: xbsl add-form [-h] [--name NAME] [--path PATH] [--forms FORMS]
[--card-min-width CARD_MIN_WIDTH] [--card-placeholder CARD_PLACEHOLDER]
[--overwrite] [--dry-run]
root
Arguments
| Option | Description |
|---|---|
root |
Options
| Option | Description |
|---|---|
-h, --help |
show this help message and exit |
--name NAME |
|
--path PATH |
the object’s yaml (instead of --name) |
--forms FORMS |
a subset object,list,list-cards,report comma-separated (list-cards – a card list, instead of list) |
--card-min-width CARD_MIN_WIDTH |
card grid column width (default 400, 250 with a photo) |
--card-placeholder CARD_PLACEHOLDER |
placeholder image expression, e.g. “Ресурс{Аккаунт.svg}.Ссылка” |
--overwrite |
|
--dry-run |
show the changes (with file texts) without writing anything |
xbsl add-subsystem
usage: xbsl add-subsystem [-h] [--representation REPRESENTATION] [--no-auto-interface]
[--uses USES] [--dry-run]
parent_dir name
Arguments
| Option | Description |
|---|---|
parent_dir |
|
name |
Options
| Option | Description |
|---|---|
-h, --help |
show this help message and exit |
--representation REPRESENTATION |
|
--no-auto-interface |
|
--uses USES |
subsystem names, comma-separated |
--dry-run |
show the changes (with file texts) without writing anything |
xbsl add-dependency
usage: xbsl add-dependency [-h] [--path PATH] [--dry-run] root vendor name version
Arguments
| Option | Description |
|---|---|
root |
|
vendor |
library vendor |
name |
library name |
version |
library release version, e.g. 2.0 |
Options
| Option | Description |
|---|---|
-h, --help |
show this help message and exit |
--path PATH |
Проект.yaml (when there are several projects under the root) |
--dry-run |
show the changes (with file texts) without writing anything |
xbsl rename-object
usage: xbsl rename-object [-h] [--new-presentation NEW_PRESENTATION]
[--old-presentation OLD_PRESENTATION] [--path PATH] [--dry-run]
root old_name new_name
Arguments
| Option | Description |
|---|---|
root |
|
old_name |
|
new_name |
Options
| Option | Description |
|---|---|
-h, --help |
show this help message and exit |
--new-presentation NEW_PRESENTATION |
new Представление/Заголовок (default: the new name) |
--old-presentation OLD_PRESENTATION |
the old presentation (to replace in Заголовок/Представление) |
--path PATH |
the object’s yaml (when several objects share one name) |
--dry-run |
show the changes (with file texts) without writing anything |
xbsl set-access
usage: xbsl set-access [-h] [--name NAME] [--path PATH] [--default DEFAULT]
[--permission RIGHT=METHOD] [--calc-by CALC_BY] [--dry-run]
root
Arguments
| Option | Description |
|---|---|
root |
Options
| Option | Description |
|---|---|
-h, --help |
show this help message and exit |
--name NAME |
|
--path PATH |
the object’s yaml (instead of --name) |
--default DEFAULT |
the method for the ПоУмолчанию right |
--permission RIGHT=METHOD |
the method for a single right (repeatable), e.g. Чтение=РазрешеноВсем |
--calc-by CALC_BY |
РасчетРазрешенийПо fields, comma-separated (required for РазрешенияВычисляютсяДляКаждогоОбъекта) |
--dry-run |
show the changes (with file texts) without writing anything |
xbsl object-info
usage: xbsl object-info [-h] [--name NAME] [--path PATH] root
Arguments
| Option | Description |
|---|---|
root |
Options
| Option | Description |
|---|---|
-h, --help |
show this help message and exit |
--name NAME |
|
--path PATH |
xbsl project-info
usage: xbsl project-info [-h] root
Arguments
| Option | Description |
|---|---|
root |
Options
| Option | Description |
|---|---|
-h, --help |
show this help message and exit |
xbsl form-tree
usage: xbsl form-tree [-h] [--at OFFSET] yaml_path
Arguments
| Option | Description |
|---|---|
yaml_path |
Options
| Option | Description |
|---|---|
-h, --help |
show this help message and exit |
--at OFFSET |
instead of the tree, return the node at a file offset (cursor sync) |
xbsl form-edit
usage: xbsl form-edit [-h] [--parent PARENT] [--slot SLOT] [--type TYPE] [--name NAME]
[--node NODE] [--nodes ID[,ID...]] [--new-parent NEW_PARENT]
[--container CONTAINER] [--new-name NEW_NAME] [--before BEFORE]
[--after AFTER] [--key KEY] [--value VALUE] [--value-yaml VALUE_YAML]
[--fragment FRAGMENT] [--fragment-file FILE] [--new-type NEW_TYPE]
[--dry-run]
yaml_path
{insert,insert-fragment,move,move-nodes,remove,remove-nodes,wrap,unwrap,duplicate,rename,set-property,reset-property,property-add,property-retype,property-remove,property-rename}
Arguments
| Option | Description |
|---|---|
yaml_path |
Options
| Option | Description |
|---|---|
-h, --help |
show this help message and exit |
--parent PARENT |
container node id (insert/insert-fragment) |
--slot SLOT |
children slot: Содержимое, Страницы, Колонки, … (insert/move) |
--type TYPE |
Тип of the new component (insert) or property (property-add) |
--name NAME |
Имя of the new component (insert), the wrapper (wrap) or a Свойства-section property (property-*) |
--node NODE |
operation node id (move/remove/wrap/unwrap/duplicate/rename/set-property/reset-property) |
--nodes ID[,ID...] |
node ids of a batch operation (move-nodes/remove-nodes): comma-separated or by repeating the flag; order does not matter |
--new-parent NEW_PARENT |
new container id (move/move-nodes) |
--container CONTAINER |
Тип of the wrapper container (wrap) |
--new-name NEW_NAME |
the node’s new Имя (rename) or property’s (property-rename); for rename without the flag, Имя is removed |
--before BEFORE |
sibling id: insert/move BEFORE it |
--after AFTER |
sibling id: insert/move AFTER it |
--key KEY |
node property name (set-property/reset-property) |
--value VALUE |
scalar value or binding (set-property) |
--value-yaml VALUE_YAML |
a composite value as a ready yaml fragment (set-property) |
--fragment FRAGMENT |
a yaml block of one component or several – a “-” list or blocks in a row (insert-fragment) |
--fragment-file FILE |
a file with a component’s yaml block (insert-fragment, instead of --fragment) |
--new-type NEW_TYPE |
the property’s new Тип (property-retype) |
--dry-run |
show the changes (with file texts) without writing anything |
xbsl form-handlers
usage: xbsl form-handlers [-h] [--node NODE] [--key KEY] [--method METHOD] [--signature SIGNATURE]
[--dry-run]
yaml_path
Arguments
| Option | Description |
|---|---|
yaml_path |
Options
| Option | Description |
|---|---|
-h, --help |
show this help message and exit |
--node NODE |
node id (handler creation; without --node/--key – the module’s method list) |
--key KEY |
node event key: ПриНажатии, ПослеСоздания, … |
--method METHOD |
handler method name (default <Имя узла><Ключ>; an existing method – only the binding in yaml) |
--signature SIGNATURE |
event signature from the ui schema, e.g. “(Кнопка, СобытиеПриНажатии)->ничто” (without the flag it is looked up in the local data) |
--dry-run |
show the changes (with file texts) without writing anything |