Skip to content

One 'mia' command for every service (replaces the up-scripts and ad/md) - #47

Merged
krokicki merged 14 commits into
mainfrom
mia-services-cli
Oct 15, 2026
Merged

krokicki merged 14 commits into
mainfrom
mia-services-cli

Conversation

@krokicki

@krokicki krokicki commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

Summary

  • New package mia_ops/ with a single pixi run mia command: up|down|restart|ps [SERVICE...], logs SERVICE [worker|broker], attach SERVICE, exec SERVICE ARGS.... Services come from a gitignored mia.yaml (mia.yaml.example tracked): name -> app (autodev | mia-data) + config file. The service name is the tmux session name.
  • Temporal is an implicit service. Default temporal.managed: false (or no temporal section) means an external Temporal (k8s) that mia only health-checks and never starts or stops. managed: true runs the dev server in its own temporal tmux session: up starts it first, down with no args stops it last, down <service> never touches it.
  • One Python start recipe replaces scripts/autodev-up.sh and scripts/mia-data-up.sh; per-app differences are a three-field table. Every tmux command line is built with shlex.quote.
  • Deleted: both up-scripts, autodev/ops.py, the up/down/restart/ps/attach/logs subcommands of autodev and mia-data, and the ad and md pixi tasks. App commands are now pixi run mia exec <service> <cmd> (so snippets no longer needs AUTODEV_CONFIG=...).
  • Stack refuses services that disagree on the Temporal address or share a config file, paths.state_dir or deployment.
  • Docs updated: README, both setup guides, the workflow overview, the development guide, the runbook (with a migration note) and the handoff notes.

Spec: notes/specs/2026-10-14-mia-services-cli.md. Plan: notes/plans/2026-10-15-mia-services-cli.md.

Migration

The dev server's database moves from <autodev state_dir>-host/temporal.db to temporal.state_dir (default ~/.local/state/temporal). Stop the old tmux sessions and copy the file before the first mia up, or point temporal.state_dir at the old -host dir. See the runbook.

Test plan

  • pixi run test (367 passed), pixi run lint, pixi run typecheck
  • On a submit host with live sessions: pixi run mia ps, pixi run mia exec snippets check (all rows ok)
  • After migrating the Temporal DB on the dev host: mia up, mia ps, mia logs, mia restart snippets, mia down (ps exits 1), mia up again; schedules and running workflows carried over

Deferred (reviewer minors, not in this PR)

Temporal.host does not strip a URL scheme; namespace-create error omits stderr; managed up on a live-but-unhealthy temporal session tracebacks; ps shows managed Temporal without a health line; mia logs <svc> temporal gives argparse's invalid-choice text; tmux/curl/schedule failures surface as tracebacks; list-shaped mia.yaml gives TypeError; two stale doc phrases (md CLI, CODEOWNERS scripts/); CLI tests import a fixture across modules.

🤖 Generated with Claude Code

@StephanPreibisch

krokicki and others added 14 commits October 15, 2026 08:57
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…external Temporal)

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…y to run app commands

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… ad and md tasks

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…wns the lifecycle

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…tate_dir or deployment

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…t table lists mia_ops

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…moke note, replay script)

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@krokicki
krokicki merged commit 4879690 into main Oct 15, 2026
1 check passed
@krokicki
krokicki deleted the mia-services-cli branch October 15, 2026 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant