Reproducible Data Pipelines

FastEditor Pipeline Recipes v1.0

A Recipe is a saved, shareable multi-step data pipeline (open → filter → SQL → join → export) encapsulated into a single human-readable, Git-friendly JavaScript file (.recipe.js).

Script-Based in v1.0: Recipes are clean, hand-written scripts powered by FastEditor's QuickJS runtime (app.*, csv.*, document.*, fs.*). A point-and-click recording builder is planned for a future release; today, recipes give developers and teams full programmatic power to automate complex workflows with complete code transparency.

Why Recipes Matter

Data investigations often involve repetitive sequences: opening a raw log or CSV, filtering for errors, calculating aggregates with SQL, and exporting a summary. Recipes turn interactive manual steps into a version-controlled team asset.

Real-World Outcome

Team-Wide Reproducibility

Run the exact same weekly incident triage across three log files — filter errors, correlate by time, export a clean Markdown summary — with one command, 100% reproducible by any teammate on their own machine with zero setup.

100% Deterministic Parity

Recipe Quick Start & Portability Rules

Recipes are stored in your project's repository and executed in identical fashion across all environments.

1 Repository Location

Commit your team recipes into a ./recipes/ folder at the root of your project:

my-team-project/
├── data/
│   └── app.log
├── recipes/
│   ├── incident_triage.recipe.js
│   └── csv_sql_projection.recipe.js
└── reports/

2 Golden Rule: Never Hardcode Absolute Machine Paths

✗ Broken on other machines: const input = 'C:\\Users\\alice\\data.csv';
✓ Portable across team & CI: const inPath = app.getEnv('RECIPE_IN') || './data.csv';

3 Real Recipe Example (incident_triage.recipe.js)

Exact excerpt from recipes/bundled/incident_triage.recipe.js:

/**
 * @recipe Incident Log Triage & Error Digest
 * @description Filters error logs, aggregates error types and timestamps, and exports a clean Markdown digest.
 * @author FastEditor Team
 * @version 1.0.0
 */

(() => {
  const inPath = app.getEnv('RECIPE_IN') || 'app.log';
  const outPath = app.getEnv('RECIPE_OUT') || 'incident_digest.md';

  app.setStatus(`Starting Incident Triage Recipe on ${inPath}...`);

  // Step 1: Open or verify active document
  let active = app.getActiveSession();
  if (!active && inPath && fs.exists(inPath)) {
    active = app.openFile(inPath);
  }

  // Step 2: Apply high-severity regex filter
  try {
    csv.filter(/500|502|503|FATAL|ERROR|CRITICAL/i);
  } catch (e) {
    // If not in CSV mode, log filter applied
  }

  // Step 3: Query error statistics
  let summary = '';
  try {
    const rows = csv.query("SELECT COUNT(*) AS total_errors FROM data");
    if (rows && rows.length > 0) {
      summary = `# Incident Triage Report\n\n- **Source**: \`${inPath}\`\n- **Detected Error Events**: ${rows[0].total_errors || 0}\n\n`;
    }
  } catch (e) {
    summary = `# Incident Triage Report\n\n- **Source**: \`${inPath}\`\n\n`;
  }

  // Step 4: Export report to Markdown
  try {
    app.exportProjection({ format: 'markdown', out: outPath });
  } catch (e) {
    fs.writeFile(outPath, summary + `\n*Export completed at ${new Date().toISOString()}*\n`);
  }

  app.setStatus(`Incident Triage Recipe completed -> ${outPath}`);
})();

Run It Two Ways — 100% Execution Parity

FastEditor's internal engine executes recipes with identical behavior whether triggered interactively from the GUI or headlessly from a terminal build script:

Interactive GUI Execution

Open the Recipes dialog via Tools → Recipes → Recipes Manager... (or press Ctrl+Shift+PRecipes Manager), select any discovered project or global recipe, and click Run Recipe.

Tools → Recipes → Recipes Manager

Headless CLI & CI/CD Pipelines

Execute recipes headlessly in GitHub Actions, Jenkins, or shell scripts with structured JSON output and classified exit codes.

FastEditor.exe --recipe ./recipes/incident_triage.recipe.js --in ./data/app.log --out ./reports/digest.md

Explore the Catalog for Ready-to-Use Recipes

Recipes share the official catalog infrastructure. Download curated recipes directly from our catalog or contribute your team's recipes to the community.

Browse Recipes in Catalog →

Full Scripting Object Model

Consult the complete documentation for all JavaScript APIs (app.exportProjection, csv.query, document.getLineText) available inside recipes.

View Scripting Documentation →