glesha Documentation

Cross-platform archive and upload utility.

Table of Contents

Introduction

glesha is a CLI utility for archiving and uploading data to cloud storage.

Archives directories into .tar.gz format and uploads to storage backends using multipart transfer. Supports Amazon S3 with all storage classes, including S3 Glacier Deep Archive for cost-effective long-term storage.

Operates directly with your cloud provider accounts—not a hosted service. You maintain full data ownership.

TL;DR - glesha archives to .tar.gz, stores metadata in SQLite, and uploads to AWS S3.

Installation

Standalone binary with no external dependencies. Supports most architectures on Windows, macOS, and Linux.

  • 1. Linux

    One-liner installation:

    curl -sL https://glesha.txds.me/install | bash

    Note - Verify the script or grab the binary from releases and add to PATH

  • 2. MacOS

    One-liner installation:

    curl -sL https://glesha.txds.me/install | bash

    Note - Verify the script or grab the binary from releases and add to PATH

    Gatekeeper Issue

    If you see an error like: "glesha cannot be opened because the developer cannot be verified", it's because MacOS Gatekeeper prevents running binaries that are not notarized by Apple. When you download the binary from the browser, it adds a quarantine attribute. You can fix this by following one of the two methods mentioned below.

    Method 1: Using Terminal

    To remove the quarantine attribute and run the binary:

    xattr -d com.apple.quarantine glesha
    Method 2: Using System Settings
    1. Try to run the binary (you'll get the Gatekeeper warning)
    2. Open System SettingsPrivacy & Security
    3. Scroll down to the Security section
    4. You'll see a message: "glesha was blocked from use because it is not from an identified developer"
    5. Click "Open Anyway" next to that message
    6. Confirm by clicking "Open" in the dialog that appears

    Note - The install script automatically handles this, or you can manually remove the attribute using either method above.

  • 3. Windows

    PowerShell installation script:

    powershell -c "irm https://glesha.txds.me/install.ps1 | iex"

    Note - Verify the script or download glesha.exe from releases and add to PATH

    ⚠️ Windows support is experimental.

Configuration

JSON configuration file for storing provider credentials and preferences.

On first run, a default config is created at ~/.config/glesha/config.json. Modify this file to add your credentials. CLI arguments can override config settings.

Sample configuration:

Commands

Common glesha subcommands:

  • 1. glesha help

    Print help for subcommands

    Examples
                $ glesha help <subcommand>
                  $ glesha help add 
                  $ glesha help run
                  $ glesha help config
                
  • 2. glesha add

    Queues a task that archives a directory and uploads to cloud storage.

    Task does not auto-start. See glesha run.

    Usage

                $ glesha add [OPTIONS] PATH
                

    OPTIONS

    • --provider, -p [PROVIDER]

      Cloud storage provider. Overrides CONFIG provider.

      Supported: aws

    • --archive-format, -a [ARCHIVE_FORMAT]

      Archive format. Overrides CONFIG archive_format.

      Supported: targz

    • --output, -o [OUTPUT_PATH]

      Archive output directory

      Default: ~/.glesha-cache

    • --config, -c [CONFIG_PATH]

      Config file path

      Default:~/.config/glesha/config.json

    • --log-level, -L

      Specify log output level

      Default: debug

      Accepted values (in order of decreasing amount of output) -

      debug, info, warn, error, silent

    • PATH

      Directory path that should be archived

  • 3. glesha run

    Executes a queued task by ID. Archives directory and uploads to cloud storage.

    Examples
                $ glesha run <task_id>
                  $ glesha run 1 
                  $ glesha run --log-level=debug 12
                
  • Other commands

  • glesha ls - List all tasks
  • glesha rm - Delete task and cache
  • glesha cleanup - Clean cache files
  • glesha version - Print version

Examples

  • Create targz archive and upload to S3 Glacier:

    glesha add -c ~/.config/glesha/aws_config.json ./dir_to_upload
  • Create zip archive and upload to Google Drive:

    glesha add -c ~/.config/glesha/gd_config.json ./dir_to_upload