Dev.to · 3 min read

Midway: go make coffee while your build runs, and get pinged when it's done

Midway: go make coffee while your build runs, and get pinged when it's done

I kept doing the same thing: start a long build, switch to something else, then either check the terminal every minute or forget about it for half an hour. The same thing happened with AI coding agents, which spend a lot of time working or waiting for approval while I'm in another window. So I built Midway, an open-source CLI written in Rust. Start your command, go make a coffee, and Midway tells you when it needs you. How it works Run your command through Midway: midway run cargo build While it runs, Midway sends periodic "still running" notifications (every 15 seconds by default). When it finishes, you get a completion notification, as long as the command ran for at least 10 seconds, so quick commands don't spam you. Both behaviors are configurable under command_notifications in midway.yaml. You can also send a notification directly, which is useful at the end of scripts: midway send-text --message "Deploy finished" Where notifications go Local desktop notifications Email Slack Ntfy Discord Telegram That means the ping can follow you to your phone while you're away from your desk. Setup for each is in the notification docs. Install cargo install midway-cli Prebuilt releases are available for Linux x86_64, Windows x86_64 and Apple Silicon macOS. On other platforms (ARM64 Windows or Linux, Intel macOS), cargo install builds it for your machine. Then create a config and try it: midway init midway run cargo build Notifications for AI coding agents This is the part I use most. Most coding agents support lifecycle hooks, which are commands that run when the agent finishes or needs your approval. Point those hooks at midway send-text and you can walk away from the terminal: midway send-text --message "Agent finished" --background The --background flag detaches the send into its own process and returns immediately, so the notification still goes out if the agent or the hook process is interrupted. A detached process is not invincible: it can still die on system shutdown, an explicit kill, or teardown of an ephemeral environment. There are setup guides for Claude Code, Codex CLI, GitHub Copilot, Gemini CLI, Antigravity CLI, OpenCode and Cursor in the docs. Hook formats change often between agent versions, so if a snippet doesn't work, check your agent's current hook documentation and open an issue. What's next Chained command support (a && b) Including log lines in notifications More services: Microsoft Teams, Google Chat, Mattermost and Rocket.Chat, Zulip, Matrix, and a generic webhook Try it and tell me what's missing Code: https://github.com/hazyio/midway Docs: https://midway.hazyio.com/ If there's a service you want supported, or a workflow where the notification timing doesn't fit, open an issue. I'm especially interested in feedback on the config format.

This is a summary aggregated from Dev.to. Read the complete article on the original site:

Read full article at Dev.to

More AI & Machine Learning News