Getting Started
Getting Started
Installation
Build from source
Requires Go 1.25+ with CGO enabled (for SQLite).
git clone https://github.com/nishad/srake.git
cd srake
go build -tags "sqlite_fts5" -o srake ./cmd/srake
./srake --helpGo install
go install -tags "sqlite_fts5" github.com/nishad/srake/cmd/srake@latestThe
sqlite_fts5 build tag is required for full-text search support.Quick Start
Ingest SRA metadata
# Auto-select the best archive from NCBI
srake ingest --auto
# Or ingest a local file
srake ingest --file /path/to/NCBI_SRA_Metadata.tar.gz
# Ingest with filters (human Illumina RNA-Seq only)
srake ingest --auto \
--taxon-ids 9606 \
--platforms ILLUMINA \
--strategies RNA-SeqBuild a search index
# Build Bleve full-text index
srake index --build
# Optionally include vector embeddings for semantic search
srake index --build --with-embeddingsSearch
# Basic search
srake search "homo sapiens"
# Search with filters
srake search "cancer" \
--organism "homo sapiens" \
--platform ILLUMINA \
--library-strategy RNA-Seq
# Semantic vector search
srake search "tumor gene expression" --search-mode vector
# Export results as JSON
srake search "RNA-Seq" --format json --output results.jsonStart the API server
srake server --port 8080
# Query the API
curl "http://localhost:8080/api/v1/search?q=cancer&limit=10"
curl "http://localhost:8080/api/v1/stats"Data paths
SRAKE follows the XDG Base Directory Specification:
| Directory | Default Path | Purpose |
|---|---|---|
| Config | ~/.config/srake/ | Configuration file |
| Data | ~/.local/share/srake/ | Database and models |
| Cache | ~/.cache/srake/ | Downloads and search index |
| State | ~/.local/state/srake/ | Resume checkpoints |
Override with environment variables:
SRAKE_DB_PATH=/fast/ssd/srake.db srake ingest --auto
SRAKE_CACHE_HOME=/tmp/srake srake index --buildSee Configuration for the full list.