Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Honkai: Star Rail CLI Automation Package

License

NotificationsYou must be signed in to change notification settings

ReZeroE/StarRail

Repository files navigation

Centered Image

badgeGitHub Licensesupportsize

Overview

Thestarrail package is a CLI (command-line interface) tool designed for managing and interacting with the game, Honkai: Star Rail, directly from your terminal.

Key Features:

  • Game Launch Control

    • Start/Stop the game application directory from the terminal (skips launcher).
    • Schedule the game to start/stop at any given time (i.e. 10:30AM).
  • Simple Automation

    • Custom Macros: Record and playback recorded mouse + keyboard click sequences in-game.
    • Uniform Click: Allows automatic uniform-interval mouse clicking (duration can be randomized).
  • Binary Decoding

    • Web Cache: Access decoded web cache URLs containing information about pulls, events, and announcements.
    • Streaming Assets: Access detailed client streaming asset information (read-only).
    • Supplement Binary Decoder: Provides supplementary tools to decode any ASCII-based binary file.
  • Other Features

    • Screenshots: Open the screenshots directory from the CLI without the game launcher.
    • Official Pages: Open the official HoyoVerse web pages easily from the CLI.

Note

Installation Requirements

  • Windows 10 or later
  • Python 3.7 or later
  • Official Honkai: Star Rail Installation

Please review the CHANGELOG for the latest project updates and thedeveloper's note for more information regarding the project overhaul.




CLI

Installation / Setup

STEP 1 - To Install thestarrail package, run withadmin permissions:

> pip install starrail==1.0.5OR> git clone https://github.com/ReZeroE/StarRail.git>cd StarRail/> pip install -e.

STEP 2 - To configure thestarrail module after installing, run:

> starrail configure

STEP 3 - To verify that the installation was successful, run:

> starrail config

Note

If you encounter any issues during the installation/setup process, visitthis page for more help!




Start CLI

Thestarrail package provides its own standalone CLI environment. You may access the CLI by running:

> starrail

This will bring up the StarRail CLI environment where all the commands can be executed without thestarrail prefix.

ABC

The StarRail CLI environment facilitates efficient execution of the package's supported commands (see Usage Guide section below). Although all commands can be executed directly outside of the CLI environment in any terminal, activating the StarRail CLI allows you to run commands without thestarrail prefix.

Note

Inside of the StarRail CLI:

> about

Outside of the StarRail CLI (any terminal):

> starrail about

For this guide, all following commands will be shown as if the CLI environment has not been activated.




Usage Guide

Below is a brief overview of all the features supported by thestarrail package. Each section includes a link to a full documentation page where each function is detailed comprehensively.


For the entire list of commands available in thestarrail package, run:

> starrailhelp

1. Package Info

To see the general information about thestarrail package, run:

> starrail about# Shows all information about the packageOR> starrail version# Shows HSR and SR-CLI package version> starrail author# Shows author information> starrail repo [--open]# Shows repository link



2. Start/Stop & Schedule Game

To start, stop, or schedule the start or stop of Honkai: Star Rail, the following commands are provided.

☆ Start Game

To start Honkai: Star Rail, run:

> starrail start

☆ Stop Game

To stop Honkai: Star Rail, run:

> starrail stop

☆ Schedule Start/Stop

To schedule the start/stop of Honkai: Star Rail at a given time, you may use the scheduler supplied in thestarrail package.

To view the scheduler's help panel, run:

> starrail schedule

Supported Scheduler Commands (see usage below)

  1. Show Schedule
  2. Add Schedule
  3. Remove Schedule
  4. Clear (remove all) Schedules
Example Command                                    Description----------------------------------------           ----------------------------------------------starrail schedule add --time 10:30 --action start  Schedule Honkai Star Rail to START at 10:30 AMstarrail schedule add --time 15:30 --action stop   Schedule Honkai Star Rail to STOP  at 3:30 PMstarrail schedule remove                           Remove an existing scheduled jobstarrail schedule show                             Show all scheduled jobs and their detailsstarrail schedule clear                            Cancel all scheduled jobs (irreversible)

Note

For the full documentation on scheduling, visitthis page.




3. Game Configuration

To view Honkai: Star Rail's configuration as well as its detailed client information, several commands are provided.

☆ Real-time Game Status

To show the real-time status of the game while it's running, run:

> starrail status
               HSR Status Details-------------  -------------------------------------Status         ✓ RunningProcess ID     59420Started On     2024-0x-xx 15:11:04CPU Percent    1.3%CPU Affinity   0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15IO Operations  Writes: 247728, Reads: 580093

To show live game status non-stop, run with argument-l or--live:

> starrail status [-l|--live]

☆ Base Game Information

To view the game's basic information configured under thestarrail package listed below, run:

  • Game Version
  • Game Executable Location
  • Game Screenshots Directory
  • Game Logs Directory
  • Game Executable SHA256
> starrail config
Title               Details                                           Related Command------------------  ------------------------------------------------  --------------------Game Version        2.3.0                                             starrail versionGame Executable     E:\Star Rail\Game\StarRail.exe                    starrail start/stopGame Screenshots    E:\Star Rail\Game\StarRail_Data\ScreenShots       starrail screenshotsGame Logs           E:\Star Rail\logs                                 starrail game-logsGame (.exe) SHA256  2axxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx2c

