Features β’ Usage β’ Folder Structure β’ API Documentation
Note: This is an early stage proof of concept (PoC). It may be buggy or limited. The goal is to demonstrate the possibilities and gauge interest.
- C
- C#
- C++
- Zig
- Lua
- Ruby
- Rust
- Julia
- Python
- Golang
- Kotlin
- Javascript
- Typescript
- Support for packages/dependencies β³
- Support gists that are not truncated
- Add expiry to supported languages cache
You can use the API directly to run arbitrary code snippets. See the API docs below for more details.
The browser extension is now live on the Chrome Web Store! π
You can install it here: https://chrome.google.com/webstore/detail/mbgnplbkkklomfbfcbeeanmmnabmmlbk
To load the extension manually for development:
- Clone this repo
- Go to
chrome://extensions
in your browser - Enable "Developer mode"
- Click "Load unpacked" and select the extension directory
- Enjoy! π
.
βββ api (Golang API)
βββ docker-daemon (Docker Engine API)
βββ extension (Chrome Extension)
Execute an arbitrary code snippet.
POST /api/run
curl --location '/api/run' \
--header 'Content-Type: application/json' \
--data '{
"content": "package main\nimport \"fmt\"\n\nfunc main() {\n\rfmt.Println(\"Hello, World!\")\n}"
"language": "golang"
}'
{
"code": 200,
"data": {
"ID": "gist_kQVHDPvYqBeYMMKdnRDaLm",
"Hash": "91548d9381c30d715ae7e6ccb7aec0907599c2008497ab289c3b9d970fbf4589",
"Result": "2024-01-07T09:09:51.636886900Z Hello, World!\r\n",
"Language": "golang",
"CreatedAt": "2024-01-07T10:09:53.012498+01:00",
},
"message": "gist ran successfully"
}
{
"code": 500,
"message": "Oops! Something went wrong on our end"
}
Retrieves total amount of code snippets executed.
GET /api/stats
curl --location '/api/stats'
{
"code": 200,
"data": {
"count": 1
},
"message": "Gists count returned successfully"
}
Retrieves an array of languages that support code execution.
GET /api/languages
curl --location '/api/languages'
{
"code": 200,
"data": {
"golang": ".go",
"javascript": ".js",
"julia": ".jl",
"kotlin": ".kt",
"lua": ".lua",
"python": ".py",
"ruby": ".rb",
"rust": ".rs",
"typescript": ".ts"
},
"message": "Supported languages returned successfully"
}