Godot 4 simple terminal system
A downloadable terminal
Self contained console manager with custom commands and UI. Simplify your debugging and tests reproduction by chaining commands.
Allows developers to easily register and execute functions via text commands directly within the running game. Supports commands with simple arguments and provides various logging levels with customizable colors.
Features
- In-game console UI (`LineEdit` for input, `RichTextLabel` for output).
- Register custom commands from anywhere in your project.
- Global `ConsoleManager` singleton for easy access.
- `CommandTarget` component script for straightforward command registration on specific nodes.
- Basic argument parsing (space-separated, no piping for now).
- Command history navigation (Up/Down arrows).
- Customizable log message colors.
- Configurable console toggle key (default "`").
- Optionally mirrors console output to the Godot editor Output panel.
Set up
1. Copy the `Console` directory (containing `Console.tscn`, `console.gd`, `console_manager.gd`, and `command_target.gd`) anywhere into your Godot project's filesystem (e.g., `res://addons/console/`).
2. Go to `Project -> Project Settings -> Globals -> AutoLoad`.
3. Click the folder icon next to "Path" and select the `console_manager.gd` script.
4. Enter `console_manager` in the "Node Name" field. Click "Add".
5. Add the `Console.tscn` scene as an instance to your main game scene, or another persistent scene (like a UI manager or attached to your main camera).
Shown UI is just an example, scripts and core functionality is be separated enough to use them on their own with custom made UI setup.
Check out `Examples` folder for use cases and code examples. You can also remove it as nothing is dependent on it.
Usage
Opening/Closing the Console
- Press the key defined in the `Console Key` property on the `ConsoleInput` node (default "`").
- Console has setting to be disabled/enabled by default at start of the game.
Executing Commands
- Type a command and its arguments (space separated) into the input field.
- Press Enter to execute.
Command History
Access command history with Up and Down Arrow Keys.
Built-in Commands
- `help`: Lists all registered commands and their descriptions.
- `help <command_name>`: Shows the description for a specific command.
- `clear`: Clears the console log display.
- `echo <text>`: Prints the provided text back to the console.
- `history`: Displays the list of previously executed commands.
GitHub repo: https://github.com/Re50N4NC3/godot4-console-manager
Published | 3 days ago |
Status | Prototype |
Category | Tool |
Author | Tyst |
Tags | Godot, Text based |
Download
Click download now to get access to the following files:
Leave a comment
Log in with itch.io to leave a comment.