{"id":36953850,"url":"https://github.com/harehare/mq-task","last_synced_at":"2026-03-04T15:03:41.814Z","repository":{"id":318506384,"uuid":"1071585832","full_name":"harehare/mq-task","owner":"harehare","description":"mq-task is a task runner that executes code blocks in Markdown files based on section titles. ","archived":false,"fork":false,"pushed_at":"2026-03-02T22:41:31.000Z","size":1260,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-03T01:25:56.063Z","etag":null,"topics":["cli","markdown","mq","task-runner"],"latest_commit_sha":null,"homepage":"https://mqlang.org","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/harehare.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-07T14:42:56.000Z","updated_at":"2026-03-02T22:40:56.000Z","dependencies_parsed_at":null,"dependency_job_id":"a20c8116-d1ce-465e-9509-adb38753a464","html_url":"https://github.com/harehare/mq-task","commit_stats":null,"previous_names":["harehare/mx","harehare/mq-task"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/harehare/mq-task","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harehare%2Fmq-task","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harehare%2Fmq-task/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harehare%2Fmq-task/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harehare%2Fmq-task/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/harehare","download_url":"https://codeload.github.com/harehare/mq-task/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harehare%2Fmq-task/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30084685,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T13:22:36.021Z","status":"ssl_error","status_checked_at":"2026-03-04T13:20:45.750Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","markdown","mq","task-runner"],"created_at":"2026-01-13T12:54:05.052Z","updated_at":"2026-03-04T15:03:41.796Z","avatar_url":"https://github.com/harehare.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003emq-task\u003c/h1\u003e\n\n[![ci](https://github.com/harehare/mq-task/actions/workflows/ci.yml/badge.svg)](https://github.com/harehare/mq-task/actions/workflows/ci.yml)\n\n`mq-task` is a task runner that executes code blocks in Markdown files based on section titles.\nIt is implemented using [mq](https://github.com/harehare/mq), a jq-like command-line tool for Markdown processing, to parse and extract sections from Markdown documents.\n\n![demo](assets/demo.gif)\n\n\u003e [!WARNING]\n\u003e `mq-task` is currently under active development.\n\n## Features\n\n- Execute code blocks from specific sections in Markdown files\n- Configurable runtimes for different programming languages\n- Support for custom heading levels\n- TOML-based configuration\n- Built on top of the mq query language\n\n## Installation\n\n### Quick Install\n\n```bash\ncurl -sSL https://raw.githubusercontent.com/harehare/mq-task/refs/heads/main/bin/install.sh | bash\n```\n\nThe installer will:\n- Download the latest mq binary for your platform\n- Install it to `~/.mq/bin/`\n- Update your shell profile to add mq to your PATH\n\n### Cargo\n\n```sh\n$ cargo install --git https://github.com/harehare/mq-task.git\n```\n\n## Usage\n\n### Run a task (shorthand)\n\n```bash\n# Run from README.md (default)\nmq-task \"Task Name\"\n\n# Run from a specific file\nmq-task -f tasks.md \"Task Name\"\n```\n\n### Run a task (explicit)\n\n```bash\nmq-task run \"Task Name\"\nmq-task run --file tasks.md \"Task Name\"\n```\n\n### Pass arguments to a task\n\nYou can pass arguments to your task using `--` separator:\n\n```bash\n# Pass arguments to a task\nmq-task \"Task Name\" -- arg1 arg2 arg3\n\n# With explicit run command\nmq-task run \"Task Name\" -- arg1 arg2 arg3\n\n# From a specific file\nmq-task -f tasks.md \"Task Name\" -- arg1 arg2\n```\n\nArguments are accessible via environment variables:\n- `MX_ARGS`: All arguments joined by space (e.g., \"arg1 arg2 arg3\")\n- `MX_ARG_0`, `MX_ARG_1`, ...: Individual arguments\n\nExample in a Markdown task:\n\n````markdown\n## My Task\n\n```bash\necho \"All args: $MX_ARGS\"\necho \"First arg: $MX_ARG_0\"\necho \"Second arg: $MX_ARG_1\"\n```\n````\n\n### List available tasks\n\n```bash\n# List tasks from README.md (default)\nmq-task\n\n# List tasks from a specific file\nmq-task -f tasks.md\nmq-task list --file tasks.md\n```\n\n### Initialize configuration\n\n```bash\nmq-task init\n```\n\nThis creates an `mq-task.toml` file with default runtime settings.\n\n## Configuration\n\nCreate an `mq-task.toml` file to customize runtime behavior:\n\n```toml\n# Runtimes configuration\n# Simple format: language = \"command\"\n# The execution mode defaults to \"stdin\"\n[runtimes]\nbash = \"bash\"\nsh = \"sh\"\npython = \"python3\"\nruby = \"ruby\"\nnode = \"node\"\njavascript = \"node\"\njs = \"node\"\nphp = \"php\"\nperl = \"perl\"\njq = \"jq\"\n\n# Detailed format with execution mode\n# Execution modes: \"stdin\" (default), \"file\", or \"arg\"\n# - stdin: Pass code via standard input\n# - file: Write code to a temporary file and pass it as an argument\n# - arg: Pass code as a command-line argument\n\n[runtimes.go]\ncommand = \"go run\"\nexecution_mode = \"file\"  # Go requires file-based execution\n\n[runtimes.golang]\ncommand = \"go run\"\nexecution_mode = \"file\"\n\n[runtimes.mq]\ncommand = \"mq\"\nexecution_mode = \"arg\"  # mq uses query as argument\n```\n\nYou can also mix both formats:\n\n```toml\n[runtimes]\npython = \"python3\"  # Simple format, uses default stdin mode\n\n[runtimes.go]       # Detailed format with custom execution mode\ncommand = \"go run\"\nexecution_mode = \"file\"\n```\n\n```bash\n# Using shorthand (from tasks.md by default)\nmq-task Build\n\n# From a specific file\nmq-task -f tasks.md Build\n\n# Using explicit run command\nmq-task run Build\nmq-task run --file tasks.md Build\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharehare%2Fmq-task","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fharehare%2Fmq-task","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharehare%2Fmq-task/lists"}