skills$openclaw/JSON to TypeScript - Interface Generator
lxgicstudios3.2kโ˜…

by lxgicstudios

JSON to TypeScript - Interface Generator โ€“ OpenClaw Skill

JSON to TypeScript - Interface Generator is an OpenClaw Skills integration for coding workflows. Generate TypeScript interfaces from JSON data or API responses. Auto-type your APIs instantly. Free CLI tool for TypeScript developers.

3.2k stars1.7k forksSecurity L1
Updated Feb 7, 2026Created Feb 7, 2026coding

Skill Snapshot

nameJSON to TypeScript - Interface Generator
descriptionGenerate TypeScript interfaces from JSON data or API responses. Auto-type your APIs instantly. Free CLI tool for TypeScript developers. OpenClaw Skills integration.
ownerlxgicstudios
repositorylxgicstudios/type-gen
languageMarkdown
licenseMIT
topics
securityL1
installopenclaw add @lxgicstudios/type-gen
last updatedFeb 7, 2026

Maintainer

lxgicstudios

lxgicstudios

Maintains JSON to TypeScript - Interface Generator in the OpenClaw Skills directory.

View GitHub profile
File Explorer
2 files
.
_meta.json
482 B
SKILL.md
2.0 KB
SKILL.md

name: JSON to TypeScript - Interface Generator description: Generate TypeScript interfaces from JSON data or API responses. Auto-type your APIs instantly. Free CLI tool for TypeScript developers.

JSON to TypeScript

Generate TypeScript interfaces from JSON. Stop writing types by hand.

Installation

npm install -g @lxgicstudios/json-to-ts

Commands

From File

npx @lxgicstudios/json-to-ts data.json
npx @lxgicstudios/json-to-ts response.json -n User

From URL

npx @lxgicstudios/json-to-ts https://api.example.com/users -n User

From Pipe

curl https://api.example.com/data | npx @lxgicstudios/json-to-ts -n ApiResponse

Output to File

npx @lxgicstudios/json-to-ts api.json -o src/types/api.ts

Example

Input JSON:

{
  "id": 1,
  "name": "John",
  "email": "john@example.com",
  "address": { "city": "NYC" },
  "tags": ["dev", "ts"]
}

Output:

export interface Address {
  city: string;
}

export interface Root {
  id: number;
  name: string;
  email: string;
  address: Address;
  tags: string[];
}

Options

OptionDescription
-n, --nameRoot interface name (default: Root)
-o, --outputWrite to file
-t, --typeUse type instead of interface
--optionalMake all properties optional
--no-exportDon't add export keyword

Features

  • Nested objects become separate interfaces
  • Arrays properly typed
  • Mixed arrays become union types
  • Fetches directly from URLs
  • Handles empty arrays as unknown[]

Common Use Cases

Type an API response:

curl https://api.github.com/users/octocat | npx @lxgicstudios/json-to-ts -n GitHubUser

Generate types for project:

npx @lxgicstudios/json-to-ts sample-response.json -o src/types/api.ts -n ApiResponse

Built by LXGIC Studios

๐Ÿ”— GitHub ยท Twitter

README.md

No README available.

Permissions & Security

Security level L1: Low-risk skills with minimal permissions. Review inputs and outputs before running in production.

Requirements

  • OpenClaw CLI installed and configured.
  • Language: Markdown
  • License: MIT
  • Topics:

FAQ

How do I install JSON to TypeScript - Interface Generator?

Run openclaw add @lxgicstudios/type-gen in your terminal. This installs JSON to TypeScript - Interface Generator into your OpenClaw Skills catalog.

Does this skill run locally or in the cloud?

OpenClaw Skills execute locally by default. Review the SKILL.md and permissions before running any skill.

Where can I verify the source code?

The source repository is available at https://github.com/openclaw/skills/tree/main/skills/lxgicstudios/type-gen. Review commits and README documentation before installing.