designed to simplify academic communication inside Discord, expresso currently compiles typst and LaTeX. in the near future, i would love to extend the support of other useful tools.
expresso uses LaTeX and Typst, turing-complete languages with compilers that will, by design, read files, execute macros, and can even sometimes run shell commands. the bot feeds user input directly into these compilers, which is why sandboxing (filesystem isolation, disabled shell escape or process timeouts) is critical and why using the provided Docker image is strongly recommended.
if you find any security issues, please open an issue or a pull request.
you need to create a Discord bot using the Discord Developer Portal. you will need to retrieve the bot token and its client ID. you will also need to get the guild ID of the server you want to add the bot to. consider this server as your "test server".
please make sure to have docker and docker-compose installed.
download the docker-compose.yml file, move it inside a folder you like and fill in your DISCORD_TOKEN, CLIENT_ID and GUILD_ID inside of it.
to deploy the slash commands, which is only needed for the first time, run:
docker compose run --rm expresso node dist/deploy-commands.jsthen, to start the bot, run:
docker compose up -dthis is not recommended if you don't know what you're doing. you will need to have a LaTeX distribution with dvipng, npm & node, and ImageMagick installed on your system. you will also need a .env file with your DISCORD_TOKEN, CLIENT_ID and GUILD_ID.
you will encounter security issues depending on your versions.
git clone https://github.com/Azkun/expresso.git
cd expresso
npm install
npm run build
npm run deploy
npm startyou can freely contribute to the bot if you want to. expresso need more commands and customisation options. if it's your first time, don't be shy, i'm here to help and we'll review the code together. please follow conventional commits.
- typst-raster : allows to compile typst code to an image. very useful because it doesn't need external dependencies and it works like a charm.
this project is licensed under the mit license. it is free to use, modify, and distribute as long as you give credit to the original author.
