@forge-clients/generator
v0.2.1
Published
CLI and library for generating @forge-clients Jira and Confluence clients from Atlassian OpenAPI specs
Readme
@forge-clients/generator
CLI and programmatic library for generating @forge-clients/jira and @forge-clients/confluence
from the cleaned Atlassian OpenAPI specifications in @forge-clients/specs.
CLI Usage
# Install globally
npm install -g @forge-clients/generator
# Or use via npx
npx @forge-clients/generator generate
# Update specs from Atlassian and regenerate
npx @forge-clients/generator update-specs
npx @forge-clients/generator generateCLI Commands
generate
Generates TypeScript client code from the cleaned OpenAPI specs.
forge-clients-gen generate [options]
Options:
--spec <spec> Which spec to generate: jira-v3, jira-v2, confluence-v2,
confluence-v1, jira-software, jira-sm, all (default: all)
--out <dir> Output directory (overrides defaults)update-specs
Downloads the latest Atlassian OpenAPI specs, applies the post-processing
pipeline, and writes cleaned specs to @forge-clients/specs.
forge-clients-gen update-specs [options]
Options:
--dry-run Show what would change without writing filesProgrammatic API
import type { GeneratorOptions } from '@forge-clients/generator';
const options: GeneratorOptions = {
specs: ['jira-v3', 'confluence-v2'],
format: true,
lint: true,
};
// Implementation pendingArchitecture
The generator consists of:
- Spec Pipeline (
src/pipeline/) — Downloads, validates, transforms, and patches the raw Atlassian specs - Intermediate Representation (
src/ir/) — Converts the cleaned OpenAPI object into a normalised IR - Emitters (
src/emitters/) — Converts the IR into TypeScript source files usingts-morph
See ai-planning/ for the full design proposal.
