# mise toolchain for pgmon. Primarily used by the devcontainer
# (.devcontainer/postcreate.sh runs `mise install`), but works on any host too:
#
#   mise install            # install the tools below
#   mise run setup-postgres-client
#
# Host users who don't use mise are unaffected — the project still builds with a
# plain `cargo` + `just` install and CI does not depend on mise.

[settings]
cargo.binstall = true
minimum_release_age = "0"

[tools]
"cargo:cargo-edit" = "latest"
"cargo:cargo-watch" = "latest"
"github:nbari/slick" = "latest"
bat = "latest"
just = "latest"
node = "lts"
ripgrep = "latest"
tree-sitter = "latest"
eza = "latest"
tmux = "latest"
uv = "latest"
python = "3.14"
"pipx:pgcli" = "latest"

[env]
EDITOR = "nvim"
VISUAL = "nvim"

[tasks.setup-postgres-client]
run = "bash {{config_root}}/scripts/install-postgres-client.sh"
description = "Install the PostgreSQL client (psql), matching the server version"

[tasks.setup-tig]
run = "sudo apt install -y tig"
description = "Install tig git browser"

[tasks.setup-pgload]
run = "pip install psycopg2-binary"
description = "Install psycopg2 (binary wheel) so pgload.py can generate test load"

[tasks.setup-pg-activity]
run = "pip install pg_activity"
description = "Install pg_activity (top-like PostgreSQL activity monitor)"
