From 75383428c9b36da4cfecc7f543c9f96d5eed2747 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Bo=C4=8Fa?= Date: Thu, 18 Apr 2024 15:10:33 +0200 Subject: [PATCH] Update README.md --- README.md | 55 ++++++++++++++++++++++++++++--------------------------- 1 file changed, 28 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md index 820b9c3..bd76cb1 100644 --- a/README.md +++ b/README.md @@ -23,25 +23,6 @@ agent snowflake 200 { } ``` -## Run Using Docker -To run AgentLang interpreter using Docker, run the following commands in your terminal. -```bash -# build the image -docker build -t agent-lang-interpreter-image -# run the image -docker run -it agent-lang-interpreter-image -``` - -## Installation -To integrate the AgentLang interpreter into your TypeScript project, add it as a git submodule and install all the necessary packages. -```bash -# add the submodule to your project -git submodule add https://github.com/TomasBoda/agent-lang-interpreter.git -# install necessary packages -cd agent-lang-interpreter -npm install -``` - ## Usage Below is an example usage of the AgentLang interpreter in a TypeScript project. ```ts @@ -62,7 +43,34 @@ interpreter.get(sourceCode, config).subscribe((output: InterpreterOutput) => { }); ``` -## Building Binary Executables +## Run Locally +To run an example program of the AgentLang interpreter, run the following command in your terminal. +```bash +npm run start +``` +The example program with the example source code from the `./example` folder will compile and run. + +## Run Using Docker +To run AgentLang interpreter using Docker, run the following commands in your terminal. +```bash +# build the image +docker build -t agent-lang-interpreter-image +# run the image +docker run -it agent-lang-interpreter-image +``` + +## Integrate into TypeScript Project +To integrate the AgentLang interpreter into your TypeScript project, add it as a git submodule and install all the necessary packages. +```bash +# add the submodule to your project +git submodule add https://github.com/TomasBoda/agent-lang-interpreter.git +# checkout the submodule +cd agent-lang-interpreter +# install necessary packages +npm install +``` + +## Build Binary Executables AgentLang interpreter can also be built as a binary executable runnable on various platforms. To build the binary executables of the interpreter, run the following in the project root. ```bash npm run build-all @@ -77,13 +85,6 @@ The script will build executable binaries for supported platforms into the `./pr ``` The interpreter will run the AgentLang code from the `source-code.txt` file and store the output of each step into the `output.json` file. -## Running Example Program -To run an example program of the AgentLang interpreter, run the following command in your terminal. -```bash -npm run start -``` -The example program with the example source code from the `./example` folder will compile and run. - ## Tests To run the AgentLang interpreter's unit tests, run the following in the command line: ```bash