Thanks for trying Elide :)
elide --help
elide --version
To see runtime info:
elide info
To run a JavaScript terminal:
elide
Or:
elide repl
Encode some JSON:
JSON.stringify({ x: 5 });
Generate a UUID:
crypto.randomUUID()
Parse a URL and print the host:
new URL("https://google.com").host;
List the machine CPUs
const { cpus } = require("node:os")
cpus()
To run a JavaScript server:
(see server.js
below)
elide serve server.js
To run a Python terminal:
elide repl --python
To see process + .env
environment:
import os; print(os.environ)
Note
Elide isolates host environment, I/O, and other sensitive operations from runtime code by default.
To see all environment, including host env:
elide repl --python --host:allow-env
import os; print(os.environ)
To run a Ruby terminal:
elide repl --ruby
Say hello:
puts "Hello, Elide!"
Install JavaScript packages:
mkdir tmp && cd tmp \
&& echo '{"name":"hello","dependencies":{"glob":"10.4.2"}}' > package.json \
&& elide install
This embeds Orogene.
Note
Package installation is only available for JavaScript for now, but will soon include Python, Ruby, and JVM.
Lint Python files:
mkdir tmp && cd tmp \
&& echo 'invalid lol' > sample.py \
&& touch requirements.txt \
&& elide check sample.py
This embeds Ruff.
Note
Linting/checking/formatting will soon ship in JavaScript, TypeScript, and Python, with Ruby, Kotlin, and Java to follow. Elide detects the languages in use for a project when files like package.json
or requirements.txt
are present.
macOS JS server benchmarks are run with:
hyperfine --warmup 1000 --runs 1000 --shell none "curl http://localhost:3000/plaintext" \
&& oha -z 30s http://localhost:3000/plaintext