Skip to content

docs(auto-activation): add auto-activation concept page and man pages (DEV-89)#31

Open
djsauble wants to merge 9 commits into
mainfrom
daniel/dev-89-update-auto-activate-docs-man-pages
Open

docs(auto-activation): add auto-activation concept page and man pages (DEV-89)#31
djsauble wants to merge 9 commits into
mainfrom
daniel/dev-89-update-auto-activate-docs-man-pages

Conversation

@djsauble

@djsauble djsauble commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Summary

Documents the experimental auto-activation feature on the docs site
(DEV-89).
Auto-activation activates an environment when you cd into a directory that
contains 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 floxdocs repo).

Changes (hand-authored content only)

  • New concepts/auto-activation.mdx: enablement (the BETA auto_activate
    feature 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.
  • Cross-link from concepts/activation.mdx.
  • One docs.json nav entry for the new concept page.

Man pages are out of scope here

Per review, the man/*.mdx changes and their docs.json nav entries were
removed — those are generated from the flox/flox sources via
scripts/sync-man-pages.sh and should land via that sync (the auto-activation
man pages come from flox/flox#4407). I confirmed docs.json is not
auto-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-allow and
/man/flox-activate-deny, which don't exist until the man pages are synced from
flox/flox#4407. Merge after that sync so mint broken-links is clean.

…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>
@mintlify

mintlify Bot commented Jun 18, 2026

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
flox 🟢 Ready View Preview Jun 18, 2026, 6:15 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@djsauble djsauble left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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/*.mdx directly — 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.json under the "CLI reference" tab.

Comment thread man/flox-activate-allow.mdx Outdated
Comment thread man/flox-activate-deny.mdx Outdated
Comment thread man/flox-activate.mdx
Comment thread man/flox-config.mdx
Comment thread docs.json
Comment thread concepts/auto-activation.mdx Outdated
Comment thread concepts/auto-activation.mdx Outdated
Comment thread concepts/auto-activation.mdx Outdated
Comment thread concepts/auto-activation.mdx Outdated
Comment thread concepts/auto-activation.mdx
djsauble and others added 7 commits June 18, 2026 13:31
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>
@djsauble djsauble marked this pull request as ready for review June 18, 2026 20:44
@djsauble djsauble requested a review from stephenyeargin June 18, 2026 22:24
Comment thread concepts/auto-activation.mdx Outdated
enabling and disabling the flag is enough to turn auto-activation on and off.
</Note>

## How it works

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.

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

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.

praise: good to mention it right away!

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.
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.

3 participants