Prints the shell activation script for a workspace environment. You can source this script to activate the environment in your current shell without starting a new shell session.This is useful for integrating environment activation into CI pipelines, Makefiles, Docker builds, or custom shell scripts.
{"docsConfig":{"theme":"maple","$schema":"https://mintlify.com/docs.json","name":"jnc","colors":{"primary":"#2563EB","light":"#60A5FA","dark":"#1E40AF"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"gentleweapons-d9d3f84a","hasAudioNarration":false,"actualSubdomain":"gentleweapons-d9d3f84a","customDomains":["jncpkg.org"],"gitSource":{"type":"github","owner":"gentle-weapons","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6a21ebb45011cce4a41a28f8","collectionId":"da897287-0072-4300-9357-204c260909e2","schemaVersion":"v2"},"entitlements":{},"buildId":"6a21ebb45011cce4a41a28f8:success","clientVersion":"0.0.3971","searchFilterCounts":[{"language":"default","tag":"CLI Reference","count":28},{"language":"default","tag":"Commands","count":27},{"language":"default","tag":"Documentation","count":9},{"language":"default","tag":"Concepts","count":5},{"language":"default","tag":"Getting Started","count":4},{"language":"default","tag":"Overview","count":1}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-v7-file-tree","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"pause-universal-search-reconcile","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"per-site-search-delta","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-private-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-nav-generations","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-agent-model-picker","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"isAtlas":false,"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"cli/shell-hook","slug":"/cli/shell-hook","pageMetadata":{"title":"jnc shell-hook","description":"Print the environment activation script for use in shell configurations.","href":"/cli/shell-hook","hidden":false},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Print the environment activation script for use in shell configurations.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,p:`p`,pre:`pre`,span:`span`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{CodeBlock,Heading,Table}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`1`,id:`jnc-shell-hook`,children:`jnc shell-hook`}),`\n`,_jsx(_components.p,{children:`Prints the shell activation script for a workspace environment. You can source this script to activate the environment in your current shell without starting a new shell session.`}),`\n`,_jsx(_components.p,{children:`This is useful for integrating environment activation into CI pipelines, Makefiles, Docker builds, or custom shell scripts.`}),`\n`,_jsx(Heading,{level:`2`,id:`usage`,children:`Usage`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`jnc`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` shell-hook`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [OPTIONS]`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`options`,children:`Options`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Option`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`-s`}),`, `,_jsx(_components.code,{children:`--shell \u003cSHELL>`})]}),_jsxs(_components.td,{children:[`The target shell for the activation script. Options: `,_jsx(_components.code,{children:`bash`}),`, `,_jsx(_components.code,{children:`zsh`}),`, `,_jsx(_components.code,{children:`fish`}),`, `,_jsx(_components.code,{children:`xonsh`}),`. Defaults to the current shell.`]})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`-e`}),`, `,_jsx(_components.code,{children:`--environment \u003cENV>`})]}),_jsxs(_components.td,{children:[`The environment to generate the activation script for. Defaults to `,_jsx(_components.code,{children:`default`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`--json`})}),_jsxs(_components.td,{children:[`Emit the environment variables as a JSON object instead of a shell script. Conflicts with `,_jsx(_components.code,{children:`--shell`}),`.`]})]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`update-options`,children:`Update Options`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Option`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`--frozen`})}),_jsx(_components.td,{children:`Use the lockfile as-is, do not update it.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`--locked`})}),_jsx(_components.td,{children:`Require the lockfile to be up-to-date, abort if not.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`--no-install`})}),_jsx(_components.td,{children:`Do not install the environment before generating the hook.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`--as-is`})}),_jsxs(_components.td,{children:[`Shorthand for `,_jsx(_components.code,{children:`--frozen --no-install`}),`.`]})]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`global-options`,children:`Global Options`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Option`}),_jsx(_components.th,{children:`Description`})]})}),_jsx(_components.tbody,{children:_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`-m`}),`, `,_jsx(_components.code,{children:`--manifest-path \u003cPATH>`})]}),_jsxs(_components.td,{children:[`Path to `,_jsx(_components.code,{children:`jnc.toml`}),`, `,_jsx(_components.code,{children:`pyproject.toml`}),`, or the workspace directory.`]})]})})]}),`\n`,_jsx(Heading,{level:`2`,id:`examples`,children:`Examples`}),`\n`,_jsx(Heading,{level:`3`,id:`activate-in-the-current-bash-session`,children:`Activate in the current bash session`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`eval`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"$(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`jnc`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` shell-hook)\"`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`generate-a-script-for-a-specific-shell`,children:`Generate a script for a specific shell`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`jnc`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` shell-hook`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --shell`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` zsh`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`activate-a-specific-environment`,children:`Activate a specific environment`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`eval`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"$(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`jnc`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` shell-hook `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`--environment`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` cuda)\"`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`get-environment-variables-as-json`,children:`Get environment variables as JSON`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`jnc`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` shell-hook`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --json`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`use-in-a-dockerfile`,children:`Use in a Dockerfile`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`docker`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`docker`,children:_jsxs(_components.code,{language:`docker`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`RUN`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` jnc install --frozen`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`RUN`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` eval `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"$(jnc shell-hook --shell bash)\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \u0026\u0026 python my_script.py`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`use-in-a-makefile`,children:`Use in a Makefile`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`make`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`make`,children:_jsxs(_components.code,{language:`make`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`test`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\teval \"`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`$$`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(jnc shell-hook)\" \u0026\u0026 pytest`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`use-in-ci-github-actions`,children:`Use in CI (GitHub Actions)`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`yaml`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`yaml`,children:_jsxs(_components.code,{language:`yaml`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`- `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`run`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`|`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` eval \"$(jnc shell-hook)\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` python -c \"import numpy; print(numpy.__version__)\"`})}),`\n`]})})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"jnc shell-hook","description":"Print the environment activation script for use in shell configurations.","href":"/cli/shell-hook","hidden":false}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"jnc shell-hook","slug":"jnc-shell-hook","depth":1,"children":[]},{"title":"Usage","slug":"usage","depth":2,"children":[]},{"title":"Options","slug":"options","depth":2,"children":[{"title":"Update Options","slug":"update-options","depth":3,"children":[]},{"title":"Global Options","slug":"global-options","depth":3,"children":[]}]},{"title":"Examples","slug":"examples","depth":2,"children":[{"title":"Activate in the current bash session","slug":"activate-in-the-current-bash-session","depth":3,"children":[]},{"title":"Generate a script for a specific shell","slug":"generate-a-script-for-a-specific-shell","depth":3,"children":[]},{"title":"Activate a specific environment","slug":"activate-a-specific-environment","depth":3,"children":[]},{"title":"Get environment variables as JSON","slug":"get-environment-variables-as-json","depth":3,"children":[]},{"title":"Use in a Dockerfile","slug":"use-in-a-dockerfile","depth":3,"children":[]},{"title":"Use in a Makefile","slug":"use-in-a-makefile","depth":3,"children":[]},{"title":"Use in CI (GitHub Actions)","slug":"use-in-ci-github-actions","depth":3,"children":[]}]}],"codeExamples":{}},"jsLinks":[],"subdomain":"gentleweapons-d9d3f84a","siteName":"jnc","title":"jnc shell-hook - jnc","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-02-28T16:32:57.535Z","originalFileLocation":"cli/shell-hook.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Print the environment activation script for use in shell configurations.\">\u003cmeta data-mint-head name=\"application-name\" content=\"jnc\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/gentleweapons-d9d3f84a/_generated/favicon/apple-touch-icon.png?v=3\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/gentleweapons-d9d3f84a/_generated/favicon/favicon-32x32.png?v=3\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/gentleweapons-d9d3f84a/_generated/favicon/favicon-16x16.png?v=3\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/gentleweapons-d9d3f84a/_generated/favicon/favicon.ico?v=3\">\u003cmeta data-mint-head property=\"og:title\" content=\"jnc shell-hook - jnc\">\u003cmeta data-mint-head property=\"og:description\" content=\"Print the environment activation script for use in shell configurations.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"jnc\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://jncpkg.org/cli/shell-hook\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://gentleweapons-d9d3f84a.mintlify.app/_mintlify/api/og/v2?division=Commands\u0026amp;title=jnc+shell-hook\u0026amp;description=Print+the+environment+activation+script+for+use+in+shell+configurations.\u0026amp;theme=f93f9f41876bb5c60e936f10\u0026amp;signature=9863e0986d67d3dd7fae79e2ccdcc81d7109c0940e095352ceb0c6546df16b09\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"jnc shell-hook - jnc\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Print the environment activation script for use in shell configurations.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://gentleweapons-d9d3f84a.mintlify.app/_mintlify/api/og/v2?division=Commands\u0026amp;title=jnc+shell-hook\u0026amp;description=Print+the+environment+activation+script+for+use+in+shell+configurations.\u0026amp;theme=f93f9f41876bb5c60e936f10\u0026amp;signature=9863e0986d67d3dd7fae79e2ccdcc81d7109c0940e095352ceb0c6546df16b09\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"https://mintlify.s3.us-west-1.amazonaws.com/gentleweapons-d9d3f84a/_generated/favicon/browserconfig.xml?v=3\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"jnc\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#2563EB\">\u003clink data-mint-head rel=\"canonical\" href=\"https://jncpkg.org/cli/shell-hook\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/cli/shell-hook.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://jncpkg.org/#organization\",\"name\":\"jnc\",\"url\":\"https://jncpkg.org\"},{\"@type\":\"WebSite\",\"@id\":\"https://jncpkg.org#website\",\"name\":\"jnc\",\"url\":\"https://jncpkg.org\",\"publisher\":{\"@id\":\"https://jncpkg.org/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://jncpkg.org/cli/shell-hook#webpage\",\"url\":\"https://jncpkg.org/cli/shell-hook\",\"name\":\"jnc shell-hook\",\"description\":\"Print the environment activation script for use in shell configurations.\",\"dateModified\":\"2026-02-28T16:32:57.535Z\",\"isPartOf\":{\"@id\":\"https://jncpkg.org#website\"},\"breadcrumb\":{\"@id\":\"https://jncpkg.org/cli/shell-hook#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://jncpkg.org/cli/shell-hook#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Commands\",\"item\":\"https://jncpkg.org/cli/init\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"jnc shell-hook\",\"item\":\"https://jncpkg.org/cli/shell-hook\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://jncpkg.org/cli/shell-hook#article\",\"headline\":\"jnc shell-hook\",\"name\":\"jnc shell-hook\",\"description\":\"Print the environment activation script for use in shell configurations.\",\"url\":\"https://jncpkg.org/cli/shell-hook\",\"mainEntityOfPage\":{\"@id\":\"https://jncpkg.org/cli/shell-hook#webpage\"},\"dateModified\":\"2026-02-28T16:32:57.535Z\",\"publisher\":{\"@id\":\"https://jncpkg.org/#organization\"},\"isPartOf\":{\"@id\":\"https://jncpkg.org#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"jnc\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"jnc","nav":{"global":null,"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":"/introduction"}]},{"tab":"CLI Reference","groups":[{"group":"Overview","pages":[{"title":"CLI Reference","href":"/cli/overview"}]},{"group":"Commands","pages":[{"title":"jnc init","href":"/cli/init"},{"title":"jnc add","href":"/cli/add"},{"title":"jnc remove","href":"/cli/remove"},{"title":"jnc install","href":"/cli/install"},{"title":"jnc reinstall","href":"/cli/reinstall"},{"title":"jnc lock","href":"/cli/lock"},{"title":"jnc run","href":"/cli/run"},{"title":"jnc shell","description":"Start an interactive shell in the workspace environment.","href":"/cli/shell"},{"title":"jnc shell-hook","href":"/cli/shell-hook"},{"title":"jnc exec","description":"Run a command in a temporary environment.","href":"/cli/exec"},{"title":"jnc search","href":"/cli/search"},{"title":"jnc list","href":"/cli/list"},{"title":"jnc tree","href":"/cli/tree"},{"title":"jnc update","href":"/cli/update"},{"title":"jnc upgrade","href":"/cli/upgrade"},{"title":"jnc import","href":"/cli/import"},{"title":"jnc info","href":"/cli/info"},{"title":"jnc clean","href":"/cli/clean"},{"title":"jnc auth","href":"/cli/auth"},{"title":"jnc config","href":"/cli/config"},{"title":"jnc task","href":"/cli/task"},{"title":"jnc global","href":"/cli/global"},{"title":"jnc workspace","href":"/cli/workspace"},{"title":"jnc build","href":"/cli/build"},{"title":"jnc upload","href":"/cli/upload"},{"title":"jnc probe","href":"/cli/probe"},{"title":"jnc completion","href":"/cli/completion"}]}]}]},"title":"jnc shell-hook - jnc","buildId":"dpl_DFJrtvUi8HS5F9nkooKuDJsuD5BM","deploymentId":"dpl_DFJrtvUi8HS5F9nkooKuDJsuD5BM","dynamics":[],"chunks":[]}