☆ Detailed Client Information

To view detailed information about Honkai: Star Rail, run:

  • Client Version
  • Client Datetime
  • Client Detailed Version
  • Application Identifier
  • Service Entrypoint(s)
  • Client Engine Version
  • Other Information
> starrail details
Title                   Details (binary)----------------------  --------------------------------------------------------Version                 V2.3LiveDatetime String         20240607-2202Detailed Version        7x02406xx-2xx2-V2.3Live-7xxxxx5-CNPRODWin2.3.0-CnLive-v2Application Identifier  com.miHoYo.hkrpgService Endpoints       https://globaldp-prod-cn0x.bhsr.com/query_dispatchEngine Version          EngineReleaseV2.3Other                   StartAsset                        StartDesignData                        dxxxxxxxxb                        f4xxxxxxxxxxxxxxxxxxxxxxa7



4. Simple Automation

Thestarrail package supports two automation features to assist with the gameplay of Honkai: Star Rail.

☆ Custom Automation

This feature enables users to record a sequence of keyboard and mouse actions and replay them within the game. It is specifically optimized for Honkai: Star Rail, ensuring that all actions are only recorded and executed when the game is in focus, thereby preventing unintentional interactions with other applications.

To start, enter the following to bring up the help panel for automation:

> starrail automation
Example Command             Description--------------------------  ----------------------------------------------------starrail automation record  Create and record a new automation sequence (macros)starrail automation show    List all recorded automation sequencesstarrail automation run     Run a recorded automation sequencestarrail automation remove  Delete a recorded automation sequencestarrail automation clear   Delete all recorded automation sequences

Note

For a full documentation / guide on custom automation, visitthis page.


☆ Uniform Clicks

This feature assists with repetitive mouse clicking (such as for "Start Again" after completing a stage in HSR).

To use this feature, run:

> starrail click

For example, to control the mouse to click:

  1. Once every 5 seconds and
  2. Hold for 2 seconds each click
> starrail click --interval 5 --randomize 1 --hold 2



5. Official Pages

Thestarrail package supports the following simple commands to access Honkai: Star Rail's official pages.

☆ Offical Homepage

To start Honkai: Star Rail's Official Home Page, run:

> starrail homepageOR> starrail homepage -cn# CN Homepage

☆ Official HoyoLab Page

To start Honkai: Star Rail's Official HoyoLab Page, run:

> starrail hoyolab

☆ Offical Youtube Page

To start Honkai: Star Rail's Official Youtube Page, run:

> starrail youtube

☆ Offical BiliBili Page (CN)

To start Honkai: Star Rail's Official BiliBili Page, run:

> starrail bilibili



6. Binary Utilities

Thestarrail package supports a list of binary-related utility commands for web cache and streaming assets decoding.

☆ Web Cache

Honkai: Star Rail's web cache stores recent web data. To access the decoded web cache URLs containing cached information about events, pulls, and announcements without loading into the game, run:

> starrail webcache

The results will be listed in two sections:

  1. Events/Pulls Web Cache
  2. Announcements Web Cache

☆ Cached Pulls

To access your Honkai: Star Rail's cached pulls information without logging in to the game, run:

> starrail pulls

Web view of all the pull information will open in the default browser.


☆ Supplement Binary Decoder

The package provides this supplementary tools to decode any ASCII-based binary file.

> starrail decode --path<path_to_file>

All ASCII-based information will be outputted into a table with index listings as following:

  Index  Content-------  --------------      0  This is a test      1  /Root xxxx 0 R      2  /Info 1 0 R>>      3  start ref    ...  .....



7. Misc Utilities

Thestarrail package provides the following quality-of-life utility features to quickly access key game information.

☆ Access Screenshots

To access the screenshots without the client or searching through the directory, run:

> starrail screenshots

☆ Access Game Logs

To access the game's log files, run:

> starrail game-logs

☆ Session runtime

To get the runtime of the current Honkai: Star Rail session (how long the game has been running since it started), run:

> starrail runtime



Disclaimer

The "starrail" Python 3 module is an external CLI tooldesigned to automate the gameplay of Honkai Star Rail. It is designedsolely interacts with the game through the existing user interface,and it abides by the Fair Gaming Declaration set forth by COGNOSPHEREPTE. LTD. The package is designed to provide a streamlined andefficient way for users to interact with the game through featuresalready provided within the game, and it does not, in any way, intendto damage the balance of the game or provide any unfair advantages.The package does NOT modify any files in any way.

The creator(s) of this package has no relationship with MiHoYo, thegame's developer. The use of this package is entirely at the user'sown risk, and the creator accepts no responsibility for any damage orloss caused by the package's use. It is the user's responsibility toensure that they use the package according to Honkai Star Rail's FairGaming Declaration, and the creator accepts no responsibility for anyconsequences resulting from its misuse, including game accountpenalties, suspension, or bans.

By using this package, the user agrees to ALL terms and conditionsand acknowledges that the creator will not be held liable for anynegative outcomes that may occur as a result of its use.




Repository Star History

Star History Chart




License

    - MIT Licensed

About

Honkai: Star Rail CLI Automation Package

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp