dev tools, env vars, task runner
  • Rust 82.5%
  • Shell 15.6%
  • PowerShell 0.7%
  • Lua 0.4%
  • Ruby 0.4%
  • Other 0.2%
Find a file
jdx bd7d113b6a
feat(cache): add in-process cache session foundation (#11767)
## Summary
- host the generic CAS agent inside the top-level `mise run` process,
with no daemon, buddy executable, or additional release artifact
- install a session-local hardlink to the exact running mise binary
(copy fallback) and dispatch its Rust-wrapper argv0 path before Tokio,
clap, logging, or config discovery
- use an exact protocol/version handshake, permission-restricted Unix
sockets or Windows named pipes, per-digest write deduplication,
lifecycle shutdown, and session statistics
- inject `RUSTC_WRAPPER` and `CARGO_INCREMENTAL=0` only for tasks with
enabled `rust_cache`, chain an existing wrapper, and preserve access
through task sandboxes
- gate the shipped-profile warm wrapper overhead at 2 ms; the measured
overhead on this branch is 1.771 ms

This PR establishes the final in-process session and shim shape.
Compiler-specific keying, cache-hit materialization, remote
prefetch/upload, and Go `GOCACHEPROG` support remain adapter follow-ups.
The Go adapter will introduce its own `go_cache` field when it is
functional.

## Validation
- `cargo test -p mise-cache-core`
- `cargo test --quiet
session_environment_is_scoped_to_selected_adapters`
- `mise run test:e2e e2e/tasks/test_task_action_cache_session`
- `cargo clippy -p mise-cache-core --all-features --all-targets -- -D
warnings`
- `cargo clippy -p mise --all-features --bin mise -- -D warnings`
- `mise run perf:cache-shim` (1.771 ms median overhead, 2 ms budget)

*AI-assisted — Tool: Codex; model: openai/gpt-5; version: unavailable.*

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Medium Risk**
> Touches task execution env, sandbox allowances, and Windows security
descriptors for named pipes; behavior is gated experimental but the shim
runs on every Cargo compile when enabled.
> 
> **Overview**
> Adds an **in-process action-cache session** for `mise run` when any
task enables `rust_cache`, without a separate daemon or binary.
> 
> **`mise-cache-core`** gains a local CAS (`LocalCas`), a JSON-line
**`CacheAgent`** (handshake, find/store blobs, per-digest locks, stats),
and public digest helpers.
> 
> **`src/cache/session.rs`** starts the agent on a session Unix socket
or a **current-user-only** Windows named pipe, installs a session-local
**`mise-cache-rustc`** hardlink to the running binary, and injects
`MISE_CACHE_SOCKET`, `RUSTC_WRAPPER`, `CARGO_INCREMENTAL=0` (chaining
any prior wrapper). **`main`** dispatches that argv0 path before
Tokio/config; the shim handshakes then transparently runs rustc.
> 
> **`mise run`** brackets the scheduler with `CacheSession`, passes
session env into the executor, allows sandbox access to shim/socket,
gates **`rust_cache`** behind experimental, and prints action-cache
stats after tasks. Adds **`perf:cache-shim`** (2ms warm overhead budget)
and an e2e session test.
> 
> Compiler cache hits/materialization are not implemented yet—the shim
only establishes session shape and benchmarks wrapper cost.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
b3a24c0943. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
2026-08-07 21:07:35 -05:00
.cargo chore: Merge vfox.rs into jdx/mise monorepo (#5590) 2025-07-12 06:54:20 -05:00
.claude/agents chore: remove agent os remnants (#11348) 2026-07-26 17:14:51 -05:00
.codex Enable Entire for Codex (#10623) 2026-06-25 19:36:44 +00:00
.config various CLI improvements (#1190) 2023-12-14 22:51:17 -06:00
.cursor chore(ci): configure cursor cloud environment (#11294) 2026-07-26 22:31:16 +00:00
.entire Enable Entire for Codex (#10623) 2026-06-25 19:36:44 +00:00
.github fix(copr): submit builds without waiting (#11744) 2026-08-06 14:35:22 -05:00
.idea fix(backend): adjust libc detection for musl distros (#10020) 2026-05-27 23:29:52 -05:00
benchmarks feat(cache): add in-process cache session foundation (#11767) 2026-08-07 21:07:35 -05:00
cloudflare/workers fix(lockfile): preserve header url while restoring asset host (#10728) 2026-07-02 18:02:26 +00:00
completions chore: release 2026.8.3 (#11721) 2026-08-07 21:12:53 +00:00
crates feat(cache): add in-process cache session foundation (#11767) 2026-08-07 21:07:35 -05:00
docs refactor(cache): generalize remote action protocol (#11763) 2026-08-07 21:07:35 -05:00
e2e feat(cache): add in-process cache session foundation (#11767) 2026-08-07 21:07:35 -05:00
e2e-win test(task): cover task cache restore on windows (#11612) 2026-08-02 22:04:11 -05:00
licenses feat(backend): add pkgx backend (#10408) 2026-06-13 16:53:51 -05:00
man/man1 feat(bootstrap): add user-scoped flatpak packages (#11757) 2026-08-07 16:03:51 +00:00
packaging chore: release 2026.8.3 (#11721) 2026-08-07 21:12:53 +00:00
registry registry: add discovered bin metadata (4/4) (#11678) 2026-08-03 23:21:54 -05:00
schema refactor(cache): generalize remote action protocol (#11763) 2026-08-07 21:07:35 -05:00
scripts refactor(cache): generalize remote action protocol (#11763) 2026-08-07 21:07:35 -05:00
share/fish/vendor_conf.d rtx -> mise 2024-01-02 16:29:35 -06:00
src feat(cache): add in-process cache session foundation (#11767) 2026-08-07 21:07:35 -05:00
test test(bootstrap): add Linux host convergence gate (#11704) 2026-08-04 08:53:04 -05:00
vendor/aqua-registry chore: release 2026.8.3 (#11721) 2026-08-07 21:12:53 +00:00
xtasks refactor(cache): generalize remote action protocol (#11763) 2026-08-07 21:07:35 -05:00
.cliffignore chore: reset CHANGELOG 2024-11-23 10:44:56 -06:00
.coderabbit.yaml chore(ci): use shared coderabbit config (#10442) 2026-06-14 21:12:13 +00:00
.dockerignore docker: build source from repo (#1122) 2023-12-07 23:28:46 -06:00
.editorconfig chore: improve shfmt linter (#5181) 2025-05-25 16:19:11 +00:00
.gitattributes feat(bootstrap): resolve remote mise artifacts (#11693) 2026-08-04 08:53:03 -05:00
.gitignore fix(tasks): implement smart flag routing for task arguments (#6861) 2025-11-02 09:45:59 -06:00
.markdown-link-check.json refactor: simplified stdout/stderr mocking in tests (#1163) 2023-12-13 21:22:43 +00:00
.markdownlint.json fix(fig): resolve __dirname error in ES module (#7021) 2025-11-20 01:37:20 +00:00
.markdownlintignore chore: consolidate all linters into hk.pkl (#8498) 2026-03-07 15:39:38 +00:00
.prettierignore chore: remove agent os remnants (#11348) 2026-07-26 17:14:51 -05:00
.prettierrc.toml fix: Improve fig spec with better generators (#3762) 2025-01-10 23:17:05 +00:00
.release-skip-e2e chore: release 2025.7.26 (#5776) 2025-07-24 02:49:33 -05:00
.shellcheckrc chore: disable "useless cat" shellcheck 2025-09-16 11:07:24 -05:00
.taplo.toml chore(registry): remove stale registry symlink (#11345) 2026-07-26 22:02:54 +00:00
.yamllint.yml ci: added super-linter (#1096) 2023-12-06 15:24:20 -06:00
age.pub chore: age encrypt minisign key 2024-12-23 05:38:27 -08:00
AGENTS.md chore(docs): switch canonical domain to mise.jdx.dev (#11598) 2026-08-01 22:16:44 +00:00
build.rs refactor(cache): generalize remote action protocol (#11763) 2026-08-07 21:07:35 -05:00
bun.lock chore(deps): lock file maintenance (#11655) 2026-08-03 05:35:03 +00:00
Cargo.lock feat(cache): add in-process cache session foundation (#11767) 2026-08-07 21:07:35 -05:00
Cargo.toml feat(cache): add in-process cache session foundation (#11767) 2026-08-07 21:07:35 -05:00
CHANGELOG.md chore: release 2026.8.3 (#11721) 2026-08-07 21:12:53 +00:00
CLAUDE.md chore: invert CLAUDE.md/AGENTS.md so AGENTS.md is canonical (#9560) 2026-05-03 07:22:38 -05:00
cliff.toml docs(templates): update tera documentation links (#10751) 2026-07-06 12:43:14 -05:00
clippy.toml refactor(cli): defer process termination (#11440) 2026-07-28 18:50:13 -05:00
communique.toml chore(release): improve communique release notes (#10796) 2026-07-06 20:40:38 +00:00
CONTRIBUTING.md chore(docs): switch canonical domain to mise.jdx.dev (#11598) 2026-08-01 22:16:44 +00:00
Cross.toml perf(release): add PGO builds for natively-trainable release targets (#11031) 2026-07-16 04:08:00 +00:00
default.nix chore: release 2026.8.3 (#11721) 2026-08-07 21:12:53 +00:00
deny.toml security: ignore quick-xml advisories pending upstream fixes (#10717) 2026-07-02 09:10:58 -05:00
Dockerfile rtx -> mise 2024-01-02 16:29:35 -06:00
eslint.config.mjs chore(ci): remove fig autocomplete release (#10805) 2026-07-07 00:05:30 +00:00
flake.lock fix: update flake.lock and add fix for rust-bindgen to default.nix (#8874) 2026-04-04 08:31:12 -05:00
flake.nix chore(release): remove broken cargo-release task (#11342) 2026-07-26 23:23:57 -05:00
greptile.json chore(release): skip ai reviews for release prs (#10891) 2026-07-09 21:14:14 +00:00
hk.pkl chore(registry): remove stale registry symlink (#11345) 2026-07-26 22:02:54 +00:00
LICENSE docs: Update LICENSE 2024-12-31 12:12:14 -06:00
llms.txt chore(release): remove broken cargo-release task (#11342) 2026-07-26 23:23:57 -05:00
minisign.key.age chore: age encrypt minisign key 2024-12-23 05:38:27 -08:00
minisign.pub feat: mise g bootstrap (#3792) 2024-12-22 19:43:34 +00:00
mise.code-workspace chore: update aqua registry workspace exclusion (#11349) 2026-07-27 21:37:29 -05:00
mise.lock fix(completions): stop -- from hijacking task argument completion (#11711) 2026-08-04 20:08:10 +00:00
mise.toml feat(cache): add in-process cache session foundation (#11767) 2026-08-07 21:07:35 -05:00
mise.usage.kdl feat(bootstrap): add user-scoped flatpak packages (#11757) 2026-08-07 16:03:51 +00:00
package.json chore(deps): update dependency toml to v5 (#11248) 2026-07-24 12:12:44 -05:00
pitchfork.toml chore: pitchfork 2024-12-14 16:43:52 +00:00
README.md chore: release 2026.8.3 (#11721) 2026-08-07 21:12:53 +00:00
SECURITY.md chore(docs): switch canonical domain to mise.jdx.dev (#11598) 2026-08-01 22:16:44 +00:00
settings.toml refactor(cache): generalize remote action protocol (#11763) 2026-08-07 21:07:35 -05:00
snapcraft.yaml chore: release 2026.8.3 (#11721) 2026-08-07 21:12:53 +00:00
tak.toml perf: replace the hyperfine job with instruction counting (#11387) 2026-07-27 15:22:56 -05:00
tasks.md feat(cache): add in-process cache session foundation (#11767) 2026-08-07 21:07:35 -05:00
tasks.toml chore(release): remove broken cargo-release task (#11342) 2026-07-26 23:23:57 -05:00
tsconfig.json chore(ci): remove fig autocomplete release (#10805) 2026-07-07 00:05:30 +00:00
zipsign.pub zipsign (#985) 2023-11-09 17:25:38 +00:00

mise
mise-en-place

Crates.io GitHub GitHub Workflow Status Discord

Dev tools, env vars, and tasks in one CLI

Getting StartedDocumentationDev ToolsEnvironmentsTasks

Sponsored by entire.io and 37signals.
View all sponsors.


Tip

My latest project, aube just hit stable! It's the fastest Node.js package manager with strong security defaults and is compatible with npm/pnpm/yarn lockfiles!

What is it?

mise prepares your development environment before each command runs. It keeps project tools, environment variables, and tasks in one mise.toml file so new shells, checkouts, and CI jobs all start from the same setup.

  • Install and switch between dev tools like node, python, cmake, terraform, and hundreds more.
  • Load environment variables per project directory, including values from .env files and other sources.
  • Define and run tasks for building, testing, linting, and deploying projects.

Demo

The following demo shows how to install and use mise to manage multiple versions of node on the same system. Note that calling which node gives us a real path to node, not a shim.

It also shows that you can use mise to install and many other tools such as jq, terraform, or go.

demo

See demo transcript.

Quickstart

Install mise

See Getting started for more options.

$ curl https://mise.run | sh
$ ~/.local/bin/mise --version
              _                                        __
   ____ ___  (_)_______        ___  ____        ____  / /___ _________
  / __ `__ \/ / ___/ _ \______/ _ \/ __ \______/ __ \/ / __ `/ ___/ _ \
 / / / / / / (__  )  __/_____/  __/ / / /_____/ /_/ / / /_/ / /__/  __/
/_/ /_/ /_/_/____/\___/      \___/_/ /_/     / .___/_/\__,_/\___/\___/
                                            /_/                 by @jdx
2026.8.3 macos-arm64 (2026-08-07)

Hook mise into your shell (pick the right one for your shell):

# note this assumes mise is located at ~/.local/bin/mise
# which is what https://mise.run does by default
echo 'eval "$(~/.local/bin/mise activate bash)"' >> ~/.bashrc
echo 'eval "$(~/.local/bin/mise activate zsh)"' >> ~/.zshrc
echo '~/.local/bin/mise activate fish | source' >> ~/.config/fish/config.fish
echo '~/.local/bin/mise activate pwsh | Out-String | Invoke-Expression' >> ~/.config/powershell/Microsoft.PowerShell_profile.ps1

Execute commands with specific tools

$ mise exec node@26 -- node -v
mise node@26.x.x ✓ installed
v26.x.x

Install tools

$ mise use --global node@26 go@1
$ node -v
v26.x.x
$ go version
go version go1.x.x macos/arm64

See dev tools for more examples.

Manage environment variables

# mise.toml
[env]
SOME_VAR = "foo"
$ mise set SOME_VAR=bar
$ echo $SOME_VAR
bar

Note that mise can also load .env files.

Run tasks

# mise.toml
[tasks.build]
description = "build the project"
run = "echo building..."
$ mise run build
building...

See tasks for more information.

Example mise project

Here is a combined example to give you an idea of how you can use mise to manage your a project's tools, environment, and tasks.

# mise.toml
[tools]
terraform = "1"
aws-cli = "2"

[env]
TF_WORKSPACE = "development"
AWS_REGION = "us-west-2"
AWS_PROFILE = "dev"

[tasks.plan]
description = "Run terraform plan with configured workspace"
run = """
terraform init
terraform workspace select $TF_WORKSPACE
terraform plan
"""

[tasks.validate]
description = "Validate AWS credentials and terraform config"
run = """
aws sts get-caller-identity
terraform validate
"""

[tasks.deploy]
description = "Deploy infrastructure after validation"
depends = ["validate", "plan"]
run = "terraform apply -auto-approve"

Run it with:

mise install # install tools specified in mise.toml
mise run deploy

Find more examples in the mise cookbook.

Full Documentation

See mise.jdx.dev

GitHub Issues & Discussions

Due to the volume of issue submissions mise received, using GitHub Issues became unsustainable for the project. Instead, mise uses GitHub Discussions which provide a more community-centric platform for communication and require less management on the part of the maintainers.

Please note the following discussion categories, which match how issues are often used:

Special Thanks

Namespace
Thanks to Namespace for providing CI services for mise.

Contributors

Contributors