docs(auto-activation): add auto-activation concept page and man pages (DEV-89)#31
Open
djsauble wants to merge 9 commits into
Open
docs(auto-activation): add auto-activation concept page and man pages (DEV-89)#31djsauble wants to merge 9 commits into
djsauble wants to merge 9 commits into
Conversation
…DEV-89) - New concepts/auto-activation.mdx covering enablement (the BETA feature flag plus the prompt hook), the allow/deny consent flow, nested environments, and deactivation, written against the actual implementation. - Cross-link to it from concepts/activation.mdx. - Regenerate man/flox-activate and man/flox-config and add man/flox-activate-allow and man/flox-activate-deny, synced from the flox/flox man-page sources. - Add the new pages to the docs.json navigation. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
djsauble
commented
Jun 18, 2026
Contributor
Author
There was a problem hiding this comment.
Let's also add a line to the AGENTS.md in this repository that man pages shouldn't be edited directly in this repository since they're automatically synced from the flox/flox repo.
this is already documented under the "Man pages are generated — do not edit directly" section:
Everything under
man/is generated from the man page sources in the flox/flox repo (cli/flox/doc/*.md).
- Do not edit
man/*.mdxdirectly — changes will be overwritten by the next sync.- To fix or update a man page, edit the source in flox/flox (
cli/flox/doc/), then regenerate:./scripts/sync-man-pages.sh <path-to-flox-repo> ./man- New pages also need a navigation entry in
docs.jsonunder the "CLI reference" tab.
Man pages under man/ are generated from flox/flox via sync-man-pages.sh, so they (and their docs.json "CLI reference" entries) land with that sync rather than this PR. The auto-activation man pages come from flox/flox#4407. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
These man pages are synced from flox/flox; their nav entries belong with that sync. The hand-authored concepts/auto-activation entry stays. docs.json is not auto-updated by the sync, so nav entries are maintained by hand (see AGENTS.md). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
tanjadev
approved these changes
Jun 23, 2026
| enabling and disabling the flag is enough to turn auto-activation on and off. | ||
| </Note> | ||
|
|
||
| ## How it works |
Contributor
There was a problem hiding this comment.
Love that we're explaining this here!
| 4. **Deactivation** — When you leave a directory, its environment is deactivated | ||
| and its changes to the shell are reverted. | ||
|
|
||
| Most prompts hit a fast path: the hook detects that nothing relevant has changed |
Contributor
There was a problem hiding this comment.
praise: good to mention it right away!
stephenyeargin
approved these changes
Jun 23, 2026
Co-authored-by: tanjadev <tanja@floxdev.com>
pull Bot
pushed a commit
to BoomchainLabs/flox
that referenced
this pull request
Jun 25, 2026
…ature flag (DEV-89) (flox#4407) ## Summary Documents the experimental **auto-activation** feature in the man pages ([DEV-89](https://linear.app/floxdotdev/issue/DEV-89/update-auto-activate-docs-man-pages)). Auto-activation activates an environment when you `cd` into a directory that contains it and deactivates it when you leave. The docs are written against the **actual implementation** at the top of the auto-activate stack (`daniel/dev-132-…`), not the older prototype on `feat/auto-activation`, whose behavior has since diverged. ### Changes - **New** `flox-activate-allow(1)` and `flox-activate-deny(1)` pages for the `flox activate allow` / `flox activate deny` subcommands. - **New** `AUTO-ACTIVATION` section in `flox-activate(1)` covering the prompt hook, the interactive consent prompt, the allow/deny flow, and how to enable the feature. - `flox-config(1)`: documents `auto_activate` (`prompt`/`allowed`, default `prompt`), `auto_activate_environments`, `auto_activate_fish_mode`, `features.auto_activate`, and the `FLOX_FEATURES_AUTO_ACTIVATE` env var; ties `disable_hook` to auto-activation. - **New** shared include `include/auto-activate-experimental.md` carrying the "experimental + how to enable" note. - Promotes the staged `doc-auto-activate/flox-config.md` into the shipped `flox-config(1)` and removes the staging copy. ### How to enable (BETA), as documented 1. Install the prompt hook via any in-place activation in your shell rc, e.g. `eval "$(flox activate -D)"` (registration is gated only by `disable_hook`). 2. Set the feature flag: `FLOX_FEATURES_AUTO_ACTIVATE=true` or `flox config --set features.auto_activate true`. ## Decisions to confirm 👀 - **Promote to shipped man pages vs. keep staging.** I moved the auto-activate docs into the real `cli/flox/doc/` man pages (which the Nix build ships) and deleted the unshipped `doc-auto-activate/` staging copy, each marked experimental with enablement notes. If you'd rather keep these staged until the feature is GA, say so and I'll move them back. - **Based off `main`.** The man-page sources are pure markdown with no build dependency on the Rust code, so this is based on `main`. It should merge only once the auto-activation feature itself has landed. - No `## Release Notes` section: the documented feature is behind a feature flag and marked experimental. ## Paired docs PR Companion changes to the docs site (`flox/docs`) — concept page + regenerated man-page MDX — are in flox/docs#31 (flox/docs#31). Verified: all four pages compile with `pandoc` + the repo's man-page filters; includes expand correctly.
stephenyeargin
approved these changes
Jun 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Documents the experimental auto-activation feature on the docs site
(DEV-89).
Auto-activation activates an environment when you
cdinto a directory thatcontains it and deactivates it when you leave.
Written against the actual implementation at the top of the auto-activate
stack — this supersedes the earlier exploration in
flox/floxdocs#456, whose behavior
had diverged (and which lived in the now-stale
floxdocsrepo).Changes (hand-authored content only)
concepts/auto-activation.mdx: enablement (the BETAauto_activatefeature flag plus the prompt hook installed by an in-place activation),
how the hook works, the allow/deny consent flow, nested environments,
deactivation/layer-peeling, and a comparison with manual activation.
concepts/activation.mdx.docs.jsonnav entry for the new concept page.Man pages are out of scope here
Per review, the
man/*.mdxchanges and theirdocs.jsonnav entries wereremoved — those are generated from the flox/flox sources via
scripts/sync-man-pages.shand should land via that sync (the auto-activationman pages come from flox/flox#4407). I confirmed
docs.jsonis notauto-updated by the sync, so the concept-page nav entry is added here by hand.
Ordering note 👀
The concept page links to
/man/flox-activate-allowand/man/flox-activate-deny, which don't exist until the man pages are synced fromflox/flox#4407. Merge after that sync so
mint broken-linksis clean.