Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Artificonfig VSCode ExtensionNew to Visual Studio Code? Get it now.
Artificonfig VSCode Extension

Artificonfig VSCode Extension

Artificialy SA

|
232 installs
| (0) | Free
Intelligent authoring support for Artificonfig YAML/JSON configuration files
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Artificonfig for VS Code

Intelligent authoring support for Artificonfig YAML and JSON configuration files: validation, navigation, auto-completion, hover documentation, syntax highlighting, quick fixes, one-step extraction of a sub-config into its own linked file, "used by" reverse references that show you exactly which other config files link to the one you are editing, a play button to run command configs from the editor — and a bug button to debug them. Powered by a Python language server that talks directly to the artificonfig library installed in your environment.

Links

What Where
Artificonfig documentation https://artificialy1.gitlab.io/internal/artificonfig/
Artificonfig library repository & issues https://gitlab.com/artificialy1/internal/artificonfig
This extension: repository & issues https://gitlab.com/artificialy1/artificialy-internal-projects/artificialy-shared-libraries-and-material/artificonfig-vscode

Report bugs in the extension (highlighting, completions, diagnostics, commands) to the extension repository. Report bugs in the config format or runtime behaviour to the library repository.

The Artificonfig: Report Issue... command opens a pre-filled issue template containing your environment details and can take you straight to the extension's issue tracker.

Requirements

  • VS Code 1.80.0 or newer
  • Python 3.10 or newer, with the artificonfig library installed (1.0.0 or newer)

The extension picks up the interpreter selected by the Python extension. To pin a specific one, set artificonfig.python.interpreterPath.

If the library is missing or too old, the extension tells you and offers to run the install/upgrade command for you (uv pip install --upgrade artificonfig). The notification is non-blocking — VS Code keeps working while it is on screen.

Getting started

  1. Install the extension and make sure artificonfig is importable from your selected Python interpreter.
  2. Open a workspace containing config files. Files are treated as Artificonfig configs when they contain a <BASIC:...>, <OBJECT:...>, <COMMAND:...> or <LINK:...> node.
  3. Check the Artificonfig item in the status bar — a check mark means the language server is running. Click it for a quick info menu.

By default the extension scans the workspace at startup and reports problems for every config file it finds. Use artificonfig.workspace.configRootPath and artificonfig.workspace.additionalConfigPaths to control what gets scanned.


Features

Validation

Live validation: hover the error, fix it, the diagnostic disappears

Diagnostics are produced at four increasing levels of depth. The level used while you type is artificonfig.validation.level; the (cheaper) level used for the startup scan is artificonfig.workspace.startupScanLevel.

Level What it checks Typical cost
syntax Config-node syntax, config types, link path format, <ENV:...> placeholder types, legacy syntax ~1 ms
structure YAML/JSON parsing, single-root-node rule, <TARGET> presence on OBJECT nodes ~10 ms
imports The Python module and class referenced by each node can actually be imported ~50–200 ms
full Complete Pydantic model validation, including field names, types and required fields ~200 ms+

Diagnostics overview in the Problems panel

Additional checks:

  • Link resolution — <LINK:...> targets are resolved and reported when missing. Links resolve against the closest ancestor folder named configs; if there is none, you get a warning explaining that resolution fell back to the configured root.
  • Legacy syntax — files using the old @OBJECT_CONFIG / @SIMPLE_CONFIG / @COMMAND_CONFIG / @CONFIG_LINK markers are flagged with a single clear error plus a quick fix to convert them.
  • Environment variables — ${VAR}, ${VAR:-default} and ${VAR-default} are understood; unresolved variables without a default are reported.
  • Live updates — the model cache is invalidated when you edit the Python classes your configs point at, so diagnostics follow your code without a restart.

Converting a legacy-syntax file with the quick fix command

Navigation (Go to Definition)

Go to definition on a class path and a link

F12 / Cmd+click on:

  • a config node class path (<BASIC:my.module.MyConfig>) → opens the Python class
  • a <TARGET> value → opens the target Python class
  • a <LINK:shared.database> path → opens the linked config file

"Used by" reverse references

Used-by CodeLens and references peek

