Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fimod

Fimod for VS Code

Early access — Transform JSON, YAML, TOML and CSV with Python molds directly in VS Code. Install the VSIX from GitHub Releases while Marketplace publishing is pending.

Transform structured data files (JSON, YAML, TOML, CSV) using Python mold scripts — right from your editor.

This extension wraps the fimod CLI, giving you a visual workflow for shaping data without leaving VS Code.

📚 Documentation

✨ Features

✨ Shape Command

One command to transform any data file: select a mold or type a Python expression, preview the diff, apply.

  • From the editor: select text (or use the whole file) → Ctrl+Shift+M → pick a mold or type an expression → review diff → apply
  • From the explorer: right-click a file → Fimod → Shape
  • Inline expressions: type any Python expression directly (e.g. [x for x in data if x["active"]])
  • Molds: reusable Python scripts from your registries (@mold-name)

👁️ Preview & Format Toggles

The Shape quick pick includes toggle buttons to control behavior on the fly:

  • Preview (eye / eye-closed): show a diff before applying
  • Format (symbol-file / notebook-open-as-text): auto-detect or manually choose input/output formats

The title bar displays the current state: preview: on · formats: auto.

🕘 Recent History

Your last mold/expression choices appear at the top of the quick pick for quick reuse. History persists across VS Code sessions.

🗂️ Registry Molds

Browse all configured mold registries from the activity bar sidebar.

  • View sources (local, GitHub, remote) and their molds
  • Add or remove sources
  • Set default source and reorder priorities
  • Build catalog for local sources
  • One-click setup for the official registry

📁 Workspace Molds

See molds discovered from the current workspace and configured scan paths.

  • Open the mold source file directly
  • Run a mold on a file
  • Run mold tests
  • View mold details

📖 Mold Detail View

Click any mold in the tree views to open a detail panel:

  • Documentation (README fetched from local path or GitHub URL)
  • Full source code
  • Mini playground — paste any input (JSON, YAML, CSV, text...), pick format, run, see output

🧪 Playground

A dedicated side panel for iterating on molds with live feedback — ideal when authoring or tuning a mold against real input.

  • Input source: load from a file, paste from clipboard, or type directly in a scratchpad
  • Mold source: pick a registry mold (@name), a workspace mold file, or type an inline expression
  • Live mode (on by default): uses fimod shape --watch to re-run automatically while you edit the input or a watched local mold file
  • Toolbar: override input/output format, pass mold args, toggle live, refresh registry cache
  • Output: copy to clipboard or save to disk; errors show as a red banner while the last valid output stays visible

Triggers:

  • Editor or explorer context menu → Fimod → Open Playground
  • Registry Molds / Workspace Molds tree → right-click a mold → Open Playground
  • Command palette → Fimod: Open Playground

Playground is read-only — use Shape to apply a transformation back to a file.

🔧 Status Bar

Displays fimod X.Y.Z in the status bar when the binary is detected, so you always know which version is active.

📦 Installation

The extension is not yet on the VS Code Marketplace. Install the VSIX manually from GitHub Releases:

  1. Download fimod-vscode-X.Y.Z.vsix from the latest stable release. Use a -beta.N or -rc.N VSIX only when testing a prerelease.
  2. In VS Code, open the Command Palette → Extensions: Install from VSIX... → select the downloaded file.

Or via the CLI:

code --install-extension fimod-vscode-X.Y.Z.vsix

✅ Requirements

  • fimod CLI 0.7.0 or newer installed and available in your PATH (or configured via fimod.binaryPath)

🚀 Usage

Action Shortcut
Shape (editor) Ctrl+Shift+M (Cmd+Shift+M on macOS)
Shape (explorer) Right-click → Fimod → Shape
Shape (command palette) Fimod: Shape
Playground Fimod: Open Playground or right-click → Fimod → Open Playground

⚙️ Extension Settings

Setting Default Description
fimod.binaryPath "" Path to the fimod binary. If empty, searches PATH.
fimod.shape.preview true Show diff preview before applying transformations.
fimod.shape.debug false Pass --debug to fimod shape transformations.
fimod.shape.formatDetection "auto" Format detection mode: auto or manual.
fimod.shape.historySize 3 Number of recent choices shown at the top of the quick pick (0–10).
fimod.registry.autoRefresh true Automatically refresh registry tree on activation.
fimod.mold.scanPaths [] Additional directories to scan for workspace molds.
fimod.mold.testsDirPattern ${workspaceFolder}/tests-molds/${moldName} Pattern for the directory used by fimod mold test. Placeholders: ${workspaceFolder}, ${moldDir}, ${moldName}. Per-mold overrides take precedence.

🧾 Supported Formats

JSON, YAML, TOML, CSV, NDJSON, plain text — anything fimod supports. Format is auto-detected from the file extension or content.

📄 License

Apache-2.0

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages