All Projects → livebook-dev → livebook

livebook-dev / livebook

Licence: Apache-2.0 license
Automate code & data workflows with interactive Elixir notebooks

Programming Languages

elixir
2628 projects
javascript
184084 projects - #8 most used programming language
HTML
75241 projects
CSS
56736 projects
swift
15916 projects
C#
18002 projects

Projects that are alternatives of or similar to livebook

uncharted
No description or website provided.
Stars: ✭ 31 (-99.09%)
Mutual labels:  charts, phoenix, liveview
mfpb
My Frugal PostBin
Stars: ✭ 26 (-99.24%)
Mutual labels:  phoenix, liveview
google scraper live view
Application for extracting large amounts of data from the Google search results page
Stars: ✭ 17 (-99.5%)
Mutual labels:  phoenix, liveview
king of tokyo
👑 King of Tokyo Multiplayer Board Game using Phoenix LiveView
Stars: ✭ 25 (-99.27%)
Mutual labels:  phoenix, liveview
Xaos
Real-time interactive fractal zoomer
Stars: ✭ 239 (-92.97%)
Mutual labels:  math, realtime
ambry
Self-hosted audiobook streaming server
Stars: ✭ 38 (-98.88%)
Mutual labels:  phoenix, liveview
ecto nested changeset
Helpers for manipulating nested Ecto changesets
Stars: ✭ 23 (-99.32%)
Mutual labels:  phoenix, liveview
kandesk
Simple Kanban application written in elixir using phoenix liveview
Stars: ✭ 157 (-95.39%)
Mutual labels:  phoenix, liveview
Loopa News
Realtime social news app developed from scratch with Elixir, Phoenix, Vue and Vuex
Stars: ✭ 308 (-90.95%)
Mutual labels:  phoenix, realtime
Phoenix live dashboard
Realtime dashboard with metrics, request logging, plus storage, OS and VM insights
Stars: ✭ 1,657 (-51.29%)
Mutual labels:  phoenix, liveview
Realtime
Listen to your to PostgreSQL database in realtime via websockets. Built with Elixir.
Stars: ✭ 4,278 (+25.75%)
Mutual labels:  phoenix, realtime
Mathdown
Collaborative markdown with math
Stars: ✭ 410 (-87.95%)
Mutual labels:  math, collaborative
Next Todos
200 lines realtime todos app powered by next.js, preact, jet, redux and now
Stars: ✭ 117 (-96.56%)
Mutual labels:  realtime, collaborative
shlinked
An open-source satirical social network. shlinkedin.com
Stars: ✭ 287 (-91.56%)
Mutual labels:  phoenix, liveview
phoenix live controller
Controller-style abstraction for building multi-action live views on top of Phoenix.LiveView
Stars: ✭ 31 (-99.09%)
Mutual labels:  phoenix, liveview
Eon
An open-source chart and map framework for realtime data.
Stars: ✭ 875 (-74.28%)
Mutual labels:  charts, realtime
Analytics
Simple, open-source, lightweight (< 1 KB) and privacy-friendly web analytics alternative to Google Analytics.
Stars: ✭ 9,469 (+178.34%)
Mutual labels:  charts, phoenix
FirebaseAI-Android-Chat-App
A simple firebase enabled chat app. SMS & Email Password Authentication enabled.
Stars: ✭ 38 (-98.88%)
Mutual labels:  charts
phoenix assets webpack
Asset Pipeline with Webpack on Phoenix
Stars: ✭ 52 (-98.47%)
Mutual labels:  phoenix
sublime
Repository for the Tandem Sublime Plugin
Stars: ✭ 22 (-99.35%)
Mutual labels:  collaborative

Livebook

Website Version

Livebook is a web application for writing interactive and collaborative code notebooks. It features:

  • Code notebooks with Markdown support and Code cells where Elixir code is evaluated on demand.

  • Rich code editor through Monaco: with support for autocompletion, inline documentation, code formatting, etc.

  • Interactive results via Kino: display Vega-Lite charts, tables, maps, and more.

  • Automation: use Smart cells to perform high-level tasks and write notebooks faster than ever. Query databases, plot charts, build maps, and more directly from Livebook's UI.

  • Reproducible: Livebook ensures your code runs in a predictable order, all the way down to package management. It also tracks your notebook state, annotating which parts are stale.

  • Collaboration: multiple users can work on the same notebook at once, no additional setup required.

  • Decentralized: Livebook is open-source and you can run it anywhere. The "Run in Livebook" badge makes it easy to import any Livebook into your own Livebook.

  • Versionable: notebooks are stored in the .livemd format, which is a subset of Markdown with support for diagrams via Mermaid and for mathematical formulas via KaTex. .livemd files can be shared and play well with version control.

  • Custom runtimes: when executing Elixir code, you can either start a fresh Elixir instance, connect to an existing node, or run it inside an existing Elixir project, with access to all of its modules and dependencies. This means Livebook can be a great tool to introspect and document existing projects too.

