MyNixOS website logo
Description

Lightweight Auto-Updating Project Tracker and Data Dictionary.

Once initialized, the package leaves a 'tiny trail' of human- and AI-readable text that makes it effortless to keep track of small to medium-sized projects. The package is lightweight (hence 'tiny') and maintains a YAML trail file recording which scripts produced which output files. Call tinytrail() once at the top of each script to record metadata, wrap any save call with tinytrail_write() to log the output path, and optionally use tinytrail_dict() to capture a data dictionary for each input data frame.

tinytrail

tinytrail is a lightweight R package that — once initialized — leaves a 'tiny trail' of human- and AI-readable information about what each script saves to disk, making it effortless to keep better track of small to medium-sized projects. It maintains a YAML trail file (_tinytrail.yaml) at the project root recording which scripts produced which output files and each script's runtime. The tinytrail package also provides a convenience function that effortlessly registers column names along with sample values (optional) in the YAML.

Installation

install.packages("tinytrail")

# Development version from GitHub:
pak::pak("tinytrail-r/tinytrail")

Usage

Call tinytrail() once near the top of each script. Common write functions are intercepted automatically:

library(tinytrail)

tinytrail(
  description = "Clean and summarise survey data",
  data_source = "Current Population Survey (BLS)"
)

dat <- read.csv("data/raw/survey.csv")

write.csv(dat, "output/clean.csv")   # auto-tracked

png("output/age_dist.png")           # auto-tracked
hist(dat$age, main = "Age distribution")
dev.off()

tinytrail() detects the script name and creates or updates _tinytrail.yaml:

scripts:
  01_clean.R:
    description: Clean and summarise survey data
    data_source: Current Population Survey (BLS)
    first_run: '2026-06-27 09:00'
    latest_run: '2026-06-27 09:01'
    script_runtime: 0.2 min
    n_outputs: 2
    outputs:
    - output/age_dist.png
    - output/clean.csv

For write functions not in the built-in list, pass a list to extra_hooks with the function names and their file-path arguments:

tinytrail(
  description = "Export results",
  extra_hooks = list(
    fn  = c("readr::write_csv", "ggplot2::ggsave"),
    arg = c("file",             "filename")
  )
)

(These two functions are already captured automatically — they're shown here for illustration only.)

Optionally, pipe data frames through tinytrail_dict() to capture column names and sample values:

# ... cleaning and preparing data ...

dat |>
  tinytrail_dict()

This adds a data dictionary entry to _tinytrail.yaml:

data_dictionary:
  01_clean.R:
    dat:
      columns:
        id: [1, 2, 3, 4, 5]
        age: [34, 52, 28, 41, 37]
        response: ['yes', 'no', 'yes', 'yes', 'no']

Manual tracking with auto = FALSE

To track only specific outputs, set auto = FALSE and use tinytrail_write() explicitly. It returns its argument invisibly, so it drops inline into any save call:

tinytrail("Export selected results", auto = FALSE)

write.csv(dat, tinytrail_write("output/clean.csv"))
saveRDS(model, tinytrail_write(here::here("output/model.rds")))
A pencil sketch of an alpine landscape with winding trails
Metadata

Version

0.1.0

License

Unknown

Platforms (79)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    uefi
    wasip1
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-uefi
  • aarch64-windows
  • aarch64_be-none
  • arc-linux
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-linux
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • sh4-linux
  • vc4-none
  • wasm32-wasip1
  • wasm64-wasip1
  • x86_64-cygwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-uefi
  • x86_64-windows