version

Purpose

Show binary version, build date, current directory, and a styled logo.

Usage

idx version
idx --version
idx -v

Arguments

  • None.

Flags

  • Global: --quiet, -q.

Behavior and Side Effects

  • Prints build metadata injected at compile time via -ldflags.
  • Read-only command; no filesystem writes.

Output

Renders an ASCII art IDX logo alongside version and build details:

 β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•—  β–ˆβ–ˆβ•—   IDX v1.2.0
 β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β•šβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•   fast BM25 code search
 β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘ β•šβ–ˆβ–ˆβ–ˆβ•”β•    2024-01-15  10:30 UTC
 β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•”β–ˆβ–ˆβ•—    ~/my-project
 β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•”β• β–ˆβ–ˆβ•—
 β•šβ•β•β•šβ•β•β•β•β•β• β•šβ•β•  β•šβ•β•

Fields shown alongside the logo:

  • Name + version: IDX <version>
  • Tagline: fast BM25 code search
  • Build date: parsed from RFC3339 and formatted as YYYY-MM-DD HH:MM UTC; falls back to the raw string if unparseable.
  • Current directory: current working directory with home prefix collapsed to ~.

The same output is produced by idx --version and idx -v via the Cobra version template.

Errors

  • No command-specific runtime validation errors.

Examples

idx version
idx --version
idx -v