New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

@modelschemas/codegen

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@modelschemas/codegen

Pull core for modelschemas build-time schema/type generation: selection grammar, conditional fetch, lockfile manifest, file writer.

latest
Source
npmnpm
Version
0.2.2
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

@modelschemas/codegen

Pull core for modelschemas build-time schema and type generation: selection grammar (provider[/endpointGlob][#request|#response]), conditional fetch (ETag/304), the .manifest.json lockfile, atomic file writes, offline build verification, and content-hash integrity checks.

Ships built ESM (.js + .d.ts). Node loads it with no TypeScript loader. Used by @modelschemas/vite and the modelschemas CLI.

bun add @modelschemas/codegen
import { pull, verify, verifyIntegrity, checkUpdates } from '@modelschemas/codegen'

await pull({
  outDir: 'src/modelschemas',
  selections: ['anthropic/v1/messages#request', 'openai/chat/*'],
})

// offline (production builds): files match the manifest
const files = await verify({ outDir: 'src/modelschemas', selections: [...] })

// online: re-fetch each pinned ?version=<contentHash>, re-hash locally
const integrity = await verifyIntegrity({ outDir: 'src/modelschemas', selections: [] })

Docs: modelschemas.com/docs · Source: github.com/modelschemas/modelschemas

Keywords

ai

FAQs

Package last updated on 27 Oct 2026

Related posts