Every config file shows, above its first line, a CodeLens such as $(references) used by 3 files — or $(circle-slash) not referenced when no other config links to it (handy for spotting dead configs). Clicking it opens VS Code's native references peek widget; selecting an entry jumps straight to the <LINK:...> token in the referencing file. The same feature is available from:

  • the $(references) icon in the editor title bar (next to the preview button)
  • the command Artificonfig: Show Used By (References)
  • native Shift+F12 / Find All References on a config file

The underlying index is built by the language server during the startup workspace scan and kept up to date as you save files. References are resolved exactly like the artificonfig library resolves them at run time — against the closest ancestor configs folder of the referencing file, with ${VAR} environment placeholders substituted — so what you see is what your config actually resolves to. Only files inside the configured config paths are indexed.

Auto-completion

Auto-completion of nodes, class paths and fields

Triggered by <, :, ., / or Ctrl+Space:

  • Config node types — typing < at the start of a line suggests BASIC, OBJECT and COMMAND with full snippets (the OBJECT snippet includes its <TARGET> line).
  • Value-position nodes — typing < after field: suggests LINK and ENV.
  • Class paths — after <BASIC: etc., suggests config classes discovered in the workspace.
  • Target classes — after <TARGET>:, suggests concrete implementation classes.
  • Link paths — after <LINK:, suggests other config files, resolved relative to the config root.
  • ENV placeholder types — after <ENV:, suggests the supported placeholder types (currently None).
  • Environment variables — after $ or ${, suggests names from your environment together with their current values.
  • Field names — inside a config node, suggests the remaining Pydantic fields of the parent model, with type hints and snippets, and hides fields you already used.

Hover

Hover documentation on a class path, a field and a link

Hovering shows:

  • config and target classes — docstring, module path and field summary
  • field names — declared type, default value, and whether the field is required
  • <LINK:...> paths — the resolved file path and its root config node
  • ${VAR} references — the current value from the environment, or the default that will be used

Run command configs (play button)

Running a command config from the play button

Config files whose root node is <COMMAND:...> get a play button in the editor title bar. It runs the command behind the config with:

uv run python -m {proj_name} [-g {global-config-path}] {command-name} -c {current-open-command-config}
  • {command-name} is the Python module name with underscores replaced by dashes (ds_analysis_command.py → ds-analysis-command) — the same convention the library's CLI uses.
  • {proj_name} is the project package of the implementing Python file (dw_train/exec/commands/ds_analysis_command.py → dw_train).

The first click asks you to configure the runtime:

  1. Which Python file implements the command — the workspace is scanned for def main(config: <YourCommandConfig>) where <YourCommandConfig> is the class of the open file's root node. A single match is taken for granted; several candidates are offered as a quick pick.
  2. Which global config to use — every workspace config file whose root node class is named GlobalContextConfig (only the last segment of the class path matters) is listed, together with a None entry that omits -g.

The choices are stored per config file and reused on every subsequent run. Change them later from:

  • the gear button in the editor title bar (next to the play button)
  • the command Artificonfig: Configure Command Runtime... — it always reopens the picker (even for a single implementation, with a Browse… entry for files outside the scan)
  • Artificonfig: Clear Stored Command Runtime to forget the stored choices

Keyboard shortcuts (while a command config file is active): F5 debugs it, Ctrl+F5 runs it.

The command runs in an Artificonfig Commands terminal, from the closest ancestor directory of the config file containing a pyproject.toml (so uv run resolves the right project). A file that is not a command config (root <BASIC:...>/<OBJECT:...>/<LINK:...>) does not get the play button.

Debug command configs

Debugging a command config with a breakpoint

Command config files also get a bug icon in the editor title bar, right next to the play button. It starts the same command under debugpy (provided by the Python extension) — breakpoints in your command and configs work as usual. The session mirrors the stored runtime configuration (module: dw_train, args: [-g, ..., ds-analysis-command, -c, ...], cwd = the pyproject.toml root); if no runtime is stored yet, the configure flow runs on the spot and the debug session starts right after.

Pre-configured launch entries are available in three forms:

  • Debug dropdown picker — the workspace's Run and Debug picker lists one generated entry per command config file (e.g. Artificonfig: ds_analysis.yaml), served dynamically without ever writing launch.json.
  • launch.json entry — Artificonfig: Add This Command Config to launch.json (also an editor-title button next to the debug one) merges the entry into .vscode/launch.json, preserving existing comments and formatting, and is idempotent: an up-to-date entry is left byte-identical, a stale one is replaced in place.
  • Reconfigure anytime — after changing the stored runtime (gear button), re-running the launch.json command refreshes the entry to match.

Syntax highlighting

Syntax highlighting

A TextMate injection grammar highlights Artificonfig markers inside otherwise ordinary YAML and JSON:

  • config nodes <BASIC:...>, <OBJECT:...>, <COMMAND:...>
  • the <TARGET> key
  • config links <LINK:...>, including env-var substitutions inside the path
  • typed placeholders <ENV:None>
  • env-var substitutions ${VAR}, ${VAR:-default}, ${VAR-default}

Escaping is honoured: anything escaped with a backslash — \<BASIC:key>, \<TARGET>, \<LINK:path>, \${VAR} — is rendered as ordinary text using your theme's normal string/key colour, exactly as the library treats it.

<ENV:...> is only highlighted when it is the entire value, or the entire default of a substitution as in ${VAR:-<ENV:None>}. This matches the library, which leaves as<ENV:None> as a plain string.

Colours are contributed as defaults and can be overridden per theme via editor.tokenColorCustomizations.

Quick fixes and code actions

Applying a quick fix

Available from the lightbulb or Cmd+.:

  • Convert this file to new artificonfig syntax — offered anywhere inside a legacy file
  • Convert all files in a directory to new artificonfig syntax...
  • Add <TARGET> field — for OBJECT nodes that are missing it
  • Change to '<type>' — corrects an invalid or misspelled config type
  • Fix path to '<path>' — corrects a mistyped module path when a close match exists
  • Generate stub for <Class> (required fields) — fills in the required fields of the referenced Pydantic model
  • Extract '<key>' to linked config file... — moves a keyed (or list item) config node into its own YAML file and replaces it with a <LINK:...> (see below)

Extract a sub-config to a linked file

Extracting a sub-config to a linked file

Put the cursor on a key whose value is a config node (or on the node line itself) and press Cmd+.:

database:
  <OBJECT:pyproject.src.DatabaseConfig>:
    <TARGET>: pyproject.src.AppConfig
    host: "example.com"

You are asked to confirm where the new file goes. The suggested location is derived from the class path: the top-level package is dropped, the remaining module path becomes the sub-directory under the configs root, and the class name becomes the snake_case file name — pyproject.src.DatabaseConfig → configs/src/database_config.yaml. While you type, the input box shows the resulting link path and refuses:

  • a file that already exists (pick another name),
  • a name whose link path is already taken by another file (e.g. database_config.json next to it), which would otherwise change what existing links resolve to,
  • locations outside the configs root, which a <LINK:...> cannot reach.

On confirmation the node is written to the new file (indentation and comments preserved), the source becomes database: <LINK:src.database_config>, and the new file opens beside the current one. YAML files only.

The same works for a config node that is a list item: put the cursor on its - <OBJECT:...>: line and the item is replaced by - <LINK:...>.

handlers:
  - <OBJECT:pyproject.src.handlers.FileHandler>:
      path: "/tmp/x"

The item must hold only the config node; an item that has other keys next to it is not offered.

Config preview

Config preview refreshing on save

The Preview Config Output command — also available as the preview icon in the editor title bar for recognised config files — runs the config through artificonfig and shows the fully resolved result, with links expanded and environment variables substituted. The preview refreshes automatically when you save the file.

Format conversion

Converting a YAML config to JSON

Convert File Format... converts the open config between YAML and JSON, preserving escaping, and asks where to write the result.

Diagnostics for your setup

Status bar Show Info menu

  • The status bar item reports whether the language server is running, and opens a quick menu with the detected library version, interpreter, config root and file counts.
  • Show Info (Detailed Panel) writes the same report to the output channel.
  • Set artificonfig.trace.server to messages or verbose to log the LSP traffic.

Commands

All commands are available from the Command Palette (Cmd+Shift+P) under the Artificonfig prefix.

Command Description
Artificonfig: Validate All Config Files Re-runs validation across the whole workspace and refreshes all diagnostics.
Artificonfig: Restart Language Server Restarts the Python language server. Use after changing your Python environment.
Artificonfig: Reload Extension Re-runs the whole startup: re-detects the Python interpreter, checks the artificonfig library and starts the server. Use when startup failed or timed out (wrong interpreter, Python extension still loading, library just installed), or after re-enabling artificonfig.enabled, instead of reloading the window. Also in the status bar menu and in the startup error notification.
Artificonfig: Preview Config Output Opens a panel with the fully resolved config (links expanded, env vars substituted). Refreshes on save.
Artificonfig: Show Used By (References) Lists every config file that <LINK:...>s to the active config file, and opens the selected reference at the link position. Also available as the $(references) editor-title button and the "used by" CodeLens.
Artificonfig: Convert File to New Syntax Rewrites the active file from the legacy @-marker syntax to the <TYPE:path> syntax.
Artificonfig: Convert Directory to New Syntax... The same conversion applied to every config file in a directory you pick.
Artificonfig: Convert File Format... Converts the active config between YAML and JSON.
Artificonfig: Add Current File to Config Paths Appends the active file to artificonfig.workspace.additionalConfigPaths and restarts the server.
Artificonfig: Add Current File's Directory to Config Paths The same, for the containing directory.
Artificonfig: Show Info Quick-pick menu with library version, interpreter, config root and workspace statistics.
Artificonfig: Show Info (Detailed Panel) Writes a full environment report to the Artificonfig output channel.
Artificonfig: Update artificonfig library Runs the upgrade command for the library in a terminal.
Artificonfig: Report Issue... Opens a pre-filled issue report with environment details and links to the issue tracker.

Settings

Setting Type Default Description
artificonfig.validation.level syntax | structure | imports | full full Depth of validation performed as you edit.
artificonfig.validation.debounce number 500 Milliseconds to wait after a keystroke before validating.
artificonfig.workspace.startupScan boolean true Validate all config files when the workspace opens.
artificonfig.workspace.startupScanLevel syntax | structure | imports | full structure Validation level used for the startup scan. full is the most thorough but noticeably slower on large workspaces.
artificonfig.workspace.maxFiles number 1000 Upper bound on files scanned at startup.
artificonfig.workspace.configRootPath string "" Config root used to resolve <LINK:...> paths. Absolute, or relative to the workspace root. Empty means auto-detect the closest parent folder named configs.
artificonfig.workspace.additionalConfigPaths string[] [] Extra files or directories to treat as config paths, on top of the config root. Populated by the "Add ... to Config Paths" commands.
artificonfig.python.interpreterPath string "" Interpreter used to run the language server. Empty means use the Python extension's selection.
artificonfig.yaml.overrideSchema boolean true Apply Artificonfig's own permissive JSON schema to detected config files, so the YAML extension stops matching unrelated JSON Schema Store schemas and reporting bogus errors on <BASIC:...> / <TARGET> keys. Requires a window reload.
artificonfig.trace.server off | messages | verbose off Log the communication between VS Code and the language server.

Troubleshooting

No highlighting or diagnostics in a config file. The extension only treats files containing an Artificonfig node as configs. Confirm the file has a root <BASIC:...> / <OBJECT:...> / <COMMAND:...> node, and that the status bar shows the server as active.

"artificonfig library not found". The selected interpreter cannot import the library. Select the right interpreter, or set artificonfig.python.interpreterPath, then run Reload Extension.

Startup failed or timed out (no interpreter found, server did not start). Fix the cause (select the interpreter, wait for the Python extension to finish loading, install the library), then run Artificonfig: Reload Extension: there is no need to reload the window.

Unexpected schema errors on <BASIC:...> keys. Another YAML schema is being applied. Make sure artificonfig.yaml.overrideSchema is enabled and reload the window.

<LINK:...> resolves to the wrong file. Links resolve against the closest ancestor directory named configs. Set artificonfig.workspace.configRootPath if your layout differs.

Files outside the config root are ignored by the startup scan. Use Add Current File / Directory to Config Paths.

For anything else, run Artificonfig: Report Issue... — it collects the environment details needed to diagnose the problem.


Contributing

Development setup, architecture notes and the release process live in CONTRIBUTING.md and the docs/ folder:

  • docs/planning.md — architecture and strategy
  • docs/implementation.md — feature implementation details
  • docs/artificonfig-syntax.md — syntax reference
  • docs/testing-and-release.md — testing and packaging
  • docs/quick-reference.md — summary and future work
  • docs/todo.md — progress tracker
git submodule update --init --recursive   # the artificonfig library is a submodule
make install-dev                          # Node.js + Python dependencies
make compile                              # build the TypeScript client
make test                                 # run the test suites
make help                                 # all available targets

License

See LICENSE.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft