Getting Started
Last modified: 16 March 2025Run your first code samples with Elide
Before you start
You'll need an installed copy of Elide. Follow the Installation guide to obtain a copy of Elide.
Running some code
Elide can accept a raw string of code or a file to run in any supported language. Best attempts are made to detect the primary language via the source file's extension (.js
will load a JS VM, .py
a Python VM, etc.).
Let's run a snippet of JavaScript
elide run --javascript -c "console.log('Hello!');"
Hello! Exiting session. Have a great day! 👋
Now let's do the same thing, but with some Python
elide run --python -c 'print("Hello!")'
Hello! Exiting session. Have a great day! 👋
note
Language Selection
Elide can run multiple languages at once. Your primary language selection only affects how your entrypoint script is processed; you can run an entrypoint in Python that uses code in JavaScript, for example.
Polyglot terminal
Elide can run an interactive read-eval-print-loop (REPL) session for each supported language. There are several ways to kick one off, the easiest being:
Open a JavaScript console:
elide
Open a Python console:
elide python
note
Exiting the REPL
You can use Ctrl+D or Ctrl+C twice to exit the interactive session.