Attention needed from Owners Override
Adam Perry has uploaded the change for review![Open in Gerrit]()
Adam Perry would like Owners Override to review this change.
Commit message
[shell] Add option to integrate with shell using mise.
mise (https://mise.jdx.dev/about.html) is a tool and workflow
manager that does a large number of things. Here, we're only
using it as a substitute for adding global shell configuration
that's specific to a single Fuchsia checkout.
With either `mise activate` or a global shell integration, users
will always call the "right" fx/ffx etc. since mise will set up their
shell's PATH to point to the "local" one.
In this way mise is an alternative to direnv, but where direnv often
leaks state on leaving a directory mise's higher level configuration
syntax means it's much more reliable.
That said, I'm not attempting to add this option to the fuchsia.dev
docs since we don't (yet?) have a known-good way to install
mise from trusted sources.
Change-Id: I2a417e7bc6bdb216177e1b08edbfc6f13bcb79b1
Change diff
diff --git a/.mise/OWNERS b/.mise/OWNERS
new file mode 100644
index 0000000..f85e471
--- /dev/null
+++ b/.mise/OWNERS
@@ -0,0 +1,2 @@
+adam...@google.com
+crj...@google.com
diff --git a/.mise/README.md b/.mise/README.md
new file mode 100644
index 0000000..dc28e19
--- /dev/null
+++ b/.mise/README.md
@@ -0,0 +1,42 @@
+# mise on Fuchsia
+
+This mise config is an alternative to modifying your global shell config to
+be aware of Fuchsia. Instead you can add mise to your global shell config and
+it will automatically set up Fuchsia development tools when your shell's current
+directory is inside a Fuchsia checkout.
+
+See https://mise.jdx.dev/about.html for more information about mise.
+
+## Setup
+
+See https://mise.jdx.dev/getting-started.html.
+
+Once you can use `fx` without [setting up Fuchsia environment variables][fdev]
+then you're good to go.
+
+## IDE Agent Integration
+
+If you want mise to also update environment variables for shells launched by
+coding agents in e.g. Antigravity, then you can still convince the
+non-interactive editor terminals to activate mise if you set `BASH_ENV` to a
+script that activates mise.
+
+For example:
+
+```sh
+mkdir -p ~/.config/mise
+echo 'eval "$($HOME/.local/bin/mise activate bash)"' > ~/.config/mise/bash_env
+```
+
+Add the following to your `~/.bashrc` or `~/.profile` *before* either bails
+early for non-interactive shells:
+
+```sh
+export BASH_ENV="$HOME/.config/mise/bash_env"
+```
+
+After you restart your development machine the editor's agent should be able
+to run `fx`, `ffx`, etc. using mise the same way your interactive shells do.
+
+[fdev]: https://fuchsia.dev/fuchsia-src/get-started/get_fuchsia_source?hl=en#set-up-environment-variables
+[add shims]: https://mise.jdx.dev/ide-integration.html#adding-shims-to-path-default-shell
\ No newline at end of file
diff --git a/.mise/config.toml b/.mise/config.toml
new file mode 100644
index 0000000..5d90893
--- /dev/null
+++ b/.mise/config.toml
@@ -0,0 +1,14 @@
+# Copyright 2026 The Fuchsia Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+[env]
+# Used by most workflow tools.
+FUCHSIA_DIR = "{{ config_root }}"
+
+# This puts fx & ffx in PATH.
+_.path = "{{ config_root }}/.jiri_root/bin"
+
+# Used for symbolizing backtraces. Shell hacks are needed to ensure we pick up any configuration
+# from vendor/ devshell scripts too.
+DEBUGINFOD_URLS = "{{ exec(command=\"source $FUCHSIA_DIR/tools/devshell/lib/vars.sh && echo -n $DEBUGINFOD_URLS\") }}"
Change information
Files:
- A .mise/OWNERS
- A .mise/README.md
- A .mise/config.toml
Change size: M
Delta: 3 files changed, 58 insertions(+), 0 deletions(-)
Open in GerritRelated details
Attention is currently required from:
Gerrit-MessageType: newchange
Gerrit-Project: fuchsia
Gerrit-Branch: main
Gerrit-Change-Id: I2a417e7bc6bdb216177e1b08edbfc6f13bcb79b1
Gerrit-Change-Number: 1477222
Gerrit-PatchSet: 3
You received this message because you are subscribed to the Google Groups "owners-override" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
.