LivebookTools
by thmsmlr
Livebook Tools is a CLI tool designed to enhance your workflow with `.livemd` files. It offers features like syncing with code editors, a model context protocol server, and the ability to run Livebooks from the command line.
Last updated: N/A
What is LivebookTools?
Livebook Tools is a command-line interface (CLI) tool that provides superpowers for working with Livebook's .livemd
files. It allows you to integrate Livebook with external code editors, connect AI coding agents, and run Livebooks as scripts.
How to use LivebookTools?
First, install Livebook Tools using mix escript.install github thmsmlr/livebook_tools
. Then, configure your environment with LIVEBOOK_NODE
and LIVEBOOK_COOKIE
to connect to a running Livebook server. For MCP server setup, refer to the Cursor MCP docs and configure Cursor to connect via the command. You can then use the livebook_tools run <file>
command to execute Livebooks from the command line.
Key features of LivebookTools
BYOE (Bring Your Own Editor) - Sync .livemd files with code editors
MCP Server - Connect AI coding agents to Livebook sessions
Run Livebooks from the CLI - Convert and run .livemd files as Elixir scripts
Easy installation via
mix escript.install
Use cases of LivebookTools
Editing Livebook files in AI-powered code editors
Connecting AI coding agents like Cursor to Livebook
Automating Livebook execution as cron jobs
Customizing code execution based on environment (Livebook vs. CLI)
FAQ from LivebookTools
How do I install Livebook Tools?
How do I install Livebook Tools?
Use the command mix escript.install github thmsmlr/livebook_tools
.
How do I connect to a running Livebook server?
How do I connect to a running Livebook server?
Set the LIVEBOOK_NODE
and LIVEBOOK_COOKIE
environment variables.
What is the MCP Server?
What is the MCP Server?
It's a model context protocol server for connecting AI coding agents to your Livebook sessions.
Can I use Livebook Tools with Livebook Desktop?
Can I use Livebook Tools with Livebook Desktop?
Yes, you may need to add the environment variables to the ~/.livebookdesktop.sh
file.
How can I detect if my code is running in Livebook or on the command line?
How can I detect if my code is running in Livebook or on the command line?
Use the provided code snippets to check the __ENV__.file
and System.argv()
.