Skip to content

Weaving prompts and code into structured, resilient patterns that won't unravel under pressure.

License

Notifications You must be signed in to change notification settings

viksit/selvedge

Repository files navigation

Selvedge: A TypeScript DSL for LLM Programming

Selvedge is a functional toolkit for TypeScript developers that makes working with AI language models simpler and more reliable. Instead of wrestling with unpredictable AI responses and complex API calls, Selvedge gives you a clean, consistent way to integrate AI into your applications.

Selvedge is named after the distinctive finished edge on premium denim jeans that prevents fraying. It rethinks how to write computer programs with LLMs in a consistent way

Program through intention, not implementation

Selvedge creates a consistent interface for working with language models, allowing you to:

  • Write specifications that LLMs translate into working code
  • Define typed prompts that generate predictable data structures
  • Compose both into robust processing pipelines

This structured approach eliminates the chaos of prompt engineering and the tedium of boilerplate code. You focus on what you want to accomplish, and Selvedge creates the bridge between your intentions and executable solutions.

See examples/ for how to get started.


## Installation
```bash
npm install selvedge
# or
yarn add selvedge
# or 
bun add selvedge

About

Weaving prompts and code into structured, resilient patterns that won't unravel under pressure.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published