Skip to main content

Galaxy bioinformatics CLI for automating histories, datasets, tools, workflows, and jobs via the Galaxy REST API

Project description

galaxy-cli — Galaxy bioinformatics command-line client

galaxy-cli is a Python CLI and REPL for automating the Galaxy bioinformatics platform from the shell. It wraps the Galaxy REST API for histories, datasets, collections, tools, user-defined tools, workflows, jobs, and libraries.

This project was initially generated with cli-anything and then refined into the standalone galaxy-cli package.

pip install galaxy-cli

What can galaxy-cli do?

galaxy-cli is a Galaxy bioinformatics CLI for users who want a Galaxy command-line client that works naturally in shell scripts and reproducible Galaxy analyses. You can use it to:

  • run Galaxy workflows from the command line and submit individual Galaxy tools
  • upload and download datasets
  • create and manage histories and collections
  • inspect jobs, logs, tools, and workflow metadata
  • automate Galaxy workflows for reproducible Galaxy bioinformatics analyses

Prerequisites

  • Python 3.9+
  • A running Galaxy server
  • A Galaxy API key from your target instance

Installation

Install from PyPI with uv or pip:

uv tool install galaxy-cli
pip install galaxy-cli

For local development from this repository:

python3 -m pip install .

Verify installation:

which galaxy-cli
galaxy-cli --version

AI Agent Skill

The package includes a galaxy-cli skill for Codex and Claude Code so agents can use the CLI without rediscovering command syntax.

# Install for Codex: ~/.codex/skills/galaxy-cli/SKILL.md
galaxy-cli skill install --agent codex

# Install for Claude Code: ~/.claude/skills/galaxy-cli/SKILL.md
galaxy-cli skill install --agent claude

Use galaxy-cli skill path to find the packaged skill, or galaxy-cli skill install --target-dir /path/to/skills for another agent or project-level skills directory.

Configuration

Set your Galaxy server URL and API key:

export GALAXY_URL=https://usegalaxy.org
export GALAXY_API_KEY=your-api-key

galaxy-cli config test

For secret-file environments, set GALAXY_API_KEY_FILE instead. Explicit --api-key and GALAXY_API_KEY values take precedence over the file; the CLI reads the file without exposing its contents:

export GALAXY_URL=https://usegalaxy.org
export GALAXY_API_KEY_FILE=.secrets/galaxy-api-key
galaxy-cli config test

Session state is stored in ~/.galaxy-cli/session.json. It is intended for a single active writer; for parallel automation or multiple concurrent agents, pass --history-id explicitly instead of relying on shared session state.

Usage

Documentation site: https://qchiujunhao.github.io/galaxy-cli/

galaxy-cli history list
galaxy-cli history create "My Analysis"
galaxy-cli tool search "bowtie" --limit 5
galaxy-cli workflow list
galaxy-cli workflow list | jq .
galaxy-cli --human config show

galaxy-cli defaults to compact JSON output. Use --human for human-readable terminal output.

Create and run a fresh Galaxy user-defined tool in one blocking command:

galaxy-cli udt create-run \
  --representation-json udt.json \
  --history-id HIST_ID \
  --inputs-json inputs.json

The representation file contains the inner GalaxyUserTool object; the CLI constructs the API envelope, resolves the returned UUID, submits through the portable tool execution endpoint, waits for every spawned job, and returns compact job and output metadata. Add --evidence-dir evidence to save redacted full request and response evidence without expanding stdout.

Tool and workflow submissions validate obvious input mistakes before posting to Galaxy, including unknown input names, missing required data inputs, invalid dataset-vs-collection source prefixes, and simple select/boolean/numeric value errors. Use --dry-run-payload to validate and print the exact Galaxy POST body without submitting:

galaxy-cli tool run TOOL_ID --history-id HIST_ID -i input=DATASET_ID --dry-run-payload
galaxy-cli workflow run WF_ID --history-id HIST_ID -i 0=DATASET_ID --dry-run-payload

For large dataset uploads, use --upload-timeout to control the HTTP POST separately from the upload job wait. GALAXY_CLI_REQUEST_TIMEOUT controls regular API request reads, and GALAXY_CLI_UPLOAD_TIMEOUT controls uploads.

Run the REPL:

galaxy-cli

Tests

python3 -m pytest galaxy_cli/tests/ -v

Releases

Releases are published from GitHub Releases through PyPI Trusted Publishing. See RELEASE.md for the one-time PyPI setup and release checklist.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

galaxy_cli-1.4.1.tar.gz (95.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

galaxy_cli-1.4.1-py3-none-any.whl (94.4 kB view details)

Uploaded Python 3

File details

Details for the file galaxy_cli-1.4.1.tar.gz.

File metadata

  • Download URL: galaxy_cli-1.4.1.tar.gz
  • Upload date:
  • Size: 95.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for galaxy_cli-1.4.1.tar.gz
Algorithm Hash digest
SHA256 2a5661e2c7bc1916c08a145b4cece015c31b06f3456f75579b6f0b0a94f1e27e
MD5 77f3d796b56948c8fb5317a6f2329b21
BLAKE2b-256 4de54110a92cb6f3be3df4922544333cfa65ae579aafb0505310ed6c637658be

See more details on using hashes here.

Provenance

The following attestation bundles were made for galaxy_cli-1.4.1.tar.gz:

Publisher: release.yml on qchiujunhao/galaxy-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file galaxy_cli-1.4.1-py3-none-any.whl.

File metadata

  • Download URL: galaxy_cli-1.4.1-py3-none-any.whl
  • Upload date:
  • Size: 94.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for galaxy_cli-1.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ff7247e3154cf04346ad894edcaa2aeb1c4ca25d50b17c5c6831175dd1e11def
MD5 2bc93aa6ec007264c7c3347c09c92ec8
BLAKE2b-256 26e0961cb911928d8ffa827708ce6b4fb4fdc23f0cd5a5c66a0acf9c2fc5fa5e

See more details on using hashes here.

Provenance

The following attestation bundles were made for galaxy_cli-1.4.1-py3-none-any.whl:

Publisher: release.yml on qchiujunhao/galaxy-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page