Getting started

Head out to the Install section of Livebook's website to get started. Once Livebook is up and running on your machine, visit the "Learn" section with introductory guides and documentation on several Livebook features. Here is a sneak peak of the "Welcome to Livebook" guide:

Screenshot

For screencasts and news, check out news.livebook.dev.

Installation

We provide several methods for running Livebook, pick the one that best fits your use case.

On the cloud

Desktop app

Docker

Running Livebook using Docker is a great option for cloud deployments and also for local usage in case you don't have Elixir installed.

# Running with the default configuration
docker run -p 8080:8080 -p 8081:8081 --pull always ghcr.io/livebook-dev/livebook

# In order to access and save notebooks directly to your machine
# you can mount a local directory into the container.
# Make sure to specify the user with "-u $(id -u):$(id -g)"
# so that the created files have proper permissions
docker run -p 8080:8080 -p 8081:8081 --pull always -u $(id -u):$(id -g) -v $(pwd):/data ghcr.io/livebook-dev/livebook

# You can configure Livebook using environment variables,
# for all options see the dedicated "Environment variables" section below
docker run -p 8080:8080 -p 8081:8081 --pull always -e LIVEBOOK_PASSWORD="securesecret" ghcr.io/livebook-dev/livebook

For CUDA support, see images with the "cuda" tag.

To try out features from the main branch you can alternatively use the ghcr.io/livebook-dev/livebook:edge image. See Livebook images.

Embedded devices

If you want to run Livebook on embedded devices, such as Raspberry Pi, BeagleBone, etc., check out our Livebook firmware built with Nerves.

Direct installation with Elixir

You can run Livebook on your own machine using just Elixir. You will need Elixir v1.13 or later. Livebook also requires the following Erlang applications: inets, os_mon, runtime_tools, ssl and xmerl. Those applications come with most Erlang distributions but certain package managers may split them apart. For example, on Ubuntu, these Erlang applications can be installed as follows:

sudo apt install erlang-inets erlang-os-mon erlang-runtime-tools erlang-ssl erlang-xmerl erlang-dev erlang-parsetools

Escript

Running Livebook using Escript makes for a very convenient option for local usage and provides easy configuration via CLI options.

mix do local.rebar --force, local.hex --force
mix escript.install hex livebook

# Start the Livebook server
livebook server

# See all the configuration options
livebook server --help

After you install the escript, make sure you add the directory where Elixir keeps escripts to your $PATH. If you installed Elixir with asdf, you'll need to run asdf reshim elixir once the escript is built.

To try out features from the main branch you can alternatively install the escript directly from GitHub like this:

mix escript.install github livebook-dev/livebook

Mix

You can run latest Livebook directly with Mix.

git clone https://github.com/livebook-dev/livebook.git
cd livebook
mix deps.get --only prod

# Run the Livebook server
MIX_ENV=prod mix phx.server

Security considerations

Livebook is built to document and execute code. Anyone with access to a Livebook instance will be able to access any file and execute any code in the machine Livebook is running.

For this reason, Livebook only binds to the 127.0.0.1, allowing access to happen only within the current machine. When running Livebook in the production environment - the recommended environment - we also generate a token on initialization and we only allow access to the Livebook if said token is supplied as part of the URL.

Environment variables

