Skip to content

Full Command-Line Interface Documentation

gsb

CLI for managing incremental backups of your save states using Git!

Usage:

gsb [OPTIONS] COMMAND [ARGS]...

Options:

  -h, --help         Show this message and exit.
  -v, -V, --version  Show the version and exit.

backup

Create a new backup.

Usage:

gsb backup [OPTIONS] [SAVE_PATH]

Options:

  -q, --quiet       Decrease the amount of information that's printed.
  -v, --verbose     Increase the amount of information that's printed.
  --path SAVE_PATH  Optionally specify the root directory containing your save
                    data. If no path is given, the current working directory
                    will be used.
  -c, --combine     Combine this backup and the last backup, or use -cc to
                    combine ALL backups since the last tagged backup.
  --tag "MESSAGE"   Specify a description for this backup and "tag" it for
                    future reference.
  --help            Show this message and exit.

delete

Delete one or more backups by their specified REVISION.

Usage:

gsb delete [OPTIONS] [REVISION]...

Options:

  -q, --quiet       Decrease the amount of information that's printed.
  -v, --verbose     Increase the amount of information that's printed.
  --path SAVE_PATH  Optionally specify the root directory containing your save
                    data. If no path is given, the current working directory
                    will be used.
  --help            Show this message and exit.

export

Create a stand-alone archive of the specified REVISION.

Usage:

gsb export [OPTIONS] [REVISION]

Options:

  -q, --quiet            Decrease the amount of information that's printed.
  -v, --verbose          Increase the amount of information that's printed.
  --path SAVE_PATH       Optionally specify the root directory containing your
                         save data. If no path is given, the current working
                         directory will be used.
  -o, --output FILENAME  Explicitly specify a filename for the archived
                         backup. The format of the archive will be inferred
                         from the extension unless a format flag is provided.
  --format FORMAT        Format for the archived backup. If not specified, an
                         appropriate one will be chosen based on your OS.
  -p                     Export as a .zip archive.
  -t                     Export as an uncompressed .tar archive.
  -z                     Export as a .tar.gz archive.
  -j                     Export as a .tar.bz2 archive.
  -J                     Export as a .tar.xz archive.
  --help                 Show this message and exit.

history

List the available backups, starting with the most recent.

Usage:

gsb history [OPTIONS] [SAVE_PATH]

Options:

  -q, --quiet                     Decrease the amount of information that's
                                  printed.
  -v, --verbose                   Increase the amount of information that's
                                  printed.
  --path SAVE_PATH                Optionally specify the root directory
                                  containing your save data. If no path is
                                  given, the current working directory will be
                                  used.
  -n, --limit INTEGER             The maximum number of backups to return.
  --since [%Y-%m-%d|%Y-%m-%dT%H:%M:%S|%Y-%m-%d %H:%M:%S]
                                  Only show backups created after the
                                  specified date.
  -a, --all                       Include non-tagged backups.
  -g, --include_non_gsb           Include backups created directly with Git /
                                  outside of gsb.
  --help                          Show this message and exit.

init

Start tracking a save.

Usage:

gsb init [OPTIONS] [TRACK_PATTERN]...

Options:

  -q, --quiet       Decrease the amount of information that's printed.
  -v, --verbose     Increase the amount of information that's printed.
  --path SAVE_PATH  Optionally specify the root directory containing your save
                    data. If no path is given, the current working directory
                    will be used.
  --track TEXT      Provide a glob pattern to track (note: arguments without
                    any flag will also be treated as track patterns).
  --ignore TEXT     Provide a glob pattern to ignore. Each ignore pattern must
                    be prefaced with the "--ignore" flag.
  --help            Show this message and exit.

rewind

Restore a backup to the specified REVISION.

Usage:

gsb rewind [OPTIONS] [REVISION]

Options:

  -q, --quiet             Decrease the amount of information that's printed.
  -v, --verbose           Increase the amount of information that's printed.
  --path SAVE_PATH        Optionally specify the root directory containing
                          your save data. If no path is given, the current
                          working directory will be used.
  --include_gsb_settings  Also revert the GSB configuration files (including
                          .gitignore)
  --help                  Show this message and exit.

test

Run the GSB test suite to ensure that it is running correctly on your system. Requires you to have installed GSB with the test extra (i.e. pipx install gsb[test]).

Usage:

gsb test [OPTIONS] [PYTEST_ARGS]...

Options:

  --help  Show this message and exit.