Skip to main content

AI Code Assistant 🪄

LiveCodes supports AI-powered code completion, totally for free with no account or API token required, using Codeium, the ultrafast Copilot alternative. This can be easily enabled from the UI (as easy as flipping a switch!)

The large generative machine learning model is capable of understanding the context of your code and comments (across the 3 code editors) in order to generate suggestions on what you might want to type next.

It has a wide range of language support, and it works everywhere (in the standalone app, embedded playgrounds and self-hosted apps).

Currently, only Monaco editor is supported. Wider editor support is planned.

Powered by:

Codeium logo.

Examples:

JavaScript:

Python:

Instructions

The AI code assistant can be enabled from:

UI

The editor settings screen (App menu → Editor Settings → Enable AI Code Assistant).

LiveCodes Editor Settings

Note

When set from the UI, this configuration is saved locally to user settings and is remembered across sessions.

Configuration

Alternatively, this can be enabled (only for the current session) using the enableAI property in the configuration object. This can be used to enable the AI code assistant in embedded playgrounds.

Example:

import { createPlayground } from 'livecodes';

createPlayground('#container', {
config: {
enableAI: true,
},
});

Also this can be enabled using query params (e.g. https://livecodes.io/?enableAI).

Note

Please note that when using Codeium AI assistant, your code is sent to their servers for code completion. However, your code is not used for training their model. Check Codeium FAQ and privacy policy for more details.