Skip to content

Command Reference

ppkantorski edited this page Jul 9, 2024 · 73 revisions

Make sure to follow the correct syntax and provide the required arguments for each command.

You can configure these commands in the package.ini file by specifying them under the corresponding options. Make sure to provide the necessary arguments as described for each command.

Ultrahand currently supports the following commands:

System Commands

  • reboot: Restarts the system. Can also be used to reboot into Hekate / UMS or Hekate ini boot entries by entry name.

    • Usage: reboot or reboot hekate or reboot ums or reboot ini <NAME_OF_INI_ENTRY>
  • shutdown: Shuts down the system or all bluetooth controllers.

    • Usage: shutdown or shutdown controllers
  • backlight: Modify the current backlight value.

    • Usage: backlight on or backlight off or backlight <PERCENTAGE_INTEGER>

Filesystem Commands

  • make or mkdir: Creates a directory.

    • Usage: mkdir <directory_path>
  • copy or cp: Copies a file or diectory.

    • Usage: copy <source_file_path> <destination_file_path>
  • mirror_copy or mirror_cp: Mirrors the contents of a directory.

    • Usage: mirror_copy <source_file_path> <destination_file_path>
  • delete or del: Deletes a file or directory.

    • Usage: delete <file_path>
  • mirror_delete or mirror_del: Uses contents of a source directory as for files to remove within the destination path.

    • Usage: mirror_delete <source_file_path> <destination_file_path>
  • move or mv: Moves/renames a file/directory to a new location/label.

    • Usage: move <file_path> <destination_directory_path>
  • download: Downloads files from a specified URL to a local destination.

    • Usage: download <file_url> <destination_file_path>
  • unzip: Extracts files from a specified ZIP archive to a local destination.

    • Usage: unzip <zip_file_path> <destination_file_path>

INI Commands

  • set-ini-val or set-ini-value: Edits/makes an INI file by updating/adding a section with a desired key-value pair.

    • Usage: set-ini-val <file_to_edit> <desired_section> <desired_key> <desired_value>
  • set-ini-key: Edits an INI file by updating a section with a new key.

    • Usage: set-ini-key <file_to_edit> <desired_section> <desired_key> <desired_new_key>
  • remove-ini-section: Remove a section from an INI file.

    • Usage: remove-ini-section <ini_file_path> <section_name>

Hex Editing Commands

  • hex-by-offset: Edits the contents of a file at a specified offset with the provided hex data.

    • Usage: hex-by-offset <file_path> <offset> <hex_data>
  • hex-by-custom-offset: Edits the contents of a file at a specified custom pattern offset with the provided hex data.

    • Usage: hex-by-custom-offset <file_path> <custom_pattern> <offset> <hex_data>
  • hex-by-swap: Edits the contents of a file by replacing a specified hex data with another.

    • Usage: hex-by-swap <file_path> <hex_data_to_replace> <hex_data_replacement>
  • hex-by-decimal: Edits the contents of a file by replacing a specified decimal data with another.

    • Usage: hex-by-decimal <file_path> <decimal_data_to_replace> <decimal_data_replacement>
  • hex-by-rdecimal: Edits the contents of a file by replacing a specified reverse decimal data with another.

    • Usage: hex-by-rdecimal <file_path> <decimal_data_to_replace> <decimal_data_replacement>
  • hex-by-string: Edits the contents of a file by replacing a specified string data with another.

    • Usage: hex-by-string <file_path> <string_data_to_replace> <string_data_replacement>

Mod Commands

  • pchtxt2ips: Converts a .pchtxt mod into a .ips.

    • Usage: pchtxt2ips <pchtxt_file_path> <output_file_path>
  • pchtxt2cheat: Converts and installs a .pchtxt mod into a cheat.

    • Usage: pchtxt2cheat <pchtxt_file_path>

Sourced Placeholder Functions

  • * (Asterisk):

    • The asterisk * is often used as a wildcard or placeholder, representing a value that will be dynamically filled in during execution. It's commonly used in contexts where specific values are expected, and the actual value will be determined at runtime.
  • package_source:

    • Package source allows users to forward one Ultrahand package ini from another. Can help users organize their code as well as chain up longer menus.
    • Used with ;mode=forwarder, called package_source /path/to/forwarder_package.ini.
  • list_source:

    • List source is a way to store variables for dropdown menus within the package.ini. It's used as a placeholder for the individual values within the list source variable. The code replaces list_source references with the corresponding value.
  • file_source:

    • Representation of a source file or resource. It's a placeholder for the actual filename or source location. The code replaces source with the appropriate file path when executing certain commands.

      Here's a breakdown of the additional variables accessible by use of file_source:

      • file_name: The name of the individual file.
      • folder_name: The name of the parent folder for the file.
    • file_source in an on: section implies that a command or action should be executed when a specific source is "on" or enabled.

    • file_source in an off: section implies that a command or action should be executed when a specific source is "off" or disabled.

    • Evaluates the state of a toggle or a condition and then selects the appropriate command for execution based on whether the source is on or off.

    • For file_source function toggles, please refer to the Broomstick package example.

  • json_file_source:

    • This command is used to define a JSON data source. It specifies a file path to a JSON file that contains data. This JSON data source is used for various purposes within the code.
    • The code reads data from the specified JSON file, and based on the context and logic in the code, it may perform actions or operations using this data.
    • In some cases, it might also accept an additional argument (e.g., jsonKey) to indicate a specific key or property within the JSON data to be used for display or processing.
    • This command is used to retrieve structured data from JSON files and incorporate it into the program's functionality.

    Here's a breakdown of the additional variables accessible by use of json_file_source:

    • jsonPath: The file path to the JSON data source.

    • jsonKey: An optional key within the JSON data for specific data retrieval.

    • For information on json_file_source function implementations, please refer to the Easy Installer package example.

Placeholder Functions

  • Coming soon.

Command Modes

  • Coming soon.

Notice: Advancements are faster than my ability to make clear documentation right now. Once things settle down, I'll work more on this wiki a bit. Lot's of new packages can be created with the improvements that have been added to v1.3.6+.

Clone this wiki locally