Download Shell Bridge — Minecraft Mods — MetaMods
Shell Bridge

Shell Bridge

Active

Downloads

0

Last update

6 months ago

Versions

1.19.3 — 1.21.8
Client
Fabric
Utils

Shell Bridge - Bridge Between Minecraft and Command Shell

Mod Capabilities

Shell Bridge is a unique Minecraft modification that creates a connection between the game world and your operating system's command shells. With this development, you can execute system commands directly from Minecraft chat.

Supported Platforms

The mod works with both Linux environments and Windows systems. For each platform, support for the corresponding shells is provided:

  • Linux: Bash
  • Windows: PowerShell

For Windows users, it's important to configure the script command parameter using: $config script_command "powershell.exe {path}"

Available Commands

  • $help [command name] - displays a list of available commands or information about a specific command
  • $exec [args] - executes the passed arguments in the command shell
  • $stop - stops the currently running process
  • $cd [path] - changes the shell's working directory
  • $clear - clears the chat
  • $config - changes configuration settings
  • $run - runs a script (this command's functionality will be expanded in future updates)

Configuration Setup

The main configuration option is $config script_command [value]. This parameter is used when executing the command $run [path]. You can use the {path} template to substitute the script path. This allows using any script executors, including Python and other programming languages.

Shell Interaction with Minecraft

Developers are actively working on feedback functionality that will allow the command shell to interact with the game. The main command for this is: asplayer [what the player enters in chat]

Script Examples

param (
    [Parameter(Mandatory=$true)]
    [string]$argument
)

$hostname = "localhost"
$port = 1234

$socket = New-Object System.Net.Sockets.TcpClient($hostname, $port)
$stream = $socket.GetStream()
$writer = New-Object System.IO.StreamWriter($stream)
$reader = New-Object System.IO.StreamReader($stream)

$writer.WriteLine($argument)
$writer.Flush()

$response = $reader.ReadLine()
Write-Host $response

$socket.Close()

Running the script:

.\script.ps1 -argument "asplayer [what the player enters in chat]"
#!/bin/bash

argument=$1
hostname="localhost"
port=1234

exec 3<>/dev/tcp/$hostname/$port

echo "$argument" >&3
response=$(head -n 1 <&3)

echo $response

exec 3<&-
exec 3>&-

Running the script:

./script.sh "asplayer [what the player enters in chat]"

About the Project

Active development continues, and future releases will include support for popular APIs such as Git, Pastebin, and other tools that will allow developers to work with their favorite software directly from Minecraft.

Future Plans

Developers welcome feedback and bug reports that will help improve the project. Community plays an important role in the development of this modification.

Project members
serainox420

serainox420

Developer

unknowwn-glitch

unknowwn-glitch

Developer

Created: 4 Apr 2023

ID: 16767