imake

module
v0.10.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 12, 2026 License: MIT

README

imake

An interactive make companion, two tools in one binary:

  • imake — a TUI that lists your Makefile targets; pick one and run it.
  • imake <group> — a k9s-inspired task runner: define named command groups in imake.yml, run them concurrently, watch their logs side by side, and click or press Enter to drop into any task's shell.

Install

Quick install — one script for macOS, Linux, and Windows (Git Bash), no Go needed:

curl -fsSL https://raw.githubusercontent.com/gshireesh/imake/main/install.sh | sh

On Windows it installs to %LOCALAPPDATA%\Programs\imake and adds it to your user PATH; native PowerShell users can use instead:

irm https://raw.githubusercontent.com/gshireesh/imake/main/install.ps1 | iex

Windows tasks run through cmd.exe on ConPTY. Prebuilt binaries cover macOS, Linux and Windows on amd64 and arm64.

With Go: go install github.com/gshireesh/imake/cmd/imake@latest · from a checkout: make install.

Once installed, imake -u (or --update) self-updates to the latest release, imake -v prints the version, and imake -h shows usage.

Task runner

Create an imake.yml (or imake.yaml) describing named command groups. A task is either a plain command string or an object with lifecycle hooks:

dev:
  ui: cd discover && pnpm dev
  backend:
    command: cd backend && go run cmd/main.go
    before: echo "starting backend..."
    timeout: 10000            # ms; kills the command if it runs longer
    on_timeout: echo "timed out"
    on_error: echo "failed"
    on_success: echo "ok"
    after: echo "done"
    restart_policy: on-failure  # always | on-failure | never (default)
    keep_shell: true            # drop into an interactive shell after the command

Then run the group:

imake dev

Each task runs on its own pty behind a real terminal emulator (midterm), so full-screen child TUIs — turbo, vite, vim, htop, fancy shell prompts — render correctly instead of turning into escape-code soup. The left panel lists tasks with live status ( running, interactive shell, ok, failed, stopped); the right panel shows the selected task's live screen. Scrolling up switches the pane to a line-based history buffer (copy mode); b or scrolling to the bottom returns to the live screen.

Keys & mouse
Input Action
/, j/k, wheel over sidebar move selection
/h, /l collapse / expand the group under the cursor
click task row select task (click a group header to toggle it)
Enter, i, click log panel attach — keys go to the task's shell
/ search: filters the task list, or log lines when in copy mode
Esc detach / clear the active search filter
Esc, Ctrl+\ detach
wheel over logs, u/d, U/D, t/b scroll / page / top / bottom
r run / restart the selected task (stops it first if running)
q, x stop the selected task
Ctrl+C quit (stops all tasks)

With keep_shell: true the task ends in a real interactive shell ($SHELL), so attaching gives you a prompt in that task's context — handy for rerunning dev servers, inspecting state, or poking at a failed build.

Lifecycle

Per run, a task executes: beforecommand (with optional timeout) → on_success/on_error/on_timeoutafter → optional keep_shell shell. restart_policy: always reruns the cycle when it ends; on-failure reruns only after a failure or timeout.

Tasks sharing a group are shown under a collapsible ▾ group header, and tasks are nested under the dependency they wait for with tree connectors (├──/└──), so the sidebar reads like tree output.

Tasks with manual: true show as and wait until you press r. Tasks with depends_on show as and start automatically once every dependency has finished with success (manual tasks always need r). Dependency cycles and unknown names are rejected at startup.

Plain mode

imake -p <group> skips the TUI and streams all tasks with name-prefixed output — useful for CI logs. Lifecycle hooks other than command are ignored in plain mode.

See examples/simple, examples/lifecycle, examples/manual and examples/grouped for configs.

Bare imake

With an imake.yml present, bare imake opens a group picker — arrow keys or click, Enter opens the group's task TUI — so nobody has to remember group names (a single-group config opens directly; piped output prints the plain list). Without one, a Makefile opens the target browser.

Makefile TUI

Run imake . (or bare imake when only a Makefile exists): arrow keys to select a target, Enter to run it, Ctrl-C to quit. Target docs (text after ##) show in the help pane.

Debugging

Set IMAKE_DEBUG=/tmp/imake.log to write key/message traces while the task runner TUI is open.

Directories

Path Synopsis
cmd
imake command
pkg
tui
scripts
screenreplay command
screenreplay verifies terminal-restore behavior: it plays marker text plus a captured session byte stream into a terminal emulator and prints the final main-screen contents.
screenreplay verifies terminal-restore behavior: it plays marker text plus a captured session byte stream into a terminal emulator and prints the final main-screen contents.
widthcheck command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL