AIStk

cli.py — Command Line Interface

Purpose

Provide a unified command-line interface to interact with the AIS Toolkit, covering ingestion, filtering, statistics, event detection, streaming simulation, and export. Designed for both quick exploration and batch workflows.

Responsibilities

Interactions with Other Modules

Usage Examples

# General help
aistk --help

# Scan AIS files, restrict to January 2024, export Parquet
aistk scan data/ais --from 2024-01-01 --to 2024-02-01 \
  --mmsi 244660000,244770000 --to-parquet out/ais.parquet

# Compute per-MMSI stats with Polars streaming
aistk stats data/ais --engine polars-stream --out stats.parquet

# Detect navigational events
aistk events data/ais --mmsi 244660000 --out events.csv

# Simulate online streaming from a CSV (emit events as JSON lines)
aistk stream-csv data/ais/2024.csv --chunk-size 5000

Public API (Outline)

Typer Commands

Top-level variables

Notes & Design Considerations