SuperAPI AI Directory

db-load-cf

General & other

View repository

Updated 10-16 03:42

About this skill

/db-load-cf — Loading a configuration from a CF file

Loads a configuration from a binary CF file into the infobase.

Usage

/db-load-cf <input.cf> [database]
/db-load-cf config.cf dev

Attention: loading CF completely replaces the configuration in the database. Before executing, request confirmation from the user.

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 the user specified a database 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 If v8path is not set — auto-detection: Get-ChildItem "C:\Program Files\1cv8\*\bin\1cv8.exe" | Sort -Desc | Select -First 1 If the file does not exist — suggest /db-list add. If the database used is not registered — after execution, suggest adding it via /db-list add.

Command

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

Script parameters

Parameter Required Description
-V8Path <путь> no Platform bin directory (or full path to 1cv8.exe)
-InfoBasePath <путь> * File infobase
-InfoBaseServer <сервер> * 1C server (for a server infobase)
-InfoBaseRef <имя> * Database name on the server
-UserName <имя> no User name
-Password <пароль> no Password
-InputFile <путь> yes Path to the CF file
-Extension <имя> no Load as an extension
-AllExtensions no Load all extensions from the archive

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

Return codes

Code Description
0 Success
1 Error (see log)

After execution

  1. Read the log file and show the result
  2. Suggest running /db-update — loading the CF updates only the "main" configurator configuration; to apply it to the database, you need /UpdateDBCfg

Examples

# Файловая база
powershell.exe -NoProfile -File .claude/skills/db-load-cf/scripts/db-load-cf.ps1 -InfoBasePath "C:\Bases\MyDB" -UserName "Admin" -InputFile "C:\backup\config.cf"

# Серверная база
powershell.exe -NoProfile -File .claude/skills/db-load-cf/scripts/db-load-cf.ps1 -InfoBaseServer "srv01" -InfoBaseRef "MyApp_Test" -UserName "Admin" -Password "secret" -InputFile "config.cf"

# Загрузка расширения
powershell.exe -NoProfile -File .claude/skills/db-load-cf/scripts/db-load-cf.ps1 -InfoBasePath "C:\Bases\MyDB" -UserName "Admin" -InputFile "ext.cfe" -Extension "МоёРасширение"