atb-cli

module
v0.21.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 5, 2026 License: MIT

README

atb-cli

A command-line tool for querying the AllTheBacteria genomics database (~3.2M bacterial genomes), searching AMR/stress/virulence genes, finding closest genomes via sketch distances, and downloading genome assemblies.

Single binary, no dependencies.

Supported platforms: Linux, macOS, Windows (amd64 and arm64)

Full documentation: https://allthebacteria.github.io/atb-cli/ (also on Read the Docs)

Install

One-line install (Linux/macOS):

curl -fsSL https://raw.githubusercontent.com/allthebacteria/atb-cli/main/install.sh | bash

Pre-built binaries for all platforms are also available on the releases page.

See the installation guide for all methods.

Quick Start

# 1. Download the database (~540 MB core tables)
atb fetch

# 2. Query
atb query --species "Escherichia coli" --hq-only --limit 10

See the quick start guide for next steps.

Documentation

  • Guides — querying genomes, AMR, MLST, sketch distances, downloads, and more
  • CLI reference — every command and flag
  • LLM integration (MCP) — use atb as an MCP server with Claude, ChatGPT, Cursor, and others

Credits

atb-cli was designed and architected by Thanh Le Viet in his personal capacity, using his own Claude account. The implementation was developed with coding assistance from Claude (Anthropic), an AI assistant that helped with code generation, testing, and documentation under human direction and review. Thanks to hackathon participants Jane Hawkey, Ahmed M Moustafa, Martin Hunt, and Zamin Iqbal for their input and feedback.

License

MIT

Directories

Path Synopsis
cmd
atb command
gen-docs command
Command gen-docs renders the atb CLI reference as Markdown for the docs site.
Command gen-docs renders the atb CLI reference as Markdown for the docs site.
internal
agc
Package agc reads AGC (Assembled Genomes Compressor) archives by shelling out to the upstream `agc` binary.
Package agc reads AGC (Assembled Genomes Compressor) archives by shelling out to the upstream `agc` binary.
amr
cli
columns
Package columns is the registry of columns available to atb query --columns.
Package columns is the registry of columns available to atb query --columns.
extract
Package extract unpacks tar archives (optionally xz- or gzip-compressed) and writes each regular file into a destination directory, optionally recompressing members with gzip or xz.
Package extract unpacks tar archives (optionally xz- or gzip-compressed) and writes each regular file into a destination directory, optionally recompressing members with gzip or xz.
match
Package match implements SQL LIKE-style pattern matching for the Go filtering paths, so they return the same rows as the SQLite index paths.
Package match implements SQL LIKE-style pattern matching for the Go filtering paths, so they return the same rows as the SQLite index paths.
osf
runs
Package runs maps sequencing run accessions (ERR/SRR/DRR) onto the sample accessions the rest of AllTheBacteria is keyed by.
Package runs maps sequencing run accessions (ERR/SRR/DRR) onto the sample accessions the rest of AllTheBacteria is keyed by.
sources
Package sources is the single source of truth for all external data URLs that atb downloads.
Package sources is the single source of truth for all external data URLs that atb downloads.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL