Skip to content

feat(task): add --skip-tools flag to mise run#8699

Merged
jdx merged 8 commits intomainfrom
feat/skip-tools
Mar 22, 2026
Merged

feat(task): add --skip-tools flag to mise run#8699
jdx merged 8 commits intomainfrom
feat/skip-tools

Conversation

@jdx
Copy link
Copy Markdown
Owner

@jdx jdx commented Mar 22, 2026

Summary

  • Adds --skip-tools flag to mise run that skips tool installation before running tasks
  • Useful in CI environments where tools are pre-installed and you want to avoid install overhead
  • Flag works before the task name (mise run --skip-tools foo); after the task name it's passed through as a task argument (mise run foo --skip-tools)

Closes #4173

Test plan

  • E2E test test_task_skip_tools verifies:
    • mise run --skip-tools hello skips tool install and runs the task
    • mise run echo-args --skip-tools passes --skip-tools as a task argument

🤖 Generated with Claude Code


Note

Low Risk
Low risk: the new behavior is opt-in via --skip-tools and only bypasses tool auto-installation steps; the main risk is users inadvertently skipping required tool installs and seeing task failures.

Overview
Adds a new mise run --skip-tools flag that bypasses both the initial toolset auto-install and any task-declared tool installation before executing tasks.

Updates generated CLI docs/usage (docs/cli/*, man/man1/mise.1, mise.usage.kdl, Fig spec) and adds an e2e test verifying flag parsing (before task name) and that task-level tool installs are skipped.

Written by Cursor Bugbot for commit 4b5f81c. This will update automatically on new commits. Configure here.

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a new --skip-tools flag to the mise run command. This enhancement allows users to skip the tool installation step before running tasks, which is beneficial in environments where tools are already pre-installed, such as CI. The PR includes an E2E test to ensure the flag functions as expected, both as a mise flag and as a task argument.

Highlights

  • New Feature: Introduced the --skip-tools flag to the mise run command, allowing users to bypass tool installation before running tasks.
  • CI Optimization: This flag is particularly useful in CI environments where tools are pre-installed, reducing overhead by skipping unnecessary installation steps.
  • Task Argument Handling: The flag's behavior depends on its placement: before the task name, it acts as a mise flag; after the task name, it's passed as an argument to the task.
  • Testing: An E2E test (test_task_skip_tools) was added to verify the correct behavior of the --skip-tools flag in different scenarios.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Mar 22, 2026

Greptile Summary

This PR adds a --skip-tools boolean flag to mise run / mise tasks run that bypasses automatic tool installation — both the initial project-level install_missing_versions call and the per-task install_task_tools call — making it a clean opt-in for CI environments where tools are already provisioned. Default behaviour is completely unchanged.

  • Implementation (src/cli/run.rs): two if !self.skip_tools { … } guards wrap the two existing install callsites; the flag field follows the same structural pattern as skip_deps.
  • Default initialisation (src/cli/mod.rs): skip_tools: false added to the explicit Run struct init used for bare task dispatch.
  • Tests (e2e/tasks/test_task_skip_tools): three assertions cover flag-as-mise-flag (before task name), flag-as-task-arg (after task name), and an actual skip-verification using a check-tiny task that declares tools = { tiny = "1.0.0" } — ensuring the install path is genuinely bypassed, not merely tested for correct parsing.
  • Docs / spec / completions: docs/cli/run.md, docs/cli/tasks/run.md, man/man1/mise.1, mise.usage.kdl, and xtasks/fig/src/mise.ts are all updated consistently.

Confidence Score: 4/5

  • Safe to merge — default behaviour is unchanged, the flag is purely opt-in, and both install paths are correctly guarded.
  • The core logic is correct and tests are solid. Two items surfaced in prior review threads remain open (the missing env = "MISE_TASK_SKIP_TOOLS" attribute for parity with skip_deps, and the doc comment claiming task.run_auto_install = false is equivalent when no bridging code wires that setting into self.skip_tools). Neither blocks the primary user path, but the doc/code gap in particular could mislead users who configure the setting and expect the same skipping behaviour as the flag. Scoring 4 rather than 5 to signal those are worth a targeted follow-up before close.
  • src/cli/run.rs — the skip_tools field declaration (env attr gap and setting-bridging gap noted in prior threads)

Important Files Changed

Filename Overview
src/cli/run.rs Core implementation: adds skip_tools: bool field with verbatim_doc_comment, guards both install_missing_versions and install_task_tools behind if !self.skip_tools checks — correctly skipping both the project-level and per-task tool installation paths.
src/cli/mod.rs Adds skip_tools: false to the explicit struct initialisation used when mise converts a bare task invocation into a Run struct; correctly mirrors the existing skip_deps: false entry.
e2e/tasks/test_task_skip_tools E2E test covering three scenarios: flag before task name (mise flag, skips tools), flag after task name (task arg passthrough), and a check-tiny task with tools = { tiny = "1.0.0" } that verifies tool installation is actually skipped when the flag is present.
docs/cli/run.md Adds --skip-tools section after --skip-deps, consistent with the generated output; mentions the task.run_auto_install setting and MISE_TASK_RUN_AUTO_INSTALL env var as persistent alternatives.
mise.usage.kdl Adds --skip-tools flag to both the run and tasks run command specs with matching long_help; consistent with the doc and man page changes.
xtasks/fig/src/mise.ts Adds --skip-tools to the Fig shell-completion spec for both run and tasks run; follows the same structure as the adjacent --skip-deps entry with isRepeatable: false.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["mise run flags task args"] --> B{"--skip-tools\nbefore task name?"}
    B -- Yes --> C["skip_tools = true\nmise flag consumed"]
    B -- No --> D["skip_tools = false\narg passed to task"]

    C --> E["Build Toolset\nToolsetBuilder"]
    D --> E

    E --> F{skip_tools?}
    F -- false --> G["install_missing_versions\nproject-level tools"]
    F -- true --> H["skip project-level install"]

    G --> I["resolve tasks\nget_task_lists"]
    H --> I

    I --> J["prepare_tasks\nfetch remotes, build Deps graph"]
    J --> K{skip_tools?}
    K -- false --> L["install_task_tools\nper-task tool declarations"]
    K -- true --> M["skip per-task install"]

    L --> N["setup_executor\nrun tasks"]
    M --> N
Loading

Reviews (5): Last reviewed commit: "chore: regenerate manpage for --skip-too..." | Re-trigger Greptile

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a --skip-tools flag for the mise run command. The implementation correctly skips both the global and task-specific tool installations. The new E2E test effectively validates that the flag is treated as a mise flag when placed before the task name and as a task argument when placed after. The command-line documentation needs to be updated to include this new flag.

Comment thread src/cli/run.rs
Comment on lines +183 to +185
/// Skip installing tools before running tasks
#[clap(long, verbatim_doc_comment)]
pub skip_tools: bool,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The documentation for the new --skip-tools flag is missing in docs/cli/run.md. Please run the render:usage task to generate the updated documentation and include it in this pull request.

Comment thread src/cli/run.rs
Comment thread src/cli/run.rs
Comment thread e2e/tasks/test_task_skip_tools
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 22, 2026

Hyperfine Performance

mise x -- echo

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2026.3.10 x -- echo 23.7 ± 0.3 23.2 25.0 1.00
mise x -- echo 23.9 ± 0.7 23.2 30.8 1.01 ± 0.03

mise env

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2026.3.10 env 23.1 ± 0.3 22.4 24.2 1.00
mise env 23.3 ± 0.4 22.6 25.7 1.01 ± 0.02

mise hook-env

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2026.3.10 hook-env 23.9 ± 0.5 23.2 28.9 1.00
mise hook-env 24.0 ± 0.3 23.4 25.5 1.01 ± 0.02

mise ls

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2026.3.10 ls 23.0 ± 0.3 22.4 24.1 1.00
mise ls 23.1 ± 0.3 22.6 24.7 1.01 ± 0.02

xtasks/test/perf

Command mise-2026.3.10 mise Variance
install (cached) 151ms 151ms +0%
ls (cached) 85ms 83ms +2%
bin-paths (cached) 86ms 86ms +0%
task-ls (cached) 817ms 817ms +0%

jdx and others added 7 commits March 22, 2026 14:08
Add a --skip-tools flag that skips tool installation when running tasks.
This is useful in CI environments where tools are pre-installed and
you want to avoid the overhead of checking/installing tools.

The flag only works before the task name (e.g., `mise run --skip-tools foo`).
When placed after the task name (e.g., `mise run foo --skip-tools`), it is
passed through to the task as an argument, matching the existing behavior
of other mise flags.

Closes #4173

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ternative

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Restore missing_args_only and skip_auto_install fields in InstallOptions
  that were accidentally dropped, fixing task.run_auto_install setting
- Remove inaccurate doc comment claiming equivalence with the setting
- Add test case with task-level tools to verify --skip-tools actually
  skips tool installation

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@jdx jdx force-pushed the feat/skip-tools branch from 571c9dd to 2a7fec2 Compare March 22, 2026 14:08
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@jdx jdx merged commit c938843 into main Mar 22, 2026
37 checks passed
@jdx jdx deleted the feat/skip-tools branch March 22, 2026 14:27
mise-en-dev added a commit that referenced this pull request Mar 22, 2026
### 🚀 Features

- **(github)** read tokens from gh CLI hosts.yml config by @jdx in
[#8692](#8692)
- **(task)** support optional `args` and `env` fields in `run` entries
by @jdx in [#8687](#8687)
- **(task)** add --skip-tools flag to mise run by @jdx in
[#8699](#8699)
- **(vfox)** add try_get, try_head, try_download_file to Lua HTTP module
by @jdx in [#8697](#8697)

### 🐛 Bug Fixes

- **(config)** recognize SSH and other non-HTTPS URLs in get_repo_url by
@modestman in [#8666](#8666)
- **(docs)** add dark mode support to favicon by @jdx in
[#8678](#8678)
- **(env)** support multiple --env/-E flags by @jdx in
[#8686](#8686)
- **(github)** rename_exe renames correct binary when archive contains
multiple executables by @jdx in
[#8700](#8700)
- **(implode)** include system data dir in implode cleanup by @jdx in
[#8696](#8696)
- **(install)** skip GitHub API calls for aqua tools in --locked mode by
@jdx in [#8679](#8679)
- **(install)** skip redundant provenance verification when lockfile has
integrity data by @jdx in [#8688](#8688)
- **(lock)** respect existing platforms in lockfile when running `mise
lock` by @jdx in [#8708](#8708)
- **(lock)** skip global config lockfile by default by @jdx in
[#8707](#8707)
- **(node)** expand tilde in default_packages_file path by @jdx in
[#8709](#8709)
- **(shell)** error when no version specified instead of silent no-op by
@jdx in [#8693](#8693)
- **(shim)** detect shims by checking shims directory instead of binary
name by @jdx in [#8694](#8694)
- **(task)** inherit task_config.dir for included TOML and file tasks by
@jdx in [#8689](#8689)
- **(task)** strip inline args when validating run.tasks references by
@jdx in [#8701](#8701)
- **(task)** include idiomatic version files in monorepo task toolset by
@jdx in [#8702](#8702)
- **(task)** improve error message when task files are not executable by
@jdx in [#8705](#8705)
- **(test)** update vfox provenance test for checksum-backed skip by
@jdx in [#8703](#8703)
- improve usage spec element support in tasks by @nkakouros in
[#8623](#8623)
- make env plugin (Module) vars available in Tera template context by
@victor-founder in [#8682](#8682)
- respect MISE_COLOR=0 for color_eyre error output by @jdx in
[#8690](#8690)
- add windows support for usage tool registry by @jdx in
[#8713](#8713)

### 📚 Documentation

- **(task)** clarify interactive task blocking behavior by @jdx in
[#8685](#8685)
- improve visibility of install_before setting by @jdx in
[#8712](#8712)

### 📦 Registry

- add rtk ([github:rtk-ai/rtk](https://github.com/rtk-ai/rtk)) by
@bricelalu in [#8683](#8683)

### New Contributors

- @victor-founder made their first contribution in
[#8682](#8682)
- @modestman made their first contribution in
[#8666](#8666)
- @bricelalu made their first contribution in
[#8683](#8683)
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