Skip to main content
Glama

Fire CLI 🔥

Release crates.io CI License: MIT

A config-first task runner for your projects, and for the AI agents working in them.

Fire demo: define commands in fire.yml, run them, detach a dev server with Ctrl+Z, and let an AI agent reuse it over MCP

Put your project's commands in a fire.yml, and get:

  • One entry point for build, test, dev servers, containers, and scripts: fire <command>, with tab completion and descriptions generated from your config.

  • Agents that use your commands instead of guessing. fire cli mcp exposes them to Claude Code, Cursor, or any MCP host, and keeps dangerous ones (agents: false) human-only.

  • Long-running processes you can share. Every command runs on a pty you can detach with Ctrl+Z and reattach from any terminal; you and your agents see the same dev servers and logs.

  • Smart runners. Fall back to a container when a tool isn't installed, ensure services are up before running, and compute arguments with JS/TS/Python snippets.

If you've used make, just, Task, or npm run as a command menu, Fire fills the same role and adds completion, sessions, and an agent interface on top.

# fire.yml
commands:
  test: cargo test
  dev:
    description: Start the API with hot reload
    long_running: true
    exec: cargo watch -x run
  npm:
    check: npm -v                                    # not installed locally?
    fallback_runner: docker run --rm -it -v .:/app -w /app node:lts-alpine sh
    exec: npm                                        # ...then run it in a container
  deploy:
    agents: false                                    # agents must ask you first
    exec: ./scripts/deploy prod
fire test               # run it
fire dev                # Ctrl+Z detaches; it keeps running
fire cli ps             # see what's running, from any project
fire cli fg <id>        # attach again from any terminal

Install

Homebrew (macOS, Linux):

brew tap gbenm/labs
brew install fire

Install script (macOS, Linux x86_64/arm64):

curl -fsSL https://raw.githubusercontent.com/gbenm/fire/main/install.sh | sh

Cargo:

cargo install fire-cli

Or download a binary from the latest release.

Windows: use WSL. Inside your WSL distro (Ubuntu, Debian, ...) Fire is a regular Linux install: use the install script or Homebrew above, and run it from the WSL terminal. Native Windows isn't supported, since sessions rely on Unix ptys.

Related MCP server: cmuxlayer

Quick start (5 minutes)

  1. Run fire cli init in your project to create a fire.yml:

commands:
  hello: echo "Hello Fire"
  1. Run it:

fire hello world
# => Hello Fire world
  1. Enable completion (zsh + bash):

fire cli completion install
  1. Optional: connect your AI agent (see MCP server for agents):

claude mcp add fire -- fire cli mcp

Configuration at a glance

Fire loads, merges, and executes commands defined in YAML (fire.yml, fire.yaml, *.fire.yml, *.fire.yaml). Commands can:

  • run shell exec steps

  • evaluate runtime snippets via eval (node/deno/python)

  • rewrite arguments with compute

  • use runners, fallback runners, and pre-run before hooks

  • expose nested subcommands with greedy resolution

Reserved name: cli cannot be defined under commands.

Completion

Install or refresh completion anytime:

fire cli completion install
  • zsh shows values + descriptions

  • bash uses complete -C values

Details: see docs/completion.md.

Schema & editor support

Associate your YAML with https://raw.githubusercontent.com/gbenm/fire/main/schemas/fire.schema.json for validation (fire cli init does it):

  • Add $schema to the first line: # yaml-language-server: $schema=https://raw.githubusercontent.com/gbenm/fire/main/schemas/fire.schema.json

  • Or map file names in .vscode/settings.json (yaml.schemas).

MCP server for agents

Let AI agents use the commands you already configured, and launch long-running processes as managed sessions you can inspect, signal, and attach to:

fire cli mcp

Mark commands agents shouldn't touch (deploys, destructive DB tasks) with agents: false. Details: see docs/mcp.md.

  • Claude Code: claude mcp add fire -- fire cli mcp

  • MCP Registry name: mcp-name: io.github.gbenm/fire

Sessions

In a terminal, every fire command runs on a pty under a small supervisor. It behaves exactly as if run directly (colors, prompts, Ctrl+C, exit code), but Ctrl+Z detaches it while it keeps running: fg brings it back, and fire cli fg <id> attaches to it from any other terminal. You and your agents can list sessions from any project, read their output, type into them, signal or stop them:

fire cli bg -m "api for auth tests" api dev   # start one detached
fire cli ps                                   # running ones; -a/--failed/--stopped/--exited for the rest
fire cli fg <id>

Mark servers and watchers with long_running: true so they detach on their own when an agent or a script runs them without a terminal. Details: see docs/sessions.md.

Documentation map

Contributing

Bug reports, ideas, and pull requests are welcome. See CONTRIBUTING.md, and share your setups or ask questions in Discussions. If Fire saves you time, a ⭐ helps other people find it.

