Retour au classement

live-codes/livecodes

TypeScriptlivecodes.io

A Code Playground That Just Works!

javascripttypescriptplaygroundmonaco-editorprettiercodeprogramming-languageseditorlivelivecodeshacktoberfest
Croissance des étoiles
Étoiles
1.5k
Forks
258
Croissance hebdomadaire
Issues
25
5001k
janv. 2021nov. 2022sept. 2024juil. 2026
Artefactsnpmnpm install livecodes
README

LiveCodes

A Code Playground That Just Works!

A feature-rich, open-source, client-side code playground for React, Vue, Svelte, Solid, Typescript, Python, Go, Ruby, PHP and 90+ languages/frameworks.

LiveCodes: uptime status LiveCodes: app version LiveCodes: npm version LiveCodes: npm downloads LiveCodes: jsdelivr downloads LiveCodes: languages LiveCodes: docs LiveCodes: llms.txt LiveCodes: llms-full.txt Codacy Badge Lokalise: translated Lokalise: UI languages license - MIT LiveCodes: GitHub repo LiveCodes: GitHub repo Follow us on X (formerly Twitter)

Try it now on livecodes.io

Documentations

What makes LiveCodes different?

LiveCodes list of languages screenshot

A Code Playground That Just Works!

  • No servers to configure (or pay for!)
  • No databases to maintain (or pay for!)
  • No installs
  • No configuration files
  • No build steps
  • No subscription fees (free and open-source)
  • No account required *
  • No limits for usage (unlimited private projects)
  • 90+ languages/frameworks/processors
  • Large set of features and integrations
  • Import code from a wide variety of sources
  • Use modules from npm, deno.land/x, jsr, GitHub, and others
  • Easily embed it in your web pages
  • It runs in the browser (client-side)

* GitHub account is required only for features that use GitHub Integration.

Quick Start

Standalone App

  1. Go to livecodes.io

... and enjoy all the features!

Embedded Playground

Add this code to your page:

<div id="container"></div>
<script type="module">
  import { createPlayground } from 'https://cdn.jsdelivr.net/npm/livecodes';

  createPlayground('#container', {
    params: {
      markdown: '# Hello LiveCodes!',
      css: 'h1 {color: dodgerblue;}',
      js: 'console.log("Hello, from JS!");',
      console: 'open',
    },
  });
</script>

Check documentations for Embedded Playgrounds.

Self-hosted

  1. Download a release

  2. Put it on a static file server (for free!) 1, 2, 3, 4

    Check the guide for self-hosting (including the built-in setup to deploy to GitHub Pages).

... and it just works!

Feature Summary

For details check the full list of features.

LiveCodes SDK

The Software Development Kit (SDK) provides an easy, yet powerful, interface to embed and communicate with LiveCodes playgrounds.

The SDK is provided as a light-weight npm package (or jsr package), that is also available from CDNs. It can be used to create playgrounds with a wide variety of configurations and embed options. In addition, SDK methods allow programmatic communication and control of the playgrounds during runtime.

Installation

npm i livecodes

Usage

Example: (open in LiveCodes)

import { createPlayground } from 'livecodes';

createPlayground('#container', {
  config: {
    markup: {
      language: 'markdown',
      content: '# Hello World!',
    },
  },
  view: 'result',
});

The JavaScript SDK is framework/library agnostic. However, wrapper components are also provided for React, Vue, Svelte, Solid, Preact and web components. TypeScript support provides type-safety and a great developer experience.

React SDK example: (open in LiveCodes)

import LiveCodes from 'livecodes/react';

const config = {
  markup: {
    language: 'markdown',
    content: '# Hello World!',
  },
};
const Playground = () => <LiveCodes config={config} />;
export default Playground;

Vue SDK example: (open in LiveCodes)

<script setup>
  import LiveCodes from 'livecodes/vue';

  const config = {
    markup: {
      language: 'markdown',
      content: '# Hello World!',
    },
  };
</script>

<template>
  <LiveCodes :config="config" />
</template>

In addition, the SDK allows creating links to playgrounds:

import { getPlaygroundUrl } from 'livecodes';

const url = getPlaygroundUrl({
  config: {
    markup: {
      language: 'markdown',
      content: '# Hello World!',
    },
  },
});

