Skip to main content

Module utils

Module utils 

Source
Expand description

Text utility functions for Aptu.

Provides reusable text formatting utilities for truncation and relative time display. These functions are used by CLI, and will be available to iOS and MCP consumers.

Functions§

format_relative_time
Formats a DateTime<Utc> as relative time (e.g., “3 days ago”).
infer_repo_from_git
Infers the GitHub repository (owner/repo) from the local git config.
parse_and_format_relative_time
Parses an ISO 8601 timestamp and formats it as relative time.
truncate
Truncates text to a maximum length with default ellipsis suffix “…”.