If you enjoyed this and want to buy me a coffee ☕️

  • Buy Me a Coffee: https://buymeacoffee.com/gbenm

  • Bitcoin (BTC): bc1q0l8na5gr6jgpnq6r7fj0nl3hqx2dm77l2vearuxx20s5ktes45vsxmksfu

  • USDC (Ethereum ERC20): 0x26D01f6fBa520D343CDAF309ba04FB9a7B26b4DE

Available Tools

16 tools
add_globalA

Register a directory globally so its commands load from anywhere (same as fire cli global add). Changes the user's global setup: use only when the user asks for it, never on your own initiative.

Inputs: path (required). Returns: ok, path, error, merged, +6 more

forget_sessionA

Remove the saved record of an exited, stopped, or lost session.

Inputs: id (required). Returns: ok, stderr, stdout

get_docsA

Read Fire's version-matched embedded documentation. Omit topic to return the full topic index. Available topics:

  • commands-and-args (Writing Commands and Handling Arguments): This guide shows how to author commands, chain hooks, and work with positional arguments and placeholders.

  • comparison (Fire compared to other task runners): Fire overlaps with tools you may already use as a command menu: make, just, Task, mise tasks, and npm run. This page explains what Fire adds, and when another tool is the better fit.

  • completion (Shell Completion): Fire ships rich tab-completion for zsh (with inline descriptions) and a complete -C compatible mode for bash.

  • examples (Progressive Examples): These examples show how to combine Fire features.

  • mcp (MCP server): fire cli mcp starts a Model Context Protocol server over stdio, exposing configured commands, managed long-running sessions, and version-matched Fire documentation to agents.

  • overview (Fire CLI — Overview): Fire is a configuration-driven CLI. Commands, completion, and runtime execution are defined in YAML files you keep alongside your project. This document covers how Fire discovers config, merges scopes, and resolves command paths.

  • runtimes-and-eval (Runtimes, eval, and Dynamic Scripts): Fire can evaluate JavaScript/TypeScript (node or deno) and Python snippets directly from your YAML config. Define runtimes once, then reference them from eval expressions and compute entries.

  • schema (Fire Config): JSON Schema for authoring and validating Fire configuration files.

  • sessions (Sessions): Fire runs commands inside sessions: the program runs on a pseudo-terminal (pty) under a small supervisor, so it behaves exactly as in your terminal (colors, progress bars, prompts, password input, full-screen TUIs), but it doesn't belong to your terminal. You can detach from it, close the terminal, and pick it up again from any other terminal, project or agent.

  • troubleshooting (Troubleshooting): Common issues and quick fixes.

Inputs: topic.

list_globalA

List the directories registered globally (their commands load from anywhere), grouped by namespace, with the absolute paths of the config files that define each namespace (open those to edit a command) and which namespaces are merged. Read-only.

Inputs: no named parameters. Returns: merged, directories

list_sessionsA

List detached fire sessions for the current project by default, including other directories that resolve to it (started with fire --bg or start_session, by any agent or the user): id, command, note (why it was started), cwd, status (running, exited, stopped = stopped on purpose, lost), pid and exit code. Pass cwd to select another project directory, or all: true to list every project (cwd is then ignored). Check this before starting or restarting servers to avoid duplicates. If a previous session for the same command exited, read its session_output first: it usually shows why it failed (e.g. port in use).

Inputs: all, cwd.

merge_globalA

Merge a registered namespace so its commands can be called without the namespace word (same as fire cli global merge); explicit paths of other commands still win. Changes the user's global setup: use only when the user asks for it, never on your own initiative.

Inputs: namespace (required). Returns: ok, path, error, merged, +6 more

prune_globalA

Unregister global directories that no longer exist (same as fire cli global prune). Changes the user's global setup: use only when the user asks for it, never on your own initiative.

Inputs: no named parameters. Returns: ok, path, error, merged, +6 more

remove_globalA

Unregister a global directory by namespace or absolute path (same as fire cli global remove); its files are never touched. Changes the user's global setup: use only when the user asks for it, never on your own initiative.

Inputs: path, namespace. Returns: ok, path, error, merged, +6 more

run_commandA

Run a finite configured command to completion. Pass the exact path from search_commands, the same cwd used for discovery, and optional args as separate unchanged tokens. cwd defaults to the server's directory. Returns its exit code and separate stdout/stderr, capped at 64 KiB each. Commands have a fixed 60-second timeout. Long-running commands are refused with a hint to use start_session; commands marked agents: false are also refused.

Inputs: path (required), cwd, args. Returns: stderr, stdout, exit_code, timed_out, +2 more

search_commandsA

Discover the user's configured fire commands. Pass your working directory as cwd to see that project's local commands; omit it to use the server's directory. path is the exact command to run. Omit query or pass an empty string to list everything; otherwise it is a case-insensitive substring over paths, descriptions, and exec/eval templates. Underlying templates are hidden by default; request include_exec only for context, and never copy or run them directly. Use this first when the user names an app, service or task you don't recognize, and before writing your own build/test/run/deploy commands.