// this URL can be shared
console.log(url);

See SDK docs for more details.

Documentations

Comprehensive documentations for features, getting started, configuration and SDK are available on:

https://livecodes.io/docs/

The documentations include demos, code samples, screenshots, Storybook and TypeScript types.

See below for documentations for contributors and AI models.

Updates

Keep up with the latest changes:

Feedback

We welcome feedback!

Please start a new issue or discussion.

For security reports please refer to SECURITY.md.

You may also reach out to us using the contact form.

Contribution

Contributions are welcome and highly appreciated.

A huge shout-out to our wonderful contributors! Your hard work makes all the difference!

Please refer to the contribution guide and system documentation.

For AI Agents

llms.txt

For developers working with AI agents and language models, we provide specialized documentation files following the llms.txt specification:

  • llms.txt - Concise documentation optimized for LLM context windows
  • llms-full.txt - Comprehensive documentation including all referenced URLs

These files provide LLM-friendly content in a standardized format, helping language models understand and work with LiveCodes documentation. The format is designed to be both human and LLM readable.

Intent Skills

If you use an AI coding agent, run:

npx @tanstack/intent@latest install

This loads the Intent skills for LiveCodes SDK. See .agents/skills/livecodes/SKILL.md for the skill index.

System Documentation

For internal architecture and system documentation, see docs/docs/contribution/.

Credits

LiveCodes uses services that are generously provided by:

Cloudflare Pages

jsDelivr

esm.sh

unpkg

DigitalOcean

bundlejs

dpaste

GitHub

Netlify

SonarCloud

Codacy

BrowserStack

Lokalise

Third Party Packages

Packages used by LiveCodes and their licenses are listed here.

License

MIT License © Hatem Hosny

LiveCodes is free and open-source. The app does not contain ads or require subscription. It allows unlimited usage without any restrictions.

By sponsoring LiveCodes, you will be supporting the ongoing development and maintenance of the project, as well as helping to ensure that it remains a valuable resource for the developer community.

Please consider becoming a sponsor.

Dépôts similaires
freeCodeCamp/freeCodeCamp

freeCodeCamp.org's open-source codebase and curriculum. Learn math, programming, and computer science for free.

TypeScriptnpmBSD 3-Clause "New" or "Revised" Licenselearn-to-codenonprofits
contribute.freecodecamp.org
452.2k45.6k
practical-tutorials/project-based-learning

Curated list of project-based tutorials

PythonPyPIMIT Licensetutorialproject
274.4k35.4k
react/react

The library for web and native user interfaces.

JavaScriptnpmMIT Licensejavascriptreact
react.dev
246.6k51.3k
facebook/react

The library for web and native user interfaces.

JavaScriptnpmMIT Licensejavascriptreact
react.dev
233k47.8k
vuejs/vue

This is the repo for Vue 2. For Vue 3, go to https://github.com/vuejs/core

TypeScriptnpmMIT Licensevuejavascript
v2.vuejs.org
210.1k33.8k
trekhleb/javascript-algorithms

📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings

JavaScriptnpmMIT Licensejavascriptalgorithms
196.3k31k
getify/You-Dont-Know-JS

A book series (2 published editions) on the JS language.

Otherbook-seriesjavascript
amazon.com/dp/B085XXCJ7X
184.6k33.5k
twbs/bootstrap

The most popular HTML, CSS, and JavaScript framework for developing responsive, mobile first projects on the web.

MDXMIT Licensecssbootstrap
getbootstrap.com
174.5k78.7k
airbnb/javascript

JavaScript Style Guide

JavaScriptnpmMIT Licensejavascripteslint
148.1k26.6k
Chalarangelo/30-seconds-of-code

Coding articles to level up your development skills

JavaScriptnpmCreative Commons Attribution 4.0 Internationalawesome-listjavascript
30secondsofcode.org
128.4k12.5k
electron/electron

:electron: Build cross-platform desktop apps with JavaScript, HTML, and CSS

C++MIT Licenseelectronjavascript
electronjs.org
122.1k17.3k
nodejs/node

Node.js JavaScript runtime ✨🐢🚀✨

JavaScriptnpmOthernodejsjavascript
nodejs.org
118.3k36.2k