Skip to content

Use open and free AI models to generate reusable nodes for Minecraft bots.

License

Notifications You must be signed in to change notification settings

SilkePilon/KnowledgeBook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


...

🤖 Use open and free AI models to generate reusable nodes for Minecraft bots.



or donate on PayPal


Node version javascript Hungarian

About • Features • Install

About 📬

Project KnowledgeBook is an open-source Minecraft bot management platform that provides players with a user-friendly web interface to create and control helpful bots. Our goal is to enhance the Minecraft multiplayer experience with powerful automation tools, all at no cost to the player.

AI Stuff More info and docs about the new AI features will be added soon!

...

YouTube Demo

IMAGE ALT TEXT HERE

Getting Started

Check our (soon) Wiki for detailed guides on:

  • Setting up Project Skyview
  • Creating and managing bots
  • Using the item delivery system
  • Accessing the 2D map view
  • Building an custom bot using nodes
  • And more!

Roadmap

  • Add checkboxes to nodes (booleans)
  • Add an way in export and import flows.
  • Auto save flows to browser.

Ready to download flows🕹

Flow name Description Download
Obtain crafting table Collects wood to craft a crafting table and drops it Download

How To Install 📥

Simple 1 liner install

Project KnowledgeBook can be installed using 1 line of code!

Prerequisites

Make sure you have the following installed:

Linux:

curl -sL -o main.zip https://github.com/SilkePilon/KnowledgeBook/archive/refs/heads/main.zip && unzip main.zip && cd KnowledgeBook-main && npm install && npm rebuild && cd .. && rm main.zip && cd KnowledgeBook-main && node main.js

Windows (curl):

curl -sL -o main.zip https://github.com/SilkePilon/KnowledgeBook/archive/refs/heads/main.zip && tar -xf main.zip && cd KnowledgeBook-main && npm install && npm rebuild && cd .. && del main.zip && cd KnowledgeBook-main && node main.js

Windows (PowerShell):

Invoke-WebRequest -Uri "https://github.com/SilkePilon/KnowledgeBook/archive/refs/heads/main.zip" -OutFile "main.zip"; Expand-Archive -Path "main.zip" -DestinationPath .; cd .\KnowledgeBook-main; npm install; npm rebuild; cd ..; Remove-Item -Path "main.zip"; cd .\KnowledgeBook-main; node main.js

MacOS:

curl -sL -o main.zip https://github.com/SilkePilon/KnowledgeBook/archive/refs/heads/main.zip && unzip main.zip && cd KnowledgeBook-main && npm install && npm rebuild && cd .. && rm main.zip && cd KnowledgeBook-main && node main.js

Manual Install

1. Clone the Repository

First, make a local copy of the repository:

git clone https://github.com/SilkePilon/KnowledgeBook.git

Open the cloned repository in your preferred terminal app.

1. Install packages

Assuming you have Node and NPM installed you can run the following commands:

npm install
npm rebuild
node main.js

That's it! You can now open up https://knowledgebook.vercel.app/ and start creating!

Adding Custom Nodes to the Project

...

Welcome to the project! This guide will walk you through the steps to add custom nodes. Follow these instructions to contribute your custom functionality.

1. Clone the Repository

First, make a local copy of the repository:

git clone https://github.com/SilkePilon/KnowledgeBook.git

Open the cloned repository in your preferred IDE.

2. Create a New Node File

Navigate to the flow_functions folder in the project directory. Create a new file for your node with the following naming conventions:

  • Name Format: your_node_name.js
  • Rules:
    • Use lowercase letters
    • Use underscores (_) to separate words
    • Do not include numbers in the file name

For example, if you want to create a node for crafting planks, you might name the file craft_planks.js.

3. Update functions.json

In the flow_functions directory, open the functions.json file and add an entry for your new node:

{
  "YOUR_NODE_NAME": {
    "name": "YOUR_NODE_NAME",
    "file": "YOUR_NODE_NAME.js",
    "id": "YOUR_NODE_NAME",
    "label": "DISPLAY NAME",
    "hasInput": true,
    "description": "YOUR NODE DESCRIPTION",
    // example of input
    "input": { "amount": "number", "message": "text", "sneak": "switch" },
    "author": "YOUR NAME"
  }
}

Replace the placeholders:

  • YOUR_NODE_NAME - The name of your node (in lowercase with underscores)
  • DISPLAY NAME - The name displayed in the UI
  • YOUR NODE DESCRIPTION - A description of what your node does
  • YOUR NAME - Your GitHub username
  • { "NAME": "number", "NAME": "text" } - Your input fields.

Available input options:

  • text - An general text input box
  • number - An input box limited to numbers only
  • switch - An switch that can be set to true or false

4. Implement the Node

Open your newly created file and implement your node using the following structure:

const { getBot } = require("../main.js");

function main(data) {
  // Get the bot object
  const bot = getBot();
  // Your function logic here
  console.log("Executing test_node with data:", data);
}

module.exports = { main };

Key Points:

  • Require bot from ../main.js.
  • The main function should be defined and exported. This function is executed when the node runs.
  • Use try and catch statements for error handling. If an error occurs, log it and rethrow it to ensure it can be caught elsewhere.

Accessing input fields In order to the get values from the input field of a node you can use the data argument in the main function an example: in functions.json I've added an function with the following input: { "Amount": "number", "Message": "text" } now i can access them in the main function by doing: data.amount and data.message the parameter name is based on the key provided in the input.

Examples

You can also checkout some of the already made nodes:

Limitations

  • no way of outputting custom data from a node.

5. Submit a Pull Request

Once you’ve added your node and updated the functions.json file, push your changes to a new branch and open a pull request on GitHub.

git checkout -b your-feature-branch
git add .
git commit -m "Add custom node YOUR_NODE_NAME"
git push origin your-feature-branch

Go to the GitHub repository and create a pull request. Your changes will be reviewed, and if everything looks good, they will be merged!

Thank You!

Thank you for contributing to the project! If you have any questions or need further assistance, feel free to reach out.

Happy coding! 🚀

Star History

Star History Chart

Sponsor me

<a href="https://www.buymeacoffee.com/silkepilon"><img src="https://img.buymeacoffee.com/button-api/?text=Buy me a coffee&emoji=☕&slug=silkepilon&button_colour=5F7FFF&font_colour=ffffff&font_family=Poppins&outline_colour=000000&coffee_colour=FFDD00" />``</a>

Releases

No releases published

Sponsor this project

Packages

No packages published

Contributors 3

  •  
  •  
  •