CtrlK
BlogDocsLog inGet started
Tessl Logo

pantheon-ai/nx-plugin-toolkit

Complete Nx plugin development toolkit: create custom generators, executors, and extend Nx workspaces with reusable automation

93

1.00x
Quality

94%

Does it follow best practices?

Impact

92%

1.00x

Average score across 5 eval scenarios

SecuritybySnyk

Passed

No known issues

Overview
Quality
Evals
Security
Files

executor-context-api.mdnx-plugin-authoring/references/

ExecutorContext API Reference

Use this reference when implementing executor behavior with Nx context metadata.

Commonly Used Fields

  • context.root: workspace root path.
  • context.projectName: active project name.
  • context.targetName: current target key.
  • context.configurationName: active configuration, if provided.
  • context.projectsConfigurations: full project graph metadata.

Example Usage

import type { ExecutorContext } from "@nx/devkit";

export default async (_options: { outputPath: string }, context: ExecutorContext) => {
  const project = context.projectName ?? "unknown-project";
  const target = context.targetName ?? "unknown-target";

  console.log(`Running ${project}:${target}`);
  return { success: true };
};

Practical Patterns

  • Log project/target identity for debuggability.
  • Resolve workspace-relative paths via context.root.
  • Keep context reads defensive (??) to avoid brittle assumptions.

tile.json