Inputs: cwd, query, include_exec.

send_inputA

Type into a running session's terminal (it runs on a pty): a line of text followed by Enter, or with raw: true exact keys such as q, \x03 (Ctrl+C) or \e[A (up arrow).

Inputs: id (required), text (required), raw. Returns: ok, stderr, stdout

session_outputA

Read the last lines of a session's terminal output (stdout and stderr merged, colors and progress redraws cleaned up), plus its status.

Inputs: id (required), lines.

signal_sessionB

Send a specific signal to a running session's process group (e.g. INT, HUP, USR1).

Inputs: id (required), signal (required). Returns: ok, stderr, stdout

start_sessionA

Start a configured fire command detached, in a managed session. ALWAYS use this for long-running processes (dev servers, watchers, workers, tunnels, log tails) instead of backgrounding them in your own shell: the process survives your shell, and you, other agents and the user can list it, read its output, send input/signals, or stop it. command must be a configured fire command (find it with search_commands). One command in one cwd is one session: if it is already running, this returns its id and replaces its note instead of starting a duplicate; if it ended (crashed or stopped), it starts again under the same id with the new note. So to restart a server, stop it with stop_session and call this again. Returns the session id as session_id; then confirm it came up with session_output. Fails for commands the user reserved for humans (agents: false).

Inputs: note (required), command (required), cwd. Returns: ok, stderr, stdout, session_id

stop_sessionB

Stop a running session gracefully with TERM, then KILL after 5 seconds if needed.

Inputs: id (required). Returns: ok, stderr, stdout

unmerge_globalA

Unmerge a namespace so its commands need the namespace word again (same as fire cli global unmerge). Changes the user's global setup: use only when the user asks for it, never on your own initiative.

Inputs: namespace (required). Returns: ok, path, error, merged, +6 more

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.9/5.0

    Scored across 16 tools

    Disambiguation5/5

    The 16 tools split cleanly into four non-overlapping clusters: session lifecycle (start/stop/list/output/send_input/signal/forget), global registry management (add/remove/list/merge/unmerge/prune), command discovery/execution (search_commands, run_command), and docs (get_docs). Within clusters the pairs are explicitly distinguished in descriptions (e.g. stop_session does TERM-then-KILL while signal_session sends an arbitrary signal; merge_global adds a shortcut alias while add_global registers a directory). An agent can pick the right tool from the name plus the distinguishing sentence.

    Naming Consistency4/5

    Nearly everything follows a snake_case verb_noun pattern (start_session, stop_session, list_sessions, add_global, remove_global, merge_global, run_command, search_commands). The one outlier is session_output, which is a noun phrase where the sibling pattern would suggest get_session_output or read_session_output. Minor deviation only; the convention is otherwise stable and predictable.

    Tool Count4/5

    16 tools across three real capability areas (sessions, global config, commands/docs) is reasonable but sits at the upper edge; the six global-registry tools are the bulk. Each maps to a distinct CLI subcommand (fire cli global add/remove/merge/unmerge/prune), so none are filler, but the surface could be tightened if the global tools were less granular.

    Completeness5/5

    Sessions have a full lifecycle: start, list (with status/exit code), read output, inject input, signal, stop, and forget. Global registry management covers add, remove, list, merge, unmerge, and prune. Command execution and discovery are paired (search_commands -> run_command), and get_docs covers version-matched reference with an index. The only near-gap is restart, which the description explicitly documents as stop_session + start_session, so there is no dead end.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      Turns any shell command into an MCP server by defining command-line tools in simple YAML files. Enables AI agents to execute system commands, security scanners, DevOps tools, and CLI utilities directly from chat interfaces.
      4
      -
    • A
      license
      A
      quality
      B
      maintenance
      Terminal multiplexer MCP server for orchestrating parallel AI agents. Manages workspaces, panes, surfaces with send_input/read_screen/spawn_agent/stop_agent tools. Supports Claude Code, Codex, Gemini, Cursor CLI agents with lifecycle management, browser automation, and agent status push via Claude --channels.
      10
      30
      Apache 2.0
    • F
      license
      Not graded
      quality
      A
      maintenance
      The terminal AI agents can drive: a cross-platform desktop terminal (macOS/Linux/Windows, MIT) that runs a local MCP server. Spawn tabs/panes, run commands with structured output, read screens and full scrollback, take scrolling screenshots, record sessions with secret redaction, switch identity profiles. Auto-registers with Claude Code / Codex / Gemini CLI on install.
      24
      -
    • A
      license
      A
      quality
      B
      maintenance
      MCP server for overseer.nvim — gives any MCP-capable coding agent running inside Neovim (Claude Code, Codex, Gemini CLI, opencode) the same visibility and control over tasks the user has: list, run, tail, restart, stop. Agent-started dev servers land in the user's own task list instead of becoming invisible orphaned processes.
      7
      942 npm
      MIT