dewedeth / glass

A declarative framework for language models. Works with Python, TypeScript, and JavaScript

Home Page:https://docs.glass

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

glass

main

ALERT: GLASS IS IN ALPHA AND IS SUBJECT TO CHANGE.

Getting started? Head to docs.glass for all of our documentation.

Want some examples? Check out the examples.

Download the VSCode extension to quickly run and iterate on Glass files.

If you are using Glass, have questions, or want to stay up to date, feel free to join our Discord.

Apps and Packages

This project uses npm workspaces and Turborepo.

apps/

  • vscode-glass: VS Code extension for Glass
  • platform.glass: a Next.js app serving platform.glass
  • docs.glass: a Next.js/Nextra app serving docs.glass
  • demo: examples of using Glass, some of these are in active development and may not currently work

packages/

  • glassc: the Glass compiler (generates .ts, .js, .py output from Glass files)
  • glasslib: Glass client library (runtime for executing Glass compiler generated code)
  • language-server: LSP server providing Glass intellisense
  • rig: a React app for the VS Code Glass playground webview
  • ui: a React component library shared by web applications
  • util: random utilities shared by packages/apps
  • eslint-config-custom: eslint configurations (includes eslint-config-next and eslint-config-prettier)
  • tsconfig: tsconfig.jsons used throughout the monorepo

Development

npm ci
npm run build

Usually you'll want to launch the VSCode extension in development mode. Use the Run Extension launch configuration (F5 keybinding). This will automatically run the build step if necessary.

Tests

To run all tests:

npm run test

Watch mode

Several packages contain tests that can be run in watch mode: packages/glasslib, packages/glassc, packages/util

cd $package
npm run test:watch

For packages/glasslib only, the test:watch mode requires you also build in watch mode:

cd packages/glasslib
npm run dev

License

MIT © Glass Platform

About

A declarative framework for language models. Works with Python, TypeScript, and JavaScript

https://docs.glass

License:MIT License


Languages

Language:TypeScript 95.9%Language:JavaScript 1.7%Language:Python 1.4%Language:CSS 0.6%Language:Shell 0.5%