fetch_ml/docs/src/zig-cli.md
Jeremie Fraeys cd5640ebd2 Slim and secure: move scripts, clean configs, remove secrets
- Move ci-test.sh and setup.sh to scripts/
- Trim docs/src/zig-cli.md to current structure
- Replace hardcoded secrets with placeholders in configs
- Update .gitignore to block .env*, secrets/, keys, build artifacts
- Slim README.md to reflect current CLI/TUI split
- Add cleanup trap to ci-test.sh
- Ensure no secrets are committed
2025-12-07 13:57:51 -05:00

1.4 KiB
Raw Blame History

layout title permalink nav_order
page Zig CLI Guide /zig-cli/ 3

Zig CLI Guide

Lightweight command-line interface (ml) for managing ML experiments. Built in Zig for minimal size and fast startup.

Quick start

# Build locally
cd cli && make all

# Or download a release binary
curl -LO https://github.com/jfraeys/fetch_ml/releases/latest/download/ml-<platform>.tar.gz
tar -xzf ml-<platform>.tar.gz && chmod +x ml-<platform>

Configuration

The CLI reads ~/.ml/config.toml and respects FETCH_ML_CLI_* env vars:

worker_host = "127.0.0.1"
worker_user = "dev_user"
worker_base = "/tmp/ml-experiments"
worker_port = 9101
api_key = "your-api-key"

Example overrides:

export FETCH_ML_CLI_HOST="myserver"
export FETCH_ML_CLI_API_KEY="prod-key"

Core commands

  • ml status system status
  • ml queue <job> queue a job
  • ml cancel <job> cancel a job
  • ml dataset list list datasets
  • ml monitor launch TUI over SSH (remote UI)

Build flavors

  • make all releasesmall (default)
  • make tiny extrasmall binary
  • make fast releasefast

All use zig build-exe with -OReleaseSmall -fstrip and are compatible with Linux/macOS/Windows.

CI/CD

The release workflow builds crossplatform binaries and packages them with checksums. See .github/workflows/release.yml.