Skip to content

Architecture DocsCommands

bio.cd()

Get or set the current DAT context.


CLI

bio cd              # print current DAT path
bio cd <path>       # change current DAT

Like the shell's current directory, bio maintains a current DAT — the default context for commands that operate on a DAT.

bio cd data/experiments/mutualism_2026-01-09/
bio report                   # reports on current DAT

Python API

from alienbio import bio

# Get current DAT path
path: Path = bio.cd()

# Set current DAT
path: Path = bio.cd("data/experiments/run1")

# Relative specifiers resolve against current DAT
bio.cd("catalog/scenarios/mutualism")
scenario: Scenario = bio.fetch(".baseline")  # fetches from current DAT

Auto-Setting

Some commands automatically set the current DAT:

# After build (auto-sets to newly created DAT)
bio build experiments.mutualism
# → current DAT is now data/experiments/mutualism_2026-01-10_001/

# After run (auto-sets to the DAT that was run)
bio run scenarios.baseline --seed 42
# → current DAT is now data/scenarios/baseline_42/

See Also

  • DAT — DAT folder structure
  • fetch() — Load specs (uses current DAT for relative paths)
  • run() — Run scenarios
  • Bio — Bio class overview