cli.main¶
Typer CLI entrypoint and commands.
Entry point¶
The console script (taskclf) is defined in cli.entry.cli_entry().
It intercepts --version / -v only when that is the first argument
after the executable (for example taskclf --version or entry -v),
before importing the full command module, so that version queries return
instantly without loading the entire Typer command tree and its transitive
dependencies. Invocations such as taskclf tray … --title-salt -v still
load the full CLI so -v is handled as a value, not a version shortcut.
All other invocations delegate to cli_main() in this module.
Crash handler¶
The CLI entry point (cli_main()) wraps all commands in a top-level
crash handler. If an unhandled exception escapes, a timestamped crash
report is written to <TASKCLF_HOME>/logs/crash_<YYYYMMDD_HHMMSS>.txt
and the file path plus issue URL are printed to stderr. SystemExit
and KeyboardInterrupt pass through normally.
See core.crash for crash file contents and privacy details.
Release version bumps (Makefile)¶
Targets at the repo root:
bump-patch/bump-minor/bump-major— bumppyproject.tomlanduv.lock, commit, tagvX.Y.Z, and trigger.github/workflows/payload-release.yml. Use for a Python / sidecar payload release (payload zips and payloadmanifest.jsonon thev*release).bump-launcher-patch/bump-launcher-minor/bump-launcher-major— bumpelectron/package.json, commit, taglauncher-vX.Y.Z, and trigger.github/workflows/electron-release.yml. Use for a desktop launcher release (installers + launcher compatibilitymanifest.jsonon thelauncher-v*release only).
You only need bump-patch when you want a v* tag; you only need bump-launcher-* when you want a launcher-v* tag. They are independent unless you choose to run both.
Guards: By default, a bump aborts if there are no changes since the last matching tag under the paths that affect that release (see Makefile: PAYLOAD_BUMP_PATHS covers the Python sidecar tree; LAUNCHER_BUMP_PATHS is electron/ only). Set BUMP_FORCE=1 to tag anyway (e.g. re-release the same tree or you only changed docs).
CI: On tag push, workflows compare github.event.before to the tagged commit and skip the job when only unrelated files changed; workflow_dispatch always runs the full workflow.
Payload releases also refresh the GitHub Pages payload index at
https://fruitiecutiepie.github.io/taskclf/payload-index.json, which the
packaged Electron launcher uses to discover the newest compatible v*
sidecar release. That file is regenerated from GitHub Releases during both the
payload release workflow and ordinary docs deploys, but the docs workflow now
skips automatic master runs when that commit is also tagged v*. That makes
the payload release workflow the only GitHub Pages publisher for release
commits, while later ordinary master pushes still refresh metadata from the
same published releases. The payload release workflow also
supports a manual index-refresh-only dispatch for repairing stale Pages metadata
without rebuilding payload archives. All Pages publishers share the same
pages concurrency group and queue behind each other so docs deploys and
payload-metadata deploys serialize instead of canceling each other.
Commands¶
| Command | Description |
|---|---|
taskclf ingest aw |
Ingest an ActivityWatch JSON export |
taskclf features build |
Build per-minute feature rows by fetching from ActivityWatch (supports single date or date range) |
taskclf labels import |
Import label spans from CSV |
taskclf labels add-block |
Create a manual label block for a time range |
taskclf labels label-now |
Label the last N minutes (no timestamps needed) |
taskclf labels show-queue |
Show pending items in the active labeling queue |
taskclf labels export |
Export labels.parquet to CSV |
taskclf labels project |
Project label blocks onto feature windows |
taskclf train build-dataset |
Build training dataset (X/y/splits artifacts) |
taskclf train lgbm |
Train a LightGBM multiclass model |
taskclf train evaluate |
Evaluate a trained model: metrics, calibration, acceptance checks |
taskclf train tune-reject |
Sweep reject thresholds and recommend the best one |
taskclf train calibrate |
Fit per-user probability calibrators |
taskclf train retrain |
Run full retrain pipeline (train, evaluate, gate-check, promote) |
taskclf train check-retrain |
Check whether retraining or calibrator update is due |
taskclf train list |
List model bundles with ranking metrics and status |
taskclf model set-active |
Manually set the active model pointer (rollback / override) |
taskclf model inspect |
Inspect bundle metrics and optionally replay held-out test evaluation |
taskclf policy show |
Print the current inference policy |
taskclf policy create |
Create an inference policy binding model + calibrator + threshold |
taskclf policy remove |
Remove the inference policy (falls back to active.json) |
taskclf taxonomy validate |
Validate a user taxonomy YAML file |
taskclf taxonomy show |
Display taxonomy mapping as a table |
taskclf taxonomy init |
Generate a default taxonomy YAML |
taskclf infer batch |
Run batch inference (supports --taxonomy) |
taskclf infer baseline |
Run rule-based baseline inference (no ML) |
taskclf infer compare |
Compare baseline vs ML model on labeled data |
taskclf infer online |
Run online inference loop (supports --taxonomy, --label-queue) |
taskclf report daily |
Generate a daily report |
taskclf monitor drift-check |
Run drift detection (reference vs current) |
taskclf monitor telemetry |
Compute and store a telemetry snapshot |
taskclf monitor show |
Display recent telemetry snapshots |
taskclf diagnostics |
Collect environment info for bug reports |
taskclf ui |
Launch the labeling UI as a native floating window |
taskclf electron |
Launch the Electron desktop shell with native tray + multi-window popups |
taskclf tray |
Run system tray labeling app with activity transition detection |
features build¶
Build per-minute feature rows by fetching from a running ActivityWatch
server. Supports a single --date or a --date-from / --date-to
range for backfilling multiple days.
# Single date
taskclf features build --date 2026-03-10
# Date range (backfill)
taskclf features build --date-from 2026-02-16 --date-to 2026-03-12
# Dummy/synthetic features for testing
taskclf features build --date 2026-03-10 --synthetic
| Option | Default | Description |
|---|---|---|
--date |
-- | Single date (YYYY-MM-DD) |
--date-from |
-- | Start of date range (inclusive) |
--date-to |
-- | End of date range (inclusive; defaults to --date-from if omitted) |
--aw-host |
http://localhost:5600 |
ActivityWatch server URL |
--title-salt |
taskclf-default-salt |
Salt for hashing window titles |
--synthetic |
False |
Generate dummy features instead of fetching from AW |
--data-dir |
<TASKCLF_HOME>/data/processed |
Output directory for parquet files |
labels add-block¶
Create a manual label block with a feature summary and optional predicted label display.
taskclf labels add-block \
--start 2025-06-15T10:00:00 --end 2025-06-15T11:00:00 \
--label Build --user-id my-user --confidence 0.9
labels label-now¶
Label the last N minutes without typing timestamps. Queries a running ActivityWatch server for a live summary of apps used in the window. Falls back gracefully if AW is unreachable.
With options:
taskclf labels label-now \
--minutes 15 --label Debug \
--user-id my-user --confidence 0.9 \
--aw-host http://localhost:5600
labels show-queue¶
Display pending labeling requests sorted by confidence (lowest first).
labels export¶
Export label spans from labels.parquet to a CSV file. Columns
written: start_ts, end_ts, label, provenance, user_id,
confidence, extend_forward.
With a custom output path:
| Option | Default | Description |
|---|---|---|
--out, -o |
labels.csv |
Destination CSV file path |
--data-dir |
<TASKCLF_HOME>/data/processed |
Processed data directory (reads labels_v1/labels.parquet) |
labels project¶
Run strict block-to-window projection and write per-window labels.
train build-dataset¶
Joins features with labels via strict block-to-window projection,
applies exclusion rules (short sessions, missing features), splits by
time (70/15/15 per user), and writes X.parquet, y.parquet, and
splits.json.
taskclf train build-dataset \
--from 2025-06-10 --to 2025-06-15 \
--synthetic \
--holdout-fraction 0.1
train evaluate¶
Run full evaluation of a trained model against labeled data. Outputs
overall metrics, per-class precision/recall/F1, per-user macro-F1,
and acceptance-check verdicts. Writes evaluation.json,
calibration.json, confusion_matrix.csv, and calibration.png to
the output directory.
taskclf train evaluate \
--model-dir models/run_20250615_120000 \
--from 2025-06-10 --to 2025-06-15 --synthetic
With user holdout for seen/unseen evaluation:
taskclf train evaluate \
--model-dir models/run_20250615_120000 \
--from 2025-06-10 --to 2025-06-15 \
--holdout-fraction 0.1 --reject-threshold 0.55
| Option | Default | Description |
|---|---|---|
--model-dir |
(required) | Path to a model run directory |
--from |
(required) | Start date (YYYY-MM-DD) |
--to |
(required) | End date (YYYY-MM-DD, inclusive) |
--synthetic |
off | Generate dummy features + labels |
--data-dir |
data/processed |
Processed data directory |
--out-dir |
artifacts |
Output directory for evaluation artifacts |
--holdout-fraction |
0.0 |
Fraction of users held out for unseen-user evaluation |
--reject-threshold |
0.55 |
Max-probability below which prediction is rejected |
train tune-reject¶
Sweep reject thresholds on a validation set and recommend the optimal
value. Outputs a Rich table showing accuracy, reject rate, coverage,
and macro-F1 at each threshold. Writes reject_tuning.json to the
output directory.
taskclf train tune-reject \
--model-dir models/run_20250615_120000 \
--from 2025-06-10 --to 2025-06-15 --synthetic
| Option | Default | Description |
|---|---|---|
--model-dir |
(required) | Path to a model run directory |
--from |
(required) | Start date (YYYY-MM-DD) |
--to |
(required) | End date (YYYY-MM-DD, inclusive) |
--synthetic |
off | Generate dummy features + labels |
--data-dir |
data/processed |
Processed data directory |
--out-dir |
artifacts |
Output directory for tuning report |
--write-policy / --no-write-policy |
off | Write an inference policy binding model + calibrator + tuned threshold |
--calibrator-store |
(none) | Path to calibrator store (included in policy when --write-policy) |
--models-dir |
models |
Base directory for model bundles (used for policy file location) |
train calibrate¶
Fit per-user probability calibrators and save a calibrator store. Reports each user's eligibility (labeled windows, days, distinct labels) and writes the store (global + per-user calibrators) to disk.
taskclf train calibrate \
--model-dir models/run_20250615_120000 \
--from 2025-06-10 --to 2025-06-15 --synthetic
With custom eligibility thresholds and isotonic method:
taskclf train calibrate \
--model-dir models/run_20250615_120000 \
--from 2025-06-10 --to 2025-06-15 \
--method isotonic \
--min-windows 100 --min-days 2 --min-labels 2
| Option | Default | Description |
|---|---|---|
--model-dir |
(required) | Path to a model run directory |
--from |
(required) | Start date (YYYY-MM-DD) |
--to |
(required) | End date (YYYY-MM-DD, inclusive) |
--synthetic |
off | Generate dummy features + labels |
--data-dir |
data/processed |
Processed data directory |
--out |
artifacts/calibrator_store |
Output directory for calibrator store |
--method |
temperature |
Calibration method: temperature or isotonic |
--min-windows |
200 |
Minimum labeled windows for per-user calibration |
--min-days |
3 |
Minimum distinct days for per-user calibration |
--min-labels |
3 |
Minimum distinct core labels for per-user calibration |
train retrain¶
Run the full retrain pipeline: build dataset, train a challenger model,
evaluate it, run regression gates against the current champion, and
promote if all gates pass. Uses configs/retrain.yaml for cadence,
gate thresholds, and training parameters.
taskclf train retrain \
--config configs/retrain.yaml \
--from 2025-06-01 --to 2025-06-30 \
--force --synthetic
Use --dry-run to evaluate without promoting:
train check-retrain¶
Check whether a global retrain or calibrator update is due (read-only).
train list¶
List all model bundles under models/ with ranking metrics, eligibility
status, and active pointer. Columns include macro F1, weighted F1,
BreakIdle precision (derived from confusion matrix), and minimum
per-class precision.
Filter to eligible bundles only (compatible schema + label set):
Sort by a different metric:
Output as JSON for automation:
Filter to a specific schema hash:
| Option | Default | Description |
|---|---|---|
--models-dir |
models |
Base directory for model bundles |
--sort |
macro_f1 |
Sort column: macro_f1, weighted_f1, or created_at |
--eligible |
off | Show only eligible bundles (compatible schema + label set) |
--schema-hash |
(current runtime) | Filter to bundles matching this schema hash |
--json |
off | Output as JSON instead of a table |
model inspect¶
Inspect a trained model bundle: metadata, bundle-saved validation metrics
(with per-class precision/recall/F1 and support derived from the saved
confusion matrix, plus top confusion pairs), and a short description of
multiclass prediction code paths. Optionally replay held-out test
evaluation for a date range (same pipeline as taskclf train evaluate),
which adds calibration scalars (ECE, Brier, log loss), slice metrics
(default: user_id, app_id, app_category, domain_category,
hour_of_day), unknown-category rates vs the bundle encoders, and
test-set class distribution. Use --json for the full structured
payload (bundle_saved_validation vs replayed_test_evaluation.report).
Bundle-only (no labeled replay):
Machine-readable JSON:
Replay test metrics on synthetic data (no feature parquet required):
taskclf model inspect \
--model-dir models/run_001 \
--from 2026-02-01 --to 2026-02-16 \
--synthetic
Replay using processed features under --data-dir (omit --synthetic):
taskclf model inspect \
--model-dir models/run_001 \
--from 2026-02-01 --to 2026-02-16 \
--data-dir data/processed
| Option | Default | Description |
|---|---|---|
--model-dir |
(required) | Path to a model run directory |
--json |
off | Emit structured JSON instead of tables |
--from |
(none) | Start date for test replay (YYYY-MM-DD); requires --to |
--to |
(none) | End date for test replay (inclusive); requires --from |
--data-dir |
data/processed when replaying without --synthetic |
Processed data directory |
--synthetic |
off | Replay on dummy features + labels |
--holdout-fraction |
0.0 |
Fraction of users held out for unseen-user evaluation |
--reject-threshold |
see defaults | Max probability below which a prediction is rejected |
model set-active¶
Manually set the active model pointer to a specific bundle. Useful for rollback (reverting to a known-good model) or manual override after a bad promotion. The bundle must be valid and compatible with the current schema and label set.
With a custom models directory:
| Option | Default | Description |
|---|---|---|
--model-id |
(required) | Bundle directory name under models/ |
--models-dir |
models |
Base directory for model bundles |
policy show¶
Print the current inference policy or report that none exists.
| Option | Default | Description |
|---|---|---|
--models-dir |
models |
Base directory for model bundles |
policy create¶
Create an inference policy binding model + calibrator store + reject threshold. Validates all bindings before writing.
taskclf policy create \
--model-dir models/run_001 \
--calibrator-store artifacts/calibrator_store \
--reject-threshold 0.55
| Option | Default | Description |
|---|---|---|
--model-dir |
(required) | Path to a model run directory |
--reject-threshold |
0.55 |
Reject threshold for this model+calibration pair |
--calibrator-store |
(none) | Path to calibrator store directory |
--models-dir |
models |
Base directory for model bundles |
policy remove¶
Remove the inference policy file. Inference falls back to
active.json resolution.
| Option | Default | Description |
|---|---|---|
--models-dir |
models |
Base directory for model bundles |
taxonomy validate¶
Validate a user taxonomy YAML file and report any errors.
taxonomy show¶
Display the taxonomy mapping as a Rich table showing bucket names, core labels, colors, and advanced settings.
taxonomy init¶
Generate a default taxonomy YAML with one bucket per core label (identity mapping) as a starting point for customisation.
infer batch¶
Run batch inference with optional taxonomy mapping. When --taxonomy
is provided, a mapped_label column is added to predictions.csv.
--model-dir is optional. When omitted, the model is auto-resolved:
first from models/active.json, then by best-model selection from
--models-dir (default models/). See docs/guide/model_selection.md
for the full resolution precedence.
# With explicit model directory:
taskclf infer batch \
--model-dir models/run_20250615_120000 \
--from 2025-06-10 --to 2025-06-15 --synthetic \
--taxonomy configs/user_taxonomy.yaml
# With auto-resolution (uses active.json or best model):
taskclf infer batch \
--from 2025-06-10 --to 2025-06-15 --synthetic
| Option | Default | Description |
|---|---|---|
--model-dir |
(auto-resolved) | Path to a model bundle directory |
--models-dir |
models |
Base directory for model bundles (used for auto-resolution) |
infer online (with taxonomy, calibrator, and label queue)¶
Run online inference with optional taxonomy mapping and probability
calibration. Each prediction is written as a full WindowPrediction
row (core label, core probs, confidence, rejection status, mapped
label, mapped probs). Segments are hysteresis-merged so blocks shorter
than MIN_BLOCK_DURATION_SECONDS (3 min) are absorbed by neighbours.
--model-dir is optional (same auto-resolution as infer batch).
When --models-dir is provided, the online loop watches
models/active.json for changes and hot-reloads the model bundle
without restarting. The swap only occurs after the new bundle loads
successfully; on failure the current model is kept.
When --label-queue is enabled, predictions with confidence below
--label-confidence (default 0.55) are auto-enqueued to the labeling
queue for manual review. Enqueued items appear in labels show-queue
and the web UI.
# With auto-resolution and model reload:
taskclf infer online \
--taxonomy configs/user_taxonomy.yaml \
--calibrator calibrators/user_cal.json
# With explicit model directory:
taskclf infer online \
--model-dir models/run_20250615_120000 \
--taxonomy configs/user_taxonomy.yaml \
--calibrator calibrators/user_cal.json
With label queue integration:
| Option | Default | Description |
|---|---|---|
--model-dir |
(auto-resolved) | Path to a model bundle directory |
--models-dir |
models |
Base directory for model bundles (used for auto-resolution and reload) |
infer baseline¶
Run rule-based heuristic inference without a trained model. Produces
baseline_predictions.csv and baseline_segments.json.
infer compare¶
Compare rule baseline vs a trained ML model on labeled data. Outputs a
Rich summary table and writes baseline_vs_model.json.
taskclf infer compare \
--model-dir models/run_20250615_120000 \
--from 2025-06-10 --to 2025-06-15 --synthetic
monitor drift-check¶
Run drift detection comparing reference vs current prediction windows. Flags feature PSI/KS drift, reject-rate increases, entropy spikes, and class-distribution shifts. Optionally auto-creates labeling tasks.
taskclf monitor drift-check \
--ref-features data/processed/features_ref.parquet \
--cur-features data/processed/features_cur.parquet \
--ref-predictions artifacts/predictions_ref.csv \
--cur-predictions artifacts/predictions_cur.csv \
--auto-label --auto-label-limit 50
monitor telemetry¶
Compute a telemetry snapshot (feature missingness, confidence stats, reject rate, entropy, class distribution) and append to the store.
taskclf monitor telemetry \
--features data/processed/features.parquet \
--predictions artifacts/predictions.csv \
--user-id user-1 \
--store-dir artifacts/telemetry
monitor show¶
Display recent telemetry snapshots as a Rich table.
diagnostics¶
Collect environment and runtime info for bug reports. Prints a
human-readable summary by default, or JSON with --json.
Output as JSON:
Include log tail:
Write to a file:
Output includes:
- taskclf version, Python version, OS and architecture
- Resolved TASKCLF_HOME path
- ActivityWatch reachability (graceful on failure)
- Available model bundles (from models/)
- Config summary (user_id always redacted)
- Disk usage of data/, models/, logs/
- Last N log lines (when --include-logs is passed)
| Option | Default | Description |
|---|---|---|
--json |
off | Output as JSON instead of human-readable text |
--include-logs |
off | Append the last N log lines to the output |
--log-lines |
50 |
Number of log lines to include (requires --include-logs) |
--out |
(stdout) | Write output to a file instead of stdout |
tray¶
Run a persistent system tray app that polls ActivityWatch, detects
activity transitions, and prompts for labels. Automatically starts the
web UI server. Left-clicking the tray icon opens the web dashboard
where all labeling is done through the UI. Right-clicking shows the
tray menu: Toggle Dashboard, Pause / Resume, Show Status;
Today's Labels, Import Labels, Export Labels; Prediction Model
(submenu), Open Data Folder, Edit Config, Advanced (submenu: Edit Inference Policy), Report Issue; Quit.
When --model-dir is
provided, the app suggests labels using the trained model. To reduce
cold-start latency, the web UI server starts before the optional model
bundle finishes loading, so suggestions can appear a moment after the
dashboard becomes reachable.
With a model for label suggestions:
With frontend hot reload for development:
Open in browser instead of native window (useful combined with --dev):
Keep the browser server headless for another host shell (for example Electron):
Fully browser-based (no native tray icon, no pywebview):
| Option | Default | Description |
|---|---|---|
--model-dir |
(none) | Model bundle for label suggestions |
--aw-host |
http://localhost:5600 |
ActivityWatch server URL |
--poll-seconds |
60 |
Seconds between AW polls |
--aw-timeout |
10 |
Seconds to wait for AW API responses |
--transition-minutes |
2 |
Minutes a new app must persist before prompting |
--data-dir |
data/processed (ephemeral in --dev) |
Processed data directory; omit with --dev for an auto-cleaned temp dir |
--port |
8741 |
Port for the embedded web UI server |
--dev |
off | Vite hot reload + ephemeral data dir (unless --data-dir is set) |
--browser |
off | Open UI in browser instead of native window |
--open-browser / --no-open-browser |
--open-browser |
When --browser is set, open the dashboard automatically in the default browser |
--no-tray |
off | Skip the native tray icon (use with --browser for browser-only mode) |
electron¶
Launch the optional Electron desktop shell. Electron owns the native tray icon and three frameless BrowserWindows (compact pill, label popup, state panel popup); the label and panel popups are created when first opened. The existing Python tray backend runs as a sidecar process in browser mode without opening a separate browser tab. Clicking the tray icon shows or focuses the dashboard; hiding remains an explicit tray-menu action via Toggle Dashboard.
With a model for label suggestions:
With frontend hot reload and an ephemeral data dir:
| Option | Default | Description |
|---|---|---|
--model-dir |
(none) | Model bundle for label suggestions |
--models-dir |
models |
Directory containing model bundles |
--aw-host |
http://localhost:5600 |
ActivityWatch server URL |
--poll-seconds |
60 |
Seconds between AW polls |
--title-salt |
taskclf-default-salt |
Salt for hashing window titles |
--data-dir |
data/processed (ephemeral in --dev) |
Processed data directory; omit with --dev for an auto-cleaned temp dir |
--transition-minutes |
2 |
Minutes a new app must persist before prompting |
--port |
8741 |
Port for the embedded web UI server and Electron sidecar |
--dev |
off | Enable frontend hot reload inside Electron; uses an ephemeral data dir unless --data-dir is set |
--username |
(none) | Display name to persist in config.toml |
--retrain-config |
(none) | Retrain YAML config path passed through to the tray backend |
In the packaged Electron app (installers / .app), the main process runs a
UI port preflight on TASKCLF_ELECTRON_UI_PORT (default 8741) before
starting the sidecar: it can stop a leftover taskclf listener automatically or
prompt if another process owns the port. See
electron_shell.
Optional launcher environment variables are documented under
electron_shell (for example TASKCLF_ELECTRON_SHELL_WAIT_MS,
TASKCLF_ELECTRON_TRAY_SYNC_MS, manifest timeouts).
ui¶
Launch the labeling UI as a native floating window with live prediction
streaming. Starts a FastAPI server, an ActivityMonitor background
thread, and a pywebview window. When --model-dir is provided, the
app suggests labels on activity transitions using the trained model.
With a model for live predictions:
With frontend hot reload for development:
Open in browser instead of native window:
Combined dev + browser mode:
In browser mode, --dev now enables backend auto-reload as well, so
editing Python files under src/taskclf/ restarts the FastAPI process
while Vite keeps frontend HMR active.
Before the backend starts, taskclf ui runs a local UI-port preflight on
--port (default 8741). If the listener on that port confidently looks like
another taskclf UI or tray backend, the CLI stops it and continues; if a
different process owns the port, startup aborts with the PID and command line
so you can stop it manually or choose another port.
| Option | Default | Description |
|---|---|---|
--port |
8741 |
Port for the web UI server |
--model-dir |
(none) | Model bundle for live predictions |
--aw-host |
http://localhost:5600 |
ActivityWatch server URL |
--poll-seconds |
60 |
Seconds between AW polling iterations |
--title-salt |
taskclf-default-salt |
Salt for hashing window titles |
--data-dir |
data/processed (ephemeral in --dev) |
Processed data directory; omit with --dev for an auto-cleaned temp dir |
--transition-minutes |
2 |
Minutes a new app must persist before suggesting a label |
--browser |
off | Open UI in browser instead of native window |
--dev |
off | Start Vite dev server for frontend hot reload; in browser mode, the FastAPI backend also runs with auto-reload. Uses an ephemeral data dir unless --data-dir is set |
taskclf.cli.main
¶
Typer CLI entrypoint and command definitions for taskclf.
main(version=typer.Option(False, '--version', '-v', callback=_version_callback, is_eager=True, help='Show version and exit.'), verbose=typer.Option(False, '--verbose', help='Enable DEBUG logging with file/line info.'))
¶
Local-first task classifier CLI.
Source code in src/taskclf/cli/main.py
ingest_aw_cmd(input_file=typer.Option(..., '--input', help='Path to an ActivityWatch export JSON file'), out_dir=typer.Option(DEFAULT_RAW_AW_DIR, help='Output directory for normalized events (partitioned by date)'), title_salt=typer.Option(DEFAULT_TITLE_SALT, '--title-salt', help='Salt for hashing window titles'))
¶
Ingest an ActivityWatch JSON export into privacy-safe normalized events.
Source code in src/taskclf/cli/main.py
features_build(date=typer.Option(None, help='Single date in YYYY-MM-DD format (mutually exclusive with --date-from/--date-to)'), date_from=typer.Option(None, '--date-from', help='Start of date range (YYYY-MM-DD, inclusive)'), date_to=typer.Option(None, '--date-to', help='End of date range (YYYY-MM-DD, inclusive)'), data_dir=typer.Option(DEFAULT_DATA_DIR, help='Processed data directory (derived from TASKCLF_HOME)'), aw_host=typer.Option(DEFAULT_AW_HOST, '--aw-host', help='ActivityWatch server URL'), title_salt=typer.Option(DEFAULT_TITLE_SALT, '--title-salt', help='Salt for hashing window titles'), synthetic=typer.Option(False, '--synthetic', help='Generate dummy features instead of fetching from AW'))
¶
Build per-minute feature rows by fetching from a running ActivityWatch server.
Supports a single --date or a --date-from / --date-to range. Use --synthetic to generate dummy data for testing.
Source code in src/taskclf/cli/main.py
194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 | |
labels_import_cmd(file=typer.Option(..., '--file', help='Path to labels CSV (start_ts, end_ts, label, provenance)'), data_dir=typer.Option(DEFAULT_DATA_DIR, help='Processed data directory (derived from TASKCLF_HOME)'))
¶
Import label spans from a CSV file and write to parquet.
Source code in src/taskclf/cli/main.py
labels_add_block_cmd(start=typer.Option(..., '--start', help='Block start timestamp (ISO-8601 UTC)'), end=typer.Option(..., '--end', help='Block end timestamp (ISO-8601 UTC)'), label=typer.Option(..., '--label', help='Core label (Build, Debug, Review, Write, ReadResearch, Communicate, Meet, BreakIdle)'), user_id=typer.Option('default-user', '--user-id', help='User ID for this label'), confidence=typer.Option(None, '--confidence', min=0.0, max=1.0, help='Labeler confidence (0-1)'), data_dir=typer.Option(DEFAULT_DATA_DIR, help='Processed data directory (derived from TASKCLF_HOME)'), model_dir=typer.Option(None, '--model-dir', help='Model bundle directory (for predicted label display)'))
¶
Create a manual label block for a time range.
Source code in src/taskclf/cli/main.py
314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 | |
labels_label_now_cmd(minutes=typer.Option(10, '--minutes', min=1, help='How many minutes back from now to label'), label=typer.Option(..., '--label', help='Core label (Build, Debug, Review, Write, ReadResearch, Communicate, Meet, BreakIdle)'), user_id=typer.Option('default-user', '--user-id', help='User ID for this label'), confidence=typer.Option(None, '--confidence', min=0.0, max=1.0, help='Labeler confidence (0-1)'), aw_host=typer.Option(DEFAULT_AW_HOST, '--aw-host', help='ActivityWatch server URL for live summary'), title_salt=typer.Option(DEFAULT_TITLE_SALT, '--title-salt', help='Salt for hashing window titles'), data_dir=typer.Option(DEFAULT_DATA_DIR, help='Processed data directory (derived from TASKCLF_HOME)'))
¶
Label the last N minutes with a single command (no timestamps needed).
Source code in src/taskclf/cli/main.py
424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 | |
labels_show_queue_cmd(user_id=typer.Option(None, '--user-id', help='Filter to a specific user'), limit=typer.Option(10, '--limit', help='Maximum items to show'), data_dir=typer.Option(DEFAULT_DATA_DIR, help='Processed data directory (derived from TASKCLF_HOME)'))
¶
Show pending items in the active labeling queue.
Source code in src/taskclf/cli/main.py
labels_export_cmd(out=typer.Option('labels.csv', '--out', '-o', help='Destination CSV file path'), data_dir=typer.Option(DEFAULT_DATA_DIR, help='Processed data directory'))
¶
Export labels.parquet to CSV.
Source code in src/taskclf/cli/main.py
labels_project_cmd(date_from=typer.Option(..., '--from', help='Start date (YYYY-MM-DD)'), date_to=typer.Option(..., '--to', help='End date (YYYY-MM-DD, inclusive)'), data_dir=typer.Option(DEFAULT_DATA_DIR, help='Processed data directory (derived from TASKCLF_HOME)'), out_dir=typer.Option(DEFAULT_DATA_DIR, '--out-dir', help='Output directory for projected labels'))
¶
Project label blocks onto feature windows using strict containment rules.
Source code in src/taskclf/cli/main.py
train_build_dataset_cmd(date_from=typer.Option(..., '--from', help='Start date (YYYY-MM-DD)'), date_to=typer.Option(..., '--to', help='End date (YYYY-MM-DD, inclusive)'), synthetic=typer.Option(False, '--synthetic', help='Generate dummy features + labels'), data_dir=typer.Option(DEFAULT_DATA_DIR, help='Processed data directory (derived from TASKCLF_HOME)'), out_dir=typer.Option(DEFAULT_DATA_DIR, '--out-dir', help='Output directory for X/y/splits'), holdout_fraction=typer.Option(0.0, '--holdout-fraction', help='Fraction of users to hold out for test'), train_ratio=typer.Option(0.7, '--train-ratio', help='Chronological train fraction per user'), val_ratio=typer.Option(0.15, '--val-ratio', help='Chronological val fraction per user'))
¶
Build a training dataset: join features + labels, exclude, split, and write X/y/splits.
Source code in src/taskclf/cli/main.py
704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 | |
train_lgbm_cmd(date_from=typer.Option(..., '--from', help='Start date (YYYY-MM-DD)'), date_to=typer.Option(..., '--to', help='End date (YYYY-MM-DD, inclusive)'), synthetic=typer.Option(False, '--synthetic', help='Generate dummy features + labels instead of reading from disk'), models_dir=typer.Option(DEFAULT_MODELS_DIR, help='Base directory for model bundles (derived from TASKCLF_HOME)'), data_dir=typer.Option(DEFAULT_DATA_DIR, help='Processed data directory (derived from TASKCLF_HOME)'), num_boost_round=typer.Option(DEFAULT_NUM_BOOST_ROUND, help='Number of boosting rounds'), class_weight=typer.Option('balanced', '--class-weight', help="Class-weight strategy: 'balanced' (inverse-frequency) or 'none'"))
¶
Train a LightGBM multiclass model and save the model bundle.
Source code in src/taskclf/cli/main.py
797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 | |
train_evaluate_cmd(model_dir=typer.Option(..., '--model-dir', help='Path to a model run directory'), date_from=typer.Option(..., '--from', help='Start date (YYYY-MM-DD)'), date_to=typer.Option(..., '--to', help='End date (YYYY-MM-DD, inclusive)'), synthetic=typer.Option(False, '--synthetic', help='Generate dummy features + labels'), data_dir=typer.Option(DEFAULT_DATA_DIR, help='Processed data directory (derived from TASKCLF_HOME)'), out_dir=typer.Option(DEFAULT_OUT_DIR, help='Output directory for evaluation artifacts'), holdout_fraction=typer.Option(0.0, '--holdout-fraction', help='Fraction of users held out for unseen-user evaluation'), reject_threshold=typer.Option(DEFAULT_REJECT_THRESHOLD, '--reject-threshold', help='Max-probability below which prediction is rejected'))
¶
Run full evaluation of a trained model: metrics, calibration, acceptance checks.
Source code in src/taskclf/cli/main.py
935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 | |
train_tune_reject_cmd(model_dir=typer.Option(..., '--model-dir', help='Path to a model run directory'), date_from=typer.Option(..., '--from', help='Start date (YYYY-MM-DD)'), date_to=typer.Option(..., '--to', help='End date (YYYY-MM-DD, inclusive)'), synthetic=typer.Option(False, '--synthetic', help='Generate dummy features + labels'), data_dir=typer.Option(DEFAULT_DATA_DIR, help='Processed data directory (derived from TASKCLF_HOME)'), out_dir=typer.Option(DEFAULT_OUT_DIR, help='Output directory for tuning report'), write_policy=typer.Option(False, '--write-policy/--no-write-policy', help='Write an inference policy binding model + calibrator + tuned threshold'), calibrator_store=typer.Option(None, '--calibrator-store', help='Path to calibrator store directory (included in policy when --write-policy)'), models_dir=typer.Option(DEFAULT_MODELS_DIR, '--models-dir', help='Base directory for model bundles (used for policy file location)'))
¶
Sweep reject thresholds on a validation set and recommend the best one.
Source code in src/taskclf/cli/main.py
1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 | |
train_calibrate_cmd(model_dir=typer.Option(..., '--model-dir', help='Path to a model run directory'), date_from=typer.Option(..., '--from', help='Start date (YYYY-MM-DD)'), date_to=typer.Option(..., '--to', help='End date (YYYY-MM-DD, inclusive)'), synthetic=typer.Option(False, '--synthetic', help='Generate dummy features + labels'), data_dir=typer.Option(DEFAULT_DATA_DIR, help='Processed data directory (derived from TASKCLF_HOME)'), out=typer.Option(DEFAULT_OUT_DIR + '/calibrator_store', '--out', help='Output directory for calibrator store'), method=typer.Option(DEFAULT_CALIBRATION_METHOD, '--method', help="Calibration method: 'temperature' or 'isotonic'"), min_windows=typer.Option(DEFAULT_MIN_LABELED_WINDOWS, '--min-windows', help='Minimum labeled windows for per-user calibration'), min_days=typer.Option(DEFAULT_MIN_LABELED_DAYS, '--min-days', help='Minimum distinct days for per-user calibration'), min_labels=typer.Option(DEFAULT_MIN_DISTINCT_LABELS, '--min-labels', help='Minimum distinct core labels for per-user calibration'))
¶
Fit per-user probability calibrators and save a calibrator store.
Source code in src/taskclf/cli/main.py
1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 | |
train_retrain_cmd(config=typer.Option(None, '--config', help='Path to retrain YAML config'), date_from=typer.Option(None, '--from', help='Start date (YYYY-MM-DD); defaults to lookback from today'), date_to=typer.Option(None, '--to', help='End date (YYYY-MM-DD, inclusive); defaults to today'), synthetic=typer.Option(False, '--synthetic', help='Generate dummy features + labels'), models_dir=typer.Option(DEFAULT_MODELS_DIR, help='Base directory for model bundles (derived from TASKCLF_HOME)'), data_dir=typer.Option(DEFAULT_DATA_DIR, help='Processed data directory (derived from TASKCLF_HOME)'), out_dir=typer.Option(DEFAULT_OUT_DIR, help='Output directory for evaluation artifacts'), force=typer.Option(False, '--force', help='Skip cadence check and retrain immediately'), dry_run=typer.Option(False, '--dry-run', help='Evaluate but do not promote'), holdout_fraction=typer.Option(0.0, '--holdout-fraction', help='Fraction of users held out for test'), reject_threshold=typer.Option(DEFAULT_REJECT_THRESHOLD, '--reject-threshold', help='Reject threshold'), write_policy=typer.Option(False, '--write-policy/--no-write-policy', help='Write an inference policy on promotion'))
¶
Run the full retrain pipeline: train, evaluate, gate-check, promote.
Source code in src/taskclf/cli/main.py
1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 | |
train_check_retrain_cmd(config=typer.Option(None, '--config', help='Path to retrain YAML config'), models_dir=typer.Option(DEFAULT_MODELS_DIR, help='Base directory for model bundles (derived from TASKCLF_HOME)'), calibrator_store=typer.Option(None, '--calibrator-store', help='Path to calibrator store directory'))
¶
Check whether retraining or calibrator update is due (read-only).
Source code in src/taskclf/cli/main.py
1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 | |
train_list_cmd(models_dir=typer.Option(DEFAULT_MODELS_DIR, help='Base directory for model bundles (derived from TASKCLF_HOME)'), sort=typer.Option('macro_f1', '--sort', help='Sort column: macro_f1|weighted_f1|created_at'), eligible_only=typer.Option(False, '--eligible', help='Show only eligible bundles (compatible schema + label set)'), schema_hash=typer.Option(None, '--schema-hash', help='Filter to bundles matching this schema hash (default: current runtime hash)'), json_output=typer.Option(False, '--json', help='Output as JSON instead of a table'))
¶
List model bundles with ranking metrics and status.
Source code in src/taskclf/cli/main.py
1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 | |
model_set_active_cmd(model_id=typer.Option(..., '--model-id', help='Model bundle directory name (under models/)'), models_dir=typer.Option(DEFAULT_MODELS_DIR, '--models-dir', help='Base directory for model bundles (derived from TASKCLF_HOME)'))
¶
Manually set the active model pointer (rollback / override).
Source code in src/taskclf/cli/main.py
1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 | |
model_inspect_cmd(model_dir=typer.Option(..., '--model-dir', help='Path to a model run directory'), json_output=typer.Option(False, '--json', help='Output structured inspection as JSON'), date_from=typer.Option(None, '--from', help='Start date for held-out test replay (YYYY-MM-DD); requires --to'), date_to=typer.Option(None, '--to', help='End date for held-out test replay (inclusive); requires --from'), data_dir=typer.Option(None, '--data-dir', help=f'Processed data directory for replay (default when omitted: {DEFAULT_DATA_DIR}); not needed with --synthetic'), synthetic=typer.Option(False, '--synthetic', help='Replay on dummy features + labels (no disk features required)'), holdout_fraction=typer.Option(0.0, '--holdout-fraction', help='Fraction of users held out for unseen-user evaluation (replay)'), reject_threshold=typer.Option(DEFAULT_REJECT_THRESHOLD, '--reject-threshold', help='Max-probability below which prediction is rejected (replay)'))
¶
Inspect a model bundle and optionally replay held-out test evaluation.
Source code in src/taskclf/cli/main.py
1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 | |
policy_show_cmd(models_dir=typer.Option(DEFAULT_MODELS_DIR, '--models-dir', help='Base directory for model bundles'))
¶
Print the current inference policy or report that none exists.
Source code in src/taskclf/cli/main.py
policy_create_cmd(model_dir=typer.Option(..., '--model-dir', help='Path to a model run directory'), reject_threshold=typer.Option(DEFAULT_REJECT_THRESHOLD, '--reject-threshold', help='Reject threshold for this model+calibration pair'), calibrator_store_dir=typer.Option(None, '--calibrator-store', help='Path to calibrator store directory'), models_dir=typer.Option(DEFAULT_MODELS_DIR, '--models-dir', help='Base directory for model bundles'))
¶
Create an inference policy binding model + calibrator + threshold.
Source code in src/taskclf/cli/main.py
2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 | |
policy_remove_cmd(models_dir=typer.Option(DEFAULT_MODELS_DIR, '--models-dir', help='Base directory for model bundles'))
¶
Remove the inference policy file (falls back to active.json).
Source code in src/taskclf/cli/main.py
taxonomy_validate_cmd(config=typer.Option(..., '--config', help='Path to a taxonomy YAML file'))
¶
Validate a user taxonomy YAML file and report errors.
Source code in src/taskclf/cli/main.py
taxonomy_show_cmd(config=typer.Option(..., '--config', help='Path to a taxonomy YAML file'))
¶
Display a taxonomy mapping as a Rich table.
Source code in src/taskclf/cli/main.py
taxonomy_init_cmd(out=typer.Option('configs/user_taxonomy.yaml', '--out', help='Output path for the generated taxonomy YAML'))
¶
Generate a default taxonomy YAML (identity mapping: one bucket per core label).
Source code in src/taskclf/cli/main.py
infer_batch_cmd(model_dir=typer.Option(None, '--model-dir', help='Path to a model run directory (auto-resolved from models/ if omitted)'), models_dir=typer.Option(DEFAULT_MODELS_DIR, '--models-dir', help='Base directory for model bundles (used for auto-resolution)'), date_from=typer.Option(..., '--from', help='Start date (YYYY-MM-DD)'), date_to=typer.Option(..., '--to', help='End date (YYYY-MM-DD, inclusive)'), synthetic=typer.Option(False, '--synthetic', help='Generate dummy features instead of reading from disk'), data_dir=typer.Option(DEFAULT_DATA_DIR, help='Processed data directory (derived from TASKCLF_HOME)'), out_dir=typer.Option(DEFAULT_OUT_DIR, help='Output directory for predictions and segments'), smooth_window=typer.Option(DEFAULT_SMOOTH_WINDOW, help='Rolling majority smoothing window size'), reject_threshold=typer.Option(DEFAULT_REJECT_THRESHOLD, '--reject-threshold', help='Max-probability below which prediction is rejected as Mixed/Unknown'), taxonomy_config=typer.Option(None, '--taxonomy', help='Path to a taxonomy YAML file for user-specific label mapping'), calibrator_store_dir=typer.Option(None, '--calibrator-store', help='Path to a calibrator store directory for per-user calibration'))
¶
Run batch inference: predict, smooth, and segmentize.
Source code in src/taskclf/cli/main.py
2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 | |
infer_online_cmd(model_dir=typer.Option(None, '--model-dir', help='Path to a model run directory (auto-resolved from models/ if omitted)'), models_dir=typer.Option(DEFAULT_MODELS_DIR, '--models-dir', help='Base directory for model bundles (used for auto-resolution and reload)'), poll_seconds=typer.Option(DEFAULT_POLL_SECONDS, '--poll-seconds', help='Seconds between polling iterations'), aw_host=typer.Option(DEFAULT_AW_HOST, '--aw-host', help='ActivityWatch server URL'), smooth_window=typer.Option(DEFAULT_SMOOTH_WINDOW, '--smooth-window', help='Rolling majority smoothing window size'), title_salt=typer.Option(DEFAULT_TITLE_SALT, '--title-salt', help='Salt for hashing window titles'), out_dir=typer.Option(DEFAULT_OUT_DIR, help='Output directory for predictions and segments'), reject_threshold=typer.Option(DEFAULT_REJECT_THRESHOLD, '--reject-threshold', help='Max-probability below which prediction is rejected as Mixed/Unknown'), taxonomy_config=typer.Option(None, '--taxonomy', help='Path to a taxonomy YAML file for user-specific label mapping'), calibrator_config=typer.Option(None, '--calibrator', help='Path to a calibrator JSON file for probability calibration'), calibrator_store_dir=typer.Option(None, '--calibrator-store', help='Path to a calibrator store directory for per-user calibration'), label_queue=typer.Option(False, '--label-queue/--no-label-queue', help='Auto-enqueue low-confidence buckets for manual labeling'), label_confidence=typer.Option(DEFAULT_LABEL_CONFIDENCE_THRESHOLD, '--label-confidence', help='Confidence threshold below which buckets are enqueued for labeling'), data_dir=typer.Option(DEFAULT_DATA_DIR, help='Processed data directory (used for label queue path)'))
¶
Run online inference: poll ActivityWatch, predict, smooth, and report.
Source code in src/taskclf/cli/main.py
2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 | |
infer_baseline_cmd(date_from=typer.Option(..., '--from', help='Start date (YYYY-MM-DD)'), date_to=typer.Option(..., '--to', help='End date (YYYY-MM-DD, inclusive)'), synthetic=typer.Option(False, '--synthetic', help='Generate dummy features instead of reading from disk'), data_dir=typer.Option(DEFAULT_DATA_DIR, help='Processed data directory (derived from TASKCLF_HOME)'), out_dir=typer.Option(DEFAULT_OUT_DIR, help='Output directory for predictions and segments'), smooth_window=typer.Option(DEFAULT_SMOOTH_WINDOW, help='Rolling majority smoothing window size'))
¶
Run rule-based baseline inference (no ML model required).
Source code in src/taskclf/cli/main.py
2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 | |
infer_compare_cmd(model_dir=typer.Option(..., '--model-dir', help='Path to a model run directory'), date_from=typer.Option(..., '--from', help='Start date (YYYY-MM-DD)'), date_to=typer.Option(..., '--to', help='End date (YYYY-MM-DD, inclusive)'), synthetic=typer.Option(False, '--synthetic', help='Generate dummy features + labels'), data_dir=typer.Option(DEFAULT_DATA_DIR, help='Processed data directory (derived from TASKCLF_HOME)'), out_dir=typer.Option(DEFAULT_OUT_DIR, help='Output directory for comparison report'))
¶
Compare rule baseline vs ML model on labeled data.
Source code in src/taskclf/cli/main.py
2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 | |
report_daily_cmd(segments_file=typer.Option(..., '--segments-file', help='Path to segments.json'), predictions_file=typer.Option(None, '--predictions-file', help='Path to predictions CSV (for flap rates and mapped breakdown)'), features_dir=typer.Option(None, '--features-dir', help='Path to features data dir (for context-switching stats)'), out_dir=typer.Option(DEFAULT_OUT_DIR, help='Output directory for report files'), fmt=typer.Option('json', '--format', help='Output format: json, csv, parquet, or all'))
¶
Generate a daily report from a segments JSON file.
When --predictions-file is provided, flap rates and mapped-label breakdown are included. When --features-dir is provided, context-switching statistics are computed from app_switch_count_last_5m.
Source code in src/taskclf/cli/main.py
2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 | |
monitor_drift_check_cmd(ref_features=typer.Option(..., '--ref-features', help='Path to reference features parquet'), cur_features=typer.Option(..., '--cur-features', help='Path to current features parquet'), ref_predictions=typer.Option(..., '--ref-predictions', help='Path to reference predictions CSV'), cur_predictions=typer.Option(..., '--cur-predictions', help='Path to current predictions CSV'), psi_threshold=typer.Option(DEFAULT_PSI_THRESHOLD, '--psi-threshold', help='PSI threshold for feature drift'), ks_alpha=typer.Option(DEFAULT_KS_ALPHA, '--ks-alpha', help='KS significance level'), reject_increase=typer.Option(DEFAULT_REJECT_RATE_INCREASE_THRESHOLD, '--reject-increase', help='Reject-rate increase threshold'), entropy_multiplier=typer.Option(DEFAULT_ENTROPY_SPIKE_MULTIPLIER, '--entropy-multiplier', help='Entropy spike multiplier'), class_shift=typer.Option(DEFAULT_CLASS_SHIFT_THRESHOLD, '--class-shift', help='Class distribution shift threshold'), auto_label=typer.Option(True, '--auto-label/--no-auto-label', help='Auto-create labeling tasks on drift'), auto_label_limit=typer.Option(DEFAULT_DRIFT_AUTO_LABEL_LIMIT, '--auto-label-limit', help='Max buckets to auto-enqueue'), queue_path=typer.Option('data/processed/labels_v1/queue.json', '--queue-path', help='Path to labeling queue JSON'), out_dir=typer.Option(DEFAULT_OUT_DIR, help='Output directory for drift report'))
¶
Run drift detection comparing reference vs current prediction windows.
Source code in src/taskclf/cli/main.py
3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 | |
monitor_telemetry_cmd(features=typer.Option(..., '--features', help='Path to features parquet'), predictions=typer.Option(..., '--predictions', help='Path to predictions CSV'), user_id=typer.Option(None, '--user-id', help='Scope to a specific user'), store_dir=typer.Option(DEFAULT_TELEMETRY_DIR, '--store-dir', help='Telemetry store directory'))
¶
Compute a telemetry snapshot and append to the store.
Source code in src/taskclf/cli/main.py
monitor_show_cmd(store_dir=typer.Option(DEFAULT_TELEMETRY_DIR, '--store-dir', help='Telemetry store directory'), user_id=typer.Option(None, '--user-id', help='Filter to a specific user'), last=typer.Option(10, '--last', help='Number of recent snapshots to show'))
¶
Display recent telemetry snapshots.
Source code in src/taskclf/cli/main.py
migrate_audit_cmd(data_dir=typer.Option(DEFAULT_DATA_DIR, '--data-dir', help='Root directory to scan for datetime artifacts'))
¶
Scan data files for naive (tz-unaware) datetime columns.
Source code in src/taskclf/cli/main.py
3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 | |
migrate_rewrite_cmd(data_dir=typer.Option(DEFAULT_DATA_DIR, '--data-dir', help='Root directory to scan and rewrite'), no_backup=typer.Option(False, '--no-backup', help='Skip creating .bak backup files'))
¶
Rewrite naive datetime columns/fields to timezone-aware UTC.
Source code in src/taskclf/cli/main.py
tray_cmd(model_dir=typer.Option(None, '--model-dir', help='Path to a model run directory (enables label suggestions)'), models_dir=typer.Option(DEFAULT_MODELS_DIR, '--models-dir', help='Directory containing model bundles (enables Model submenu for hot-swapping)'), aw_host=typer.Option(DEFAULT_AW_HOST, '--aw-host', help='ActivityWatch server URL'), poll_seconds=typer.Option(DEFAULT_POLL_SECONDS, '--poll-seconds', help='Seconds between polling iterations'), aw_timeout=typer.Option(DEFAULT_AW_TIMEOUT_SECONDS, '--aw-timeout', help='Seconds to wait for ActivityWatch API responses'), title_salt=typer.Option(DEFAULT_TITLE_SALT, '--title-salt', help='Salt for hashing window titles'), data_dir=typer.Option(None, '--data-dir', help='Processed data directory (default: TASKCLF_HOME/data/processed; ephemeral in --dev)'), transition_minutes=typer.Option(DEFAULT_TRANSITION_MINUTES, '--transition-minutes', help='Minutes a new app must persist before prompting to label'), port=typer.Option(8741, '--port', help='Port for the embedded web UI server'), dev=typer.Option(False, '--dev', help='Start Vite dev server for frontend hot reload'), browser=typer.Option(False, '--browser', help='Open UI in browser instead of native window'), open_browser=typer.Option(True, '--open-browser/--no-open-browser', help='When --browser is set, open the dashboard in the default browser'), no_tray=typer.Option(False, '--no-tray', help='Skip the native tray icon (use with --browser for browser-only mode)'), username=typer.Option(None, '--username', help='Display name (persisted in config.json; does not affect label identity)'), retrain_config=typer.Option(None, '--retrain-config', help='Path to retrain YAML config (enables Retrain Status in Prediction Model submenu)'))
¶
Run a system tray labeling app with activity transition detection.
Left-clicking the tray icon opens the web dashboard where all labeling is done. Right-click shows the full tray menu (Toggle Dashboard, Pause/Resume, Show Status, label import/export, Prediction Model, etc.).
Source code in src/taskclf/cli/main.py
3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 | |
electron_cmd(model_dir=typer.Option(None, '--model-dir', help='Path to a model run directory (enables label suggestions)'), models_dir=typer.Option(DEFAULT_MODELS_DIR, '--models-dir', help='Directory containing model bundles'), aw_host=typer.Option(DEFAULT_AW_HOST, '--aw-host', help='ActivityWatch server URL'), poll_seconds=typer.Option(DEFAULT_POLL_SECONDS, '--poll-seconds', help='Seconds between polling iterations'), title_salt=typer.Option(DEFAULT_TITLE_SALT, '--title-salt', help='Salt for hashing window titles'), data_dir=typer.Option(None, '--data-dir', help='Processed data directory (default: TASKCLF_HOME/data/processed; ephemeral in --dev)'), transition_minutes=typer.Option(DEFAULT_TRANSITION_MINUTES, '--transition-minutes', help='Minutes a new app must persist before prompting to label'), port=typer.Option(8741, '--port', help='Port for the embedded web UI server'), dev=typer.Option(False, '--dev', help='Enable frontend hot reload inside the Electron shell'), username=typer.Option(None, '--username', help='Display name (persisted in config.json; does not affect label identity)'), retrain_config=typer.Option(None, '--retrain-config', help='Path to retrain YAML config passed through to the tray backend'))
¶
Launch the Electron desktop shell with a native tray and floating dashboard.
Source code in src/taskclf/cli/main.py
3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 | |
ui_serve_cmd(port=typer.Option(8741, '--port', help='Port for the web UI server'), model_dir=typer.Option(None, '--model-dir', help='Path to a model run directory (enables live predictions)'), aw_host=typer.Option(DEFAULT_AW_HOST, '--aw-host', help='ActivityWatch server URL'), poll_seconds=typer.Option(DEFAULT_POLL_SECONDS, '--poll-seconds', help='Seconds between AW polling iterations'), title_salt=typer.Option(DEFAULT_TITLE_SALT, '--title-salt', help='Salt for hashing window titles'), data_dir=typer.Option(None, '--data-dir', help='Processed data directory (default: TASKCLF_HOME/data/processed; ephemeral in --dev)'), transition_minutes=typer.Option(DEFAULT_TRANSITION_MINUTES, '--transition-minutes', help='Minutes a new app must persist before suggesting a label'), browser=typer.Option(False, '--browser', help='Open in browser instead of native window'), dev=typer.Option(False, '--dev', help='Start Vite dev server for frontend hot reload (browser mode also reloads the backend)'))
¶
Launch the labeling UI as a native floating window with live prediction streaming.
Source code in src/taskclf/cli/main.py
3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 | |
diagnostics(output_json=typer.Option(False, '--json', help='Output as JSON instead of human-readable text.'), include_logs=typer.Option(False, '--include-logs/--no-include-logs', help='Append the last N log lines to the output.'), log_lines=typer.Option(50, '--log-lines', help='Number of log lines to include (requires --include-logs).'), out=typer.Option(None, '--out', help='Write output to a file instead of stdout.'))
¶
Collect environment info for bug reports.
Source code in src/taskclf/cli/main.py
cli_main()
¶
Entry-point wrapper that catches unhandled crashes.