The following environment variables configure Livebook:

  • LIVEBOOK_APP_SERVICE_NAME - sets the application name used by the cloud provider to aid debugging.

  • LIVEBOOK_APP_SERVICE_URL - sets the application url to manage this Livebook instance within the cloud provider platform.

  • LIVEBOOK_APPS_PATH - the directory with app notebooks. When set, the apps are deployed on Livebook startup with the persisted settings. Password-protected notebooks will receive a random password, unless LIVEBOOK_APPS_PATH_PASSWORD is set.

  • LIVEBOOK_APPS_PATH_PASSWORD - the password to use for all protected apps deployed from LIVEBOOK_APPS_PATH.

  • LIVEBOOK_BASE_URL_PATH - sets the base url path the web application is served on. Useful when deploying behind a reverse proxy.

  • LIVEBOOK_COOKIE - sets the cookie for running Livebook in a cluster. Defaults to a random string that is generated on boot.

  • LIVEBOOK_DATA_PATH - the directory to store Livebook configuration. Defaults to "livebook" under the default user data directory.

  • LIVEBOOK_DEFAULT_RUNTIME - sets the runtime type that is used by default when none is started explicitly for the given notebook. Must be either "standalone" (Elixir standalone), "attached:NODE:COOKIE" (Attached node) or "embedded" (Embedded). Defaults to "standalone".

  • LIVEBOOK_DISTRIBUTION - sets the node distribution for running Livebook in a cluster. Must be "name" (long names) or "sname" (short names). Note that this sets RELEASE_DISTRIBUTION if present when creating a release. Defaults to "sname".

  • LIVEBOOK_FORCE_SSL_HOST - sets a host to redirect to if the request is not over HTTP. Note it does not apply when accessing Livebook via localhost. Defaults to nil.

  • LIVEBOOK_HOME - sets the home path for the Livebook instance. This is the default path used on file selection screens and others. Defaults to the user's operating system home.

  • LIVEBOOK_IFRAME_PORT - sets the port that Livebook serves iframes at. This is relevant only when running Livebook without TLS. Defaults to 8081.

  • LIVEBOOK_IFRAME_URL - sets the URL that Livebook loads iframes from. By default iframes are loaded from local LIVEBOOK_IFRAME_PORT when accessing Livebook over http:// and from https://livebook.space when accessing over https://.

  • LIVEBOOK_IP - sets the ip address to start the web application on. Must be a valid IPv4 or IPv6 address.

  • LIVEBOOK_NODE - sets the node name for running Livebook in a cluster. Note that this sets RELEASE_NODE if present when creating a release.

  • LIVEBOOK_PASSWORD - sets a password that must be used to access Livebook. Must be at least 12 characters. Defaults to token authentication.

  • LIVEBOOK_PORT - sets the port Livebook runs on. If you want to run multiple instances on the same domain with the same credentials but on different ports, you also need to set LIVEBOOK_SECRET_KEY_BASE. Defaults to 8080. If set to 0, a random port will be picked.

  • LIVEBOOK_SECRET_KEY_BASE - sets a secret key that is used to sign and encrypt the session and other payloads used by Livebook. Must be at least 64 characters long and it can be generated by commands such as: 'openssl rand -base64 48'. Defaults to a random secret on every boot.

  • LIVEBOOK_SHUTDOWN_ENABLED - controls if a shutdown button should be shown in the homepage. Set it to "true" to enable it.

  • LIVEBOOK_TOKEN_ENABLED - controls whether token authentication is enabled. Enabled by default unless LIVEBOOK_PASSWORD is set. Set it to "false" to disable it.

  • LIVEBOOK_UPDATE_INSTRUCTIONS_URL - sets the URL to direct the user to for updating Livebook when a new version becomes available.

  • LIVEBOOK_WITHIN_IFRAME - controls if the application is running inside an iframe. Set it to "true" to enable it. If you do enable it, then the application must run with HTTPS.

  • LIVEBOOK_ALLOW_URI_SCHEMES - sets additional allowed hyperlink schemes to the Markdown content. Livebook sanitizes links in Markdown, allowing only a few standard schemes by default (such as http and https). Set it to a comma-separated list of schemes.

When running Livebook Desktop, Livebook will invoke on boot a file named ~/.livebookdesktop.sh on macOS or %USERPROFILE%\.livebookdesktop.bat on Windows. This file can set environment variables used by Livebook, such as:

  • the PATH environment variable

  • set LIVEBOOK_DISTRIBUTION=name to enable notebooks to communicate with nodes in other machines

  • or to configure the Erlang VM, for instance, by setting ERL_AFLAGS="-proto_dist inet6_tcp" if you need Livebook to run over IPv6

Be careful when modifying said files, Livebook may be unable to start if configured incorrectly.

If running Livebook via the command line, run livebook server --help to see all CLI-specific options.

Development

Livebook is primarily a Phoenix web application and can be setup as such:

git clone https://github.com/livebook-dev/livebook.git
cd livebook
mix dev.setup

# Run the Livebook server
mix phx.server

# Run tests
mix test

# To test escript
MIX_ENV=prod mix escript.build
./livebook server

Livebook Desktop

For macOS, run:

# Test macOS app locally
(cd rel/app/macos && ./run.sh)

# Build macOS installer
.github/scripts/app/build_macos.sh

For Windows, run:

# Test Windows app locally
(cd rel/app/windows && ./run.sh)

# Build Windows installer
.github/scripts/app/build_windows.sh

Sponsors

Livebook development is sponsored by:

Continuous Integration

Our CI server and desktop app for macOS are powered by:

License

Copyright (C) 2021 Dashbit

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].