SuperAPI AI Directory

erf-dump

Coding & development

View repository

Updated 10-15 17:18

About this skill

/erf-dump — Report unpacking

Unpacks an ERF file into XML sources using the 1C platform (hierarchical format). Uses the shared script from /epf-dump.

Usage

/erf-dump <ErfFile> [OutDir]
Parameter Required Default Description
ErfFile yes — Path to the ERF file
OutDir no src Directory for exporting sources

Connection parameters

Read .v8-project.json from the project root. Take v8path (path to the platform) and resolve the database:

  1. If the user specified connection parameters (path, server) — use them directly
  2. If a database was specified by name — search by id / alias / name in .v8-project.json
  3. If not specified — match the current Git branch with databases[].branches
  4. If the branch did not match — use default
  5. If .v8-project.json is missing or there are no databases — create an empty IB in ./base If v8path is not set — auto-detect: Get-ChildItem "C:\Program Files\1cv8\*\bin\1cv8.exe" | Sort -Desc | Select -First 1 If the database used is not registered — after execution, offer to add it via /db-list add.

Command

Use the shared script from epf-dump:

powershell.exe -NoProfile -File .claude/skills/epf-dump/scripts/epf-dump.ps1 <параметры>

Script parameters

Parameter Required Description
-V8Path <путь> no Platform bin directory (or full path to 1cv8.exe)
-InfoBasePath <путь> * File database
-InfoBaseServer <сервер> * 1C server (for a server database)
-InfoBaseRef <имя> * Database name on the server
-UserName <имя> no User name
-Password <пароль> no Password
-InputFile <путь> yes Path to the ERF file
-OutputDir <путь> yes Directory for exporting sources
-Format <формат> no Hierarchical (default) / Plain

* — either -InfoBasePathis required, or the pair -InfoBaseServer + -InfoBaseRef

Return codes

Code Description
0 Successful unpacking
1 Error (see log)

Format -Format Hierarchical

Key -Format Hierarchical creates the directory structure:

<OutDir>/
├── <Name>.xml                    # Корневой файл
└── <Name>/
    ├── Ext/
    │   └── ObjectModule.bsl      # Модуль объекта (если есть)
    ├── Forms/
    │   ├── <FormName>.xml
    │   └── <FormName>/
    │       └── Ext/
    │           ├── Form.xml
    │           └── Form/
    │               └── Module.bsl
    └── Templates/
        ├── <TemplateName>.xml
        └── <TemplateName>/
            └── Ext/
                └── Template.<ext>

Examples

# Разборка отчёта (файловая база)
powershell.exe -NoProfile -File .claude/skills/epf-dump/scripts/epf-dump.ps1 -InfoBasePath "C:\Bases\MyDB" -InputFile "build\МойОтчёт.erf" -OutputDir "src"

# Серверная база
powershell.exe -NoProfile -File .claude/skills/epf-dump/scripts/epf-dump.ps1 -InfoBaseServer "srv01" -InfoBaseRef "MyDB" -UserName "Admin" -Password "secret" -InputFile "build\МойОтчёт.erf" -OutputDir "src"