Genocide Watch
codeku GitHub Stargazers codeku License PCRF

codeku is a lightweight, plug-and-play, embeddable code execution widget for the web.

Quick Start

To get started, embed the URL https://alvii147.github.io/codeku/embed in an iframe:

<iframe
    src="https://alvii147.github.io/codeku/embed?language=python"
    width="100%"
    height="400"
    frameborder="0"
    allowfullscreen
>
</iframe>

The embedded widget will look like this:

Languages

codeku currently supports the following languages:

C C++ Go Java JavaScript Python PHP Rust TypeScript

Parameters

You can customize codeku using the following query parameters:

Parameter Description Options Example
language Default programming language. c, cpp, go, java, javascript, python, php, rust, typescript language=python
language_options Comma-separated list of programming languages to include in dropdown. language=go,python,rust
code_{language} Initial code set for a language, url encoded. code_python=print(42)
editor_theme Theme to use for editor. light, dark editor_theme=light

Examples

Check out the example blog post on Defying Array Indexing Convention.