Documentation Index
Fetch the complete documentation index at: https://docs.agentfront.dev/llms.txt
Use this file to discover all available pages before exploring further.
Generates a @Job class extending JobContext with stub input/output schemas.
Usage
nx g @frontmcp/nx:job analyze-text --project text-processing
Options
| Option | Type | Default | Description |
|---|
name | string | — | Required. The name of the job |
project | string | — | Required. The project to add the job to |
directory | string | — | Subdirectory within src/jobs/ |
Generated File
src/jobs/analyze-text.job.ts
import { Job, JobContext } from '@frontmcp/sdk';
import { z } from '@frontmcp/sdk';
@Job({
name: 'analyze-text',
description: 'TODO: describe what this job does',
inputSchema: {
value: z.string().describe('TODO: replace with actual input'),
},
outputSchema: {
result: z.string().describe('TODO: replace with actual output'),
},
})
export default class AnalyzeTextJob extends JobContext {
async execute(input: { value: string }) {
// Full SDK access: this.scope.tools, this.scope.agents, etc.
return { result: `Processed: ${input.value}` };
}
}
Example
# Add to a specific subdirectory
nx g @frontmcp/nx:job send-notification --project crm --directory notifications
# Creates: src/jobs/notifications/send-notification.job.ts
After generating, update the app to register the job:
import AnalyzeTextJob from './jobs/analyze-text.job';
@App({
id: 'text-processing',
jobs: [AnalyzeTextJob],
})
class TextProcessingApp {}