flk activate
Enter the Nix development shell for your project.
flk activate
flk activate --profile backend
Options
-p, --profile <PROFILE>: Activate a specific profile instead of the default
Behavior
- Runs
nix develop .#<profile> --impureto enter the dev shell - Reuses a cached develop profile from
.flk/.nix-profile-<profile>when your flake config is unchanged - Refreshes that cached profile when
flake.nix,flake.lock, or the relevant.flkprofile files change - Uses standard profile resolution when
--profileis not specified - Custom commands and environment variables from the profile are available inside the shell
Notes
- For automatic environment switching when navigating between projects, add the shell hook:
eval "$(flk hook bash)" # or zsh/fish - For automatic activation when entering a directory, use direnv integration
See Also
- flk hook — for
refreshandswitchcommands - flk direnv — for automatic directory-based activation