The plan and apply workflow lets you preview changes before deploying them — similar to Terraform.
Plan
griffin plan compares your local monitor files against what’s deployed on the hub and shows the diff:
griffin plangriffin plan productiongriffin plan --monitor health-checkgriffin plan --env production --monitor health-check
Use --monitor <name> to preview changes for only that monitor.Example output:
Monitors to create: + health-check + user-crudMonitors to update: ~ payment-flow (frequency changed)Monitors unchanged: = auth-check2 to create, 1 to update, 1 unchanged
CI/CD usage
griffin plan exits with code 2 when there are pending changes and 0 when everything is in sync. This makes it useful in CI pipelines:
griffin plan || echo "Changes pending"
Use --json for machine-readable output:
griffin plan --json
Apply
griffin apply pushes your local monitors to the hub:
griffin applygriffin apply production# Apply only a single monitor by namegriffin apply --monitor health-checkgriffin apply --env production --monitor health-check
Use --monitor <name> to create or update only that monitor. By default, it shows you what will change and asks for confirmation. Use flags to customize:
# Skip confirmationgriffin apply --auto-approve# Preview without making changesgriffin apply --dry-run# Delete monitors that no longer exist locallygriffin apply --prune
The prune flag
Without --prune, apply only creates and updates monitors. Monitors that exist on the hub but not locally are left untouched.With --prune, monitors on the hub that don’t have a corresponding local monitor file are deleted.
# Safe: only creates/updatesgriffin apply# Destructive: also deletes removed monitorsgriffin apply --prune
Use --prune carefully. Always run griffin plan first to verify what will be deleted.
Validate and test (with optional filter)
You can restrict validation or local runs to a single monitor by name:
griffin validate --monitor health-checkgriffin test --monitor health-checkgriffin test --env staging --monitor health-check
Typical workflow
# 1. Write or modify monitor files in __griffin__/# 2. Test locallygriffin test# 3. Preview changesgriffin plan production# 4. Deploygriffin apply production
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Griffin","colors":{"primary":"#EC407A","light":"#EC407A","dark":"#EC407A"},"logo":{"light":"https://mintcdn.com/griffin/vE9jJsSmbB6yUPj9/logo/logo.svg?fit=max\u0026auto=format\u0026n=vE9jJsSmbB6yUPj9\u0026q=85\u0026s=a6046fb332de88a50acea2c9e1d790a7","dark":"https://mintcdn.com/griffin/vE9jJsSmbB6yUPj9/logo/logo.svg?fit=max\u0026auto=format\u0026n=vE9jJsSmbB6yUPj9\u0026q=85\u0026s=a6046fb332de88a50acea2c9e1d790a7"},"favicon":"/favicon.png","appearance":{"default":"dark","strict":true},"navbar":{"links":[],"primary":{"type":"github","label":"GitHub","href":"https://github.com/griffin-open-source/griffin"}},"footer":{"socials":{"github":"https://github.com/griffin-open-source/griffin"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"GitHub","icon":"github","href":"https://github.com/griffin-open-source/griffin"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"griffin","hasAudioNarration":false,"actualSubdomain":"griffin","customDomains":["docs.getgriffinapp.com"],"gitSource":{"type":"github","owner":"griffin-open-source","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"entitlements":{},"buildId":"6ae945d1d69537c8ab6f39df:success","clientVersion":"0.0.4143","searchFilterCounts":[{"language":"default","tag":"API Reference","count":44},{"language":"default","tag":"Endpoints","count":41},{"language":"default","tag":"Guides","count":32},{"language":"default","tag":"integrations","count":11},{"language":"default","tag":"notifications","count":8},{"language":"default","tag":"Writing Monitors","count":7},{"language":"default","tag":"Command Line","count":5},{"language":"default","tag":"Platform","count":5},{"language":"default","tag":"monitor","count":5},{"language":"default","tag":"secrets","count":5}]},"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":"custom-rbac-roles","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":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","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":"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":"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":"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":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","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":"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":"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":"turbopuffer-dual-write","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},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","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}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"cli/plan-apply","slug":"/cli/plan-apply","pageMetadata":{"title":"Plan \u0026 Apply","description":"Preview and push changes to the hub","href":"/cli/plan-apply","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: \"Preview and push changes to the hub\"\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`,strong:`strong`,..._provideComponents(),...props.components},{CodeBlock,Heading,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`The plan and apply workflow lets you preview changes before deploying them — similar to Terraform.`}),`\n`,_jsx(Heading,{level:`2`,id:`plan`,children:`Plan`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`griffin plan`}),` compares your local monitor files against what’s deployed on the hub and shows the diff:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,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:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`griffin`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` plan`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`griffin`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` plan`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` production`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`griffin`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` plan`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --monitor`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` health-check`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`griffin`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` plan`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --env`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` production`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --monitor`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` health-check`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Use `,_jsx(_components.code,{children:`--monitor \u003cname>`}),` to preview changes for only that monitor.`]}),`\n`,_jsx(_components.p,{children:`Example output:`}),`\n`,_jsx(CodeBlock,{numberOfLines:`12`,language:`text`,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:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`12`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Monitors to create:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` + health-check`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` + user-crud`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Monitors to update:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` ~ payment-flow (frequency changed)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Monitors unchanged:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` = auth-check`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`2 to create, 1 to update, 1 unchanged`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Heading,{level:`3`,id:`ci/cd-usage`,children:`CI/CD usage`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`griffin plan`}),` exits with code `,_jsx(_components.strong,{children:`2`}),` when there are pending changes and `,_jsx(_components.strong,{children:`0`}),` when everything is in sync. This makes it useful in CI pipelines:`]}),`\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:`griffin`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` plan`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ||`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` echo`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Changes pending\"`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Use `,_jsx(_components.code,{children:`--json`}),` for machine-readable output:`]}),`\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:`griffin`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` plan`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --json`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`apply`,children:`Apply`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`griffin apply`}),` pushes your local monitors to the hub:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,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:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`griffin`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` apply`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`griffin`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` apply`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` production`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Apply only a single monitor by name`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`griffin`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` apply`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --monitor`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` health-check`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`griffin`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` apply`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --env`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` production`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --monitor`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` health-check`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Use `,_jsx(_components.code,{children:`--monitor \u003cname>`}),` to create or update only that monitor. By default, it shows you what will change and asks for confirmation. Use flags to customize:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`8`,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:`8`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Skip confirmation`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`griffin`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` apply`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --auto-approve`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Preview without making changes`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`griffin`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` apply`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --dry-run`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Delete monitors that no longer exist locally`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`griffin`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` apply`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --prune`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`the-prune-flag`,children:`The prune flag`}),`\n`,_jsxs(_components.p,{children:[`Without `,_jsx(_components.code,{children:`--prune`}),`, `,_jsx(_components.code,{children:`apply`}),` only creates and updates monitors. Monitors that exist on the hub but not locally are left untouched.`]}),`\n`,_jsxs(_components.p,{children:[`With `,_jsx(_components.code,{children:`--prune`}),`, monitors on the hub that don’t have a corresponding local monitor file are deleted.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,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:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Safe: only creates/updates`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`griffin`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` apply`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Destructive: also deletes removed monitors`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`griffin`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` apply`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --prune`})]}),`\n`]})})}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`Use `,_jsx(_components.code,{children:`--prune`}),` carefully. Always run `,_jsx(_components.code,{children:`griffin plan`}),` first to verify what will be deleted.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`validate-and-test-with-optional-filter`,children:`Validate and test (with optional filter)`}),`\n`,_jsx(_components.p,{children:`You can restrict validation or local runs to a single monitor by name:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,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:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`griffin`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` validate`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --monitor`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` health-check`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`griffin`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` test`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --monitor`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` health-check`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`griffin`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` test`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --env`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` staging`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --monitor`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` health-check`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`typical-workflow`,children:`Typical workflow`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`10`,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:`10`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# 1. Write or modify monitor files in __griffin__/`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# 2. Test locally`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`griffin`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` test`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# 3. Preview changes`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`griffin`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` plan`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` production`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# 4. Deploy`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`griffin`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` apply`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` production`})]}),`\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":"Plan \u0026 Apply","description":"Preview and push changes to the hub","href":"/cli/plan-apply","hidden":false}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Plan","slug":"plan","depth":2,"children":[{"title":"CI/CD usage","slug":"ci/cd-usage","depth":3,"children":[]}]},{"title":"Apply","slug":"apply","depth":2,"children":[{"title":"The prune flag","slug":"the-prune-flag","depth":3,"children":[]}]},{"title":"Validate and test (with optional filter)","slug":"validate-and-test-with-optional-filter","depth":2,"children":[]},{"title":"Typical workflow","slug":"typical-workflow","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"griffin","siteName":"Griffin","title":"Plan \u0026 Apply - Griffin","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-02-20T02:58:30.648Z","originalFileLocation":"cli/plan-apply.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=\"dark\";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=\"dark\"}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=\"Preview and push changes to the hub\">\u003cmeta data-mint-head name=\"application-name\" content=\"Griffin\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/griffin/CC5CgU28Hj32kDWo/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/griffin/CC5CgU28Hj32kDWo/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/griffin/CC5CgU28Hj32kDWo/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/griffin/CC5CgU28Hj32kDWo/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/griffin/CC5CgU28Hj32kDWo/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/griffin/CC5CgU28Hj32kDWo/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/griffin/CC5CgU28Hj32kDWo/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/griffin/CC5CgU28Hj32kDWo/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/griffin/CC5CgU28Hj32kDWo/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Plan \u0026amp; Apply - Griffin\">\u003cmeta data-mint-head property=\"og:description\" content=\"Preview and push changes to the hub\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Griffin\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.getgriffinapp.com/cli/plan-apply\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://griffin.mintlify.site/_mintlify/api/og/v2?division=Command+Line\u0026amp;title=Plan+%26+Apply\u0026amp;description=Preview+and+push+changes+to+the+hub\u0026amp;theme=da691c39263add3ed41ee064\u0026amp;signature=7591ae0a1d5a8c3249f8a33690b82a2c5954a19d2eb9d1582e0fab9d3c8361b6\">\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=\"Plan \u0026amp; Apply - Griffin\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Preview and push changes to the hub\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://griffin.mintlify.site/_mintlify/api/og/v2?division=Command+Line\u0026amp;title=Plan+%26+Apply\u0026amp;description=Preview+and+push+changes+to+the+hub\u0026amp;theme=da691c39263add3ed41ee064\u0026amp;signature=7591ae0a1d5a8c3249f8a33690b82a2c5954a19d2eb9d1582e0fab9d3c8361b6\">\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=\"/mintlify-assets/_mintlify/favicons/griffin/CC5CgU28Hj32kDWo/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Griffin\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#EC407A\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.getgriffinapp.com/cli/plan-apply\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/cli/plan-apply.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.getgriffinapp.com/#organization\",\"name\":\"Griffin\",\"url\":\"https://docs.getgriffinapp.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/griffin/vE9jJsSmbB6yUPj9/logo/logo.svg?fit=max\u0026auto=format\u0026n=vE9jJsSmbB6yUPj9\u0026q=85\u0026s=a6046fb332de88a50acea2c9e1d790a7\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.getgriffinapp.com#website\",\"name\":\"Griffin\",\"url\":\"https://docs.getgriffinapp.com\",\"publisher\":{\"@id\":\"https://docs.getgriffinapp.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.getgriffinapp.com/cli/plan-apply#webpage\",\"url\":\"https://docs.getgriffinapp.com/cli/plan-apply\",\"name\":\"Plan \u0026 Apply\",\"description\":\"Preview and push changes to the hub\",\"dateModified\":\"2026-02-20T02:58:30.648Z\",\"isPartOf\":{\"@id\":\"https://docs.getgriffinapp.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.getgriffinapp.com/cli/plan-apply#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.getgriffinapp.com/cli/plan-apply#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Command Line\",\"item\":\"https://docs.getgriffinapp.com/cli/core-commands\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Plan \u0026 Apply\",\"item\":\"https://docs.getgriffinapp.com/cli/plan-apply\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.getgriffinapp.com/cli/plan-apply#article\",\"headline\":\"Plan \u0026 Apply\",\"name\":\"Plan \u0026 Apply\",\"description\":\"Preview and push changes to the hub\",\"url\":\"https://docs.getgriffinapp.com/cli/plan-apply\",\"mainEntityOfPage\":{\"@id\":\"https://docs.getgriffinapp.com/cli/plan-apply#webpage\"},\"dateModified\":\"2026-02-20T02:58:30.648Z\",\"publisher\":{\"@id\":\"https://docs.getgriffinapp.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.getgriffinapp.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Griffin\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Griffin\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/cli/plan-apply.md","siteName":"Griffin","nav":{"global":{"anchors":[{"anchor":"GitHub","icon":"github","href":"https://github.com/griffin-open-source/griffin"}]},"tabs":[{"tab":"Guides","groups":[{"group":"Getting Started","pages":[{"title":"Introduction","href":"/getting-started/introduction","hidden":false},{"title":"Comparisons","href":"/getting-started/comparisons","hidden":false},{"title":"Installation","href":"/getting-started/installation","hidden":false},{"title":"Quickstart","href":"/getting-started/quickstart","hidden":false}]},{"group":"Concepts","pages":[{"title":"Cloud vs Self-Host","href":"/concepts/cloud-vs-self-host","hidden":false},{"title":"Architecture","href":"/concepts/architecture","hidden":false},{"title":"Environments","href":"/concepts/environments"},{"title":"Execution Model","href":"/concepts/execution-model","hidden":false}]},{"group":"Writing Monitors","pages":[{"title":"Graph Builder","href":"/writing-tests/graph-builder","hidden":false},{"title":"Sequential Builder","href":"/writing-tests/sequential-builder","hidden":false},{"title":"Browser Monitors","href":"/writing-tests/browser-monitors","hidden":false},{"title":"Assertions","href":"/writing-tests/assertions","hidden":false},{"title":"Secrets","href":"/writing-tests/secrets","hidden":false},{"title":"Variables","href":"/writing-tests/variables","hidden":false},{"title":"Frequencies \u0026 Scheduling","href":"/writing-tests/frequencies","hidden":false}]},{"group":"Platform","pages":[{"title":"Monitors","href":"/platform/monitors","hidden":false},{"title":"Runs","href":"/platform/runs","hidden":false},{"title":"Metrics","href":"/platform/metrics","hidden":false},{"title":"Notifications","href":"/platform/notifications","hidden":false},{"title":"Integrations","href":"/platform/integrations","hidden":false}]},{"group":"Griffin Hub","pages":[{"title":"Griffin Hub Overview","href":"/griffin-hub/overview","hidden":false},{"title":"Configuration","href":"/griffin-hub/configuration","hidden":false},{"title":"Self-Hosting Guide","href":"/griffin-hub/self-hosting","hidden":false}]},{"group":"Griffin Cloud","pages":[{"title":"Griffin Cloud Overview","href":"/griffin-cloud/overview","hidden":false},{"title":"Organizations","href":"/griffin-cloud/organizations","hidden":false},{"title":"Members \u0026 Roles","href":"/griffin-cloud/members-roles","hidden":false},{"title":"Billing","href":"/griffin-cloud/billing","hidden":false}]},{"group":"Command Line","pages":[{"title":"Core Commands","href":"/cli/core-commands","hidden":false},{"title":"Authentication","href":"/cli/authentication","hidden":false},{"title":"Environments","description":"CLI commands for managing environments","href":"/cli/environments"},{"title":"Plan \u0026 Apply","href":"/cli/plan-apply","hidden":false},{"title":"Runs \u0026 Metrics","description":"View execution history and performance data","href":"/cli/runs-metrics","hidden":false}]}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/api-reference/overview"}]}]},"basePath":"","title":"Plan \u0026 Apply - Griffin","buildId":"dpl_Fyv1NbzwP68g2bEH2Roy98uY1zmE","deploymentId":"dpl_Fyv1NbzwP68g2bEH2Roy98uY1zmE","dynamics":[],"chunks":[]}