[{"data":1,"prerenderedAt":958},["ShallowReactive",2],{"navigation_docs":3,"-docs-cli-sync-policies":137,"-docs-cli-sync-policies-surround":953},[4,16,51,102,112,126],{"title":5,"path":6,"stem":7,"children":8,"icon":15},"Getting Started","\u002Fdocs\u002Fgetting-started","docs\u002F1.getting-started\u002F1.index",[9,11],{"title":10,"path":6,"stem":7},"Introduction",{"title":12,"path":13,"stem":14},"Quickstart","\u002Fdocs\u002Fgetting-started\u002Fquickstart","docs\u002F1.getting-started\u002F2.quickstart","i-lucide-rocket",{"title":17,"icon":18,"path":19,"stem":20,"children":21,"page":50},"Core Features","i-lucide-tag","\u002Fdocs\u002Fcore-features","docs\u002F2.core-features",[22,26,30,34,38,42,46],{"title":23,"path":24,"stem":25},"Audit Logs","\u002Fdocs\u002Fcore-features\u002Faudit-logs","docs\u002F2.core-features\u002Faudit-logs",{"title":27,"path":28,"stem":29},"Encryption","\u002Fdocs\u002Fcore-features\u002Fencryption","docs\u002F2.core-features\u002Fencryption",{"title":31,"path":32,"stem":33},"Environments","\u002Fdocs\u002Fcore-features\u002Fenvironments","docs\u002F2.core-features\u002Fenvironments",{"title":35,"path":36,"stem":37},"Projects","\u002Fdocs\u002Fcore-features\u002Fprojects","docs\u002F2.core-features\u002Fprojects",{"title":39,"path":40,"stem":41},"Teams","\u002Fdocs\u002Fcore-features\u002Fteams","docs\u002F2.core-features\u002Fteams",{"title":43,"path":44,"stem":45},"API Tokens","\u002Fdocs\u002Fcore-features\u002Ftokens","docs\u002F2.core-features\u002Ftokens",{"title":47,"path":48,"stem":49},"Variables","\u002Fdocs\u002Fcore-features\u002Fvariables","docs\u002F2.core-features\u002Fvariables",false,{"title":52,"icon":53,"path":54,"stem":55,"children":56},"CLI","i-lucide-terminal","\u002Fdocs\u002Fcli","docs\u002F3.cli\u002F2.index",[57,58,62,66,70,74,78,82,86,90,94,98],{"title":10,"path":54,"stem":55},{"title":59,"path":60,"stem":61},"Init","\u002Fdocs\u002Fcli\u002Finit","docs\u002F3.cli\u002F1.init",{"title":63,"path":64,"stem":65},"Agents & automation","\u002Fdocs\u002Fcli\u002Fagents-automation","docs\u002F3.cli\u002F10.agents-automation",{"title":67,"path":68,"stem":69},"Troubleshooting","\u002Fdocs\u002Fcli\u002Ftroubleshooting","docs\u002F3.cli\u002F11.troubleshooting",{"title":71,"path":72,"stem":73},"Sync policies","\u002Fdocs\u002Fcli\u002Fsync-policies","docs\u002F3.cli\u002F12.sync-policies",{"title":75,"path":76,"stem":77},"Run","\u002Fdocs\u002Fcli\u002Frun","docs\u002F3.cli\u002F3.run",{"title":79,"path":80,"stem":81},"Login and Logout","\u002Fdocs\u002Fcli\u002Flogin-logout","docs\u002F3.cli\u002F4.login-logout",{"title":83,"path":84,"stem":85},"Push and Pull","\u002Fdocs\u002Fcli\u002Fpush-pull","docs\u002F3.cli\u002F5.push-pull",{"title":87,"path":88,"stem":89},"Create","\u002Fdocs\u002Fcli\u002Fcreate","docs\u002F3.cli\u002F6.create",{"title":91,"path":92,"stem":93},"Config","\u002Fdocs\u002Fcli\u002Fconfig","docs\u002F3.cli\u002F7.config",{"title":95,"path":96,"stem":97},"Generate","\u002Fdocs\u002Fcli\u002Fgenerate","docs\u002F3.cli\u002F8.generate",{"title":99,"path":100,"stem":101},"Upgrade","\u002Fdocs\u002Fcli\u002Fupgrade","docs\u002F3.cli\u002F9.upgrade",{"title":103,"icon":104,"path":105,"stem":106,"children":107,"page":50},"Integrations","i-lucide-blocks","\u002Fdocs\u002Fintegrations","docs\u002F4.integrations",[108],{"title":109,"path":110,"stem":111},"Github","\u002Fdocs\u002Fintegrations\u002Fgithub","docs\u002F4.integrations\u002F1.github",{"title":113,"icon":114,"path":115,"stem":116,"children":117,"page":50},"Self-hosting","i-lucide-cloud","\u002Fdocs\u002Fself-hosting","docs\u002F5.self-hosting",[118,122],{"title":119,"path":120,"stem":121},"Deploy on Vercel","\u002Fdocs\u002Fself-hosting\u002Fvercel","docs\u002F5.self-hosting\u002F1.vercel",{"title":123,"path":124,"stem":125},"Environment variables","\u002Fdocs\u002Fself-hosting\u002Fenvironment-variables","docs\u002F5.self-hosting\u002F2.environment-variables",{"title":127,"path":128,"stem":129,"children":130,"icon":136},"Contributing","\u002Fdocs\u002Fcontributing","docs\u002F6.contributing\u002F1.index",[131,132],{"title":10,"path":128,"stem":129},{"title":133,"path":134,"stem":135},"Dev Setup","\u002Fdocs\u002Fcontributing\u002Fdev-setup","docs\u002F6.contributing\u002F2.dev-setup","i-lucide-heart-handshake",{"id":138,"title":71,"body":139,"description":946,"extension":947,"links":948,"meta":949,"navigation":950,"path":72,"seo":951,"stem":73,"__hash__":952},"docs\u002Fdocs\u002F3.cli\u002F12.sync-policies.md",{"type":140,"value":141,"toc":933},"minimark",[142,167,172,428,432,610,620,624,645,651,655,662,673,723,729,732,753,797,803,806,839,843,904,909,913,929],[143,144,145,146,150,151,154,155,159,160],"p",{},"Sync policies live under ",[147,148,149],"code",{},"sync"," in ",[147,152,153],{},"shelve.json"," (and can be enforced on the server per project). They answer: ",[156,157,158],"strong",{},"should a push from my laptop overwrite production?"," ",[156,161,162,163,166],{},"Does pull replace my whole ",[147,164,165],{},".env"," or merge?",[168,169,171],"h2",{"id":170},"quick-example","Quick example",[173,174,179],"pre",{"className":175,"code":176,"filename":153,"language":177,"meta":178,"style":178},"language-json shiki shiki-themes github-light github-dark github-dark","{\n  \"$schema\": \"https:\u002F\u002Fshelve.cloud\u002Fschema.json\",\n  \"slug\": \"my-team\",\n  \"project\": \"my-app\",\n  \"defaultEnv\": \"development\",\n  \"sync\": {\n    \"protectedEnvironments\": [\"production\", \"preview\"],\n    \"default\": {\n      \"onPushConflict\": \"overwrite\",\n      \"pullMode\": \"replace\"\n    },\n    \"environments\": {\n      \"development\": {\n        \"sourceOfTruth\": \"local\",\n        \"onPushConflict\": \"overwrite\"\n      },\n      \"production\": {\n        \"sourceOfTruth\": \"remote\",\n        \"allowPush\": false,\n        \"pullMode\": \"merge\"\n      }\n    }\n  }\n}\n","json","",[147,180,181,190,207,220,233,246,255,276,284,297,308,314,322,330,343,354,360,368,380,393,404,410,416,422],{"__ignoreMap":178},[182,183,186],"span",{"class":184,"line":185},"line",1,[182,187,189],{"class":188},"slsVL","{\n",[182,191,193,197,200,204],{"class":184,"line":192},2,[182,194,196],{"class":195},"suiK_","  \"$schema\"",[182,198,199],{"class":188},": ",[182,201,203],{"class":202},"sfrk1","\"https:\u002F\u002Fshelve.cloud\u002Fschema.json\"",[182,205,206],{"class":188},",\n",[182,208,210,213,215,218],{"class":184,"line":209},3,[182,211,212],{"class":195},"  \"slug\"",[182,214,199],{"class":188},[182,216,217],{"class":202},"\"my-team\"",[182,219,206],{"class":188},[182,221,223,226,228,231],{"class":184,"line":222},4,[182,224,225],{"class":195},"  \"project\"",[182,227,199],{"class":188},[182,229,230],{"class":202},"\"my-app\"",[182,232,206],{"class":188},[182,234,236,239,241,244],{"class":184,"line":235},5,[182,237,238],{"class":195},"  \"defaultEnv\"",[182,240,199],{"class":188},[182,242,243],{"class":202},"\"development\"",[182,245,206],{"class":188},[182,247,249,252],{"class":184,"line":248},6,[182,250,251],{"class":195},"  \"sync\"",[182,253,254],{"class":188},": {\n",[182,256,258,261,264,267,270,273],{"class":184,"line":257},7,[182,259,260],{"class":195},"    \"protectedEnvironments\"",[182,262,263],{"class":188},": [",[182,265,266],{"class":202},"\"production\"",[182,268,269],{"class":188},", ",[182,271,272],{"class":202},"\"preview\"",[182,274,275],{"class":188},"],\n",[182,277,279,282],{"class":184,"line":278},8,[182,280,281],{"class":195},"    \"default\"",[182,283,254],{"class":188},[182,285,287,290,292,295],{"class":184,"line":286},9,[182,288,289],{"class":195},"      \"onPushConflict\"",[182,291,199],{"class":188},[182,293,294],{"class":202},"\"overwrite\"",[182,296,206],{"class":188},[182,298,300,303,305],{"class":184,"line":299},10,[182,301,302],{"class":195},"      \"pullMode\"",[182,304,199],{"class":188},[182,306,307],{"class":202},"\"replace\"\n",[182,309,311],{"class":184,"line":310},11,[182,312,313],{"class":188},"    },\n",[182,315,317,320],{"class":184,"line":316},12,[182,318,319],{"class":195},"    \"environments\"",[182,321,254],{"class":188},[182,323,325,328],{"class":184,"line":324},13,[182,326,327],{"class":195},"      \"development\"",[182,329,254],{"class":188},[182,331,333,336,338,341],{"class":184,"line":332},14,[182,334,335],{"class":195},"        \"sourceOfTruth\"",[182,337,199],{"class":188},[182,339,340],{"class":202},"\"local\"",[182,342,206],{"class":188},[182,344,346,349,351],{"class":184,"line":345},15,[182,347,348],{"class":195},"        \"onPushConflict\"",[182,350,199],{"class":188},[182,352,353],{"class":202},"\"overwrite\"\n",[182,355,357],{"class":184,"line":356},16,[182,358,359],{"class":188},"      },\n",[182,361,363,366],{"class":184,"line":362},17,[182,364,365],{"class":195},"      \"production\"",[182,367,254],{"class":188},[182,369,371,373,375,378],{"class":184,"line":370},18,[182,372,335],{"class":195},[182,374,199],{"class":188},[182,376,377],{"class":202},"\"remote\"",[182,379,206],{"class":188},[182,381,383,386,388,391],{"class":184,"line":382},19,[182,384,385],{"class":195},"        \"allowPush\"",[182,387,199],{"class":188},[182,389,390],{"class":195},"false",[182,392,206],{"class":188},[182,394,396,399,401],{"class":184,"line":395},20,[182,397,398],{"class":195},"        \"pullMode\"",[182,400,199],{"class":188},[182,402,403],{"class":202},"\"merge\"\n",[182,405,407],{"class":184,"line":406},21,[182,408,409],{"class":188},"      }\n",[182,411,413],{"class":184,"line":412},22,[182,414,415],{"class":188},"    }\n",[182,417,419],{"class":184,"line":418},23,[182,420,421],{"class":188},"  }\n",[182,423,425],{"class":184,"line":424},24,[182,426,427],{"class":188},"}\n",[168,429,431],{"id":430},"policy-fields","Policy fields",[433,434,435,451],"table",{},[436,437,438],"thead",{},[439,440,441,445,448],"tr",{},[442,443,444],"th",{},"Field",[442,446,447],{},"Values",[442,449,450],{},"Effect",[452,453,454,488,518,548,573,592],"tbody",{},[439,455,456,462,471],{},[457,458,459],"td",{},[147,460,461],{},"sourceOfTruth",[457,463,464,467,468],{},[147,465,466],{},"remote"," | ",[147,469,470],{},"local",[457,472,473,474,481,482,484,485,487],{},"Hint for ",[475,476,478],"a",{"href":477},"\u002Fdocs\u002Fcli\u002Fsync-policies#sync-command",[147,479,480],{},"shelve sync",": pull when ",[147,483,466],{},", push when ",[147,486,470],{},".",[439,489,490,495,509],{},[457,491,492],{},[147,493,494],{},"onPushConflict",[457,496,497,467,500,467,503,467,506],{},[147,498,499],{},"overwrite",[147,501,502],{},"skip",[147,504,505],{},"fail",[147,507,508],{},"prompt",[457,510,511,512,515,516,487],{},"When a key exists on Shelve with a ",[156,513,514],{},"different"," value than local. Default: ",[147,517,499],{},[439,519,520,525,533],{},[457,521,522],{},[147,523,524],{},"pullMode",[457,526,527,467,530],{},[147,528,529],{},"replace",[147,531,532],{},"merge",[457,534,535,537,538,540,541,543,544,547],{},[147,536,529],{},": rewrite ",[147,539,165],{}," (legacy). ",[147,542,532],{},": remote keys win; ",[156,545,546],{},"local-only"," keys are kept.",[439,549,550,559,564],{},[457,551,552,555,556],{},[147,553,554],{},"allowPush"," \u002F ",[147,557,558],{},"allowPull",[457,560,561],{},[147,562,563],{},"boolean",[457,565,566,567,555,570,487],{},"Hard block with ",[147,568,569],{},"PUSH_BLOCKED",[147,571,572],{},"PULL_BLOCKED",[439,574,575,580,585],{},[457,576,577],{},[147,578,579],{},"protectedEnvironments",[457,581,582],{},[147,583,584],{},"string[]",[457,586,587,588,591],{},"Sets ",[147,589,590],{},"allowPush: false"," for listed env names.",[439,593,594,599,603],{},[457,595,596],{},[147,597,598],{},"requireConfirmation",[457,600,601],{},[147,602,563],{},[457,604,605,606,609],{},"Extra confirmation even if ",[147,607,608],{},"confirmChanges"," is false.",[143,611,612,613,616,617,487],{},"Per-environment overrides go in ",[147,614,615],{},"sync.environments.\u003Cname>",". Defaults apply via ",[147,618,619],{},"sync.default",[168,621,623],{"id":622},"server-policies","Server policies",[143,625,626,627,630,631,634,635,638,639,641,642,644],{},"Project ",[156,628,629],{},"Settings → Sync policy"," stores ",[147,632,633],{},"syncPolicy"," on the project. Server rules ",[156,636,637],{},"cannot be relaxed"," from ",[147,640,153],{},": if the server sets ",[147,643,590],{},", the CLI cannot override it.",[143,646,647,648,487],{},"Protected environments reject API writes with ",[147,649,650],{},"ENV_PROTECTED",[168,652,654],{"id":653},"commands","Commands",[656,657,659],"h3",{"id":658},"shelve-diff",[147,660,661],{},"shelve diff",[143,663,664,665,668,669,672],{},"Compare local ",[147,666,667],{},"envFileName"," with Shelve (no writes). Safe for agents with ",[147,670,671],{},"--json"," (no secret values).",[173,674,679],{"className":675,"code":676,"filename":677,"language":678,"meta":178,"style":178},"language-bash shiki shiki-themes github-light github-dark github-dark","shelve diff --env staging\nshelve --json diff --env staging\nshelve diff --env staging --show-values\n","terminal","bash",[147,680,681,696,709],{"__ignoreMap":178},[182,682,683,687,690,693],{"class":184,"line":185},[182,684,686],{"class":685},"shcOC","shelve",[182,688,689],{"class":202}," diff",[182,691,692],{"class":195}," --env",[182,694,695],{"class":202}," staging\n",[182,697,698,700,703,705,707],{"class":184,"line":192},[182,699,686],{"class":685},[182,701,702],{"class":195}," --json",[182,704,689],{"class":202},[182,706,692],{"class":195},[182,708,695],{"class":202},[182,710,711,713,715,717,720],{"class":184,"line":209},[182,712,686],{"class":685},[182,714,689],{"class":202},[182,716,692],{"class":195},[182,718,719],{"class":202}," staging",[182,721,722],{"class":195}," --show-values\n",[656,724,726,728],{"id":725},"shelve-sync-sync-command",[147,727,480],{}," {#sync-command}",[143,730,731],{},"Apply the effective policy for the environment:",[733,734,735,745],"ul",{},[736,737,738,741,742,744],"li",{},[147,739,740],{},"sourceOfTruth: remote"," → pull (respects ",[147,743,524],{},")",[736,746,747,750,751,744],{},[147,748,749],{},"sourceOfTruth: local"," → push (respects ",[147,752,494],{},[173,754,756],{"className":675,"code":755,"filename":677,"language":678,"meta":178,"style":178},"shelve sync --env development\nshelve sync --env production --dry-run\nshelve sync --yes --env staging\n",[147,757,758,770,784],{"__ignoreMap":178},[182,759,760,762,765,767],{"class":184,"line":185},[182,761,686],{"class":685},[182,763,764],{"class":202}," sync",[182,766,692],{"class":195},[182,768,769],{"class":202}," development\n",[182,771,772,774,776,778,781],{"class":184,"line":192},[182,773,686],{"class":685},[182,775,764],{"class":202},[182,777,692],{"class":195},[182,779,780],{"class":202}," production",[182,782,783],{"class":195}," --dry-run\n",[182,785,786,788,790,793,795],{"class":184,"line":209},[182,787,686],{"class":685},[182,789,764],{"class":202},[182,791,792],{"class":195}," --yes",[182,794,692],{"class":195},[182,796,695],{"class":202},[143,798,799,802],{},[147,800,801],{},"--dry-run"," reports the planned action and diff without writing.",[168,804,123],{"id":805},"environment-variables",[433,807,808,817],{},[436,809,810],{},[439,811,812,815],{},[442,813,814],{},"Variable",[442,816,450],{},[452,818,819,829],{},[439,820,821,826],{},[457,822,823],{},[147,824,825],{},"SHELVE_SYNC_ALLOW_PUSH=0",[457,827,828],{},"Disables push for all environments in this process",[439,830,831,836],{},[457,832,833],{},[147,834,835],{},"SHELVE_SYNC_ALLOW_PULL=0",[457,837,838],{},"Disables pull for all environments",[168,840,842],{"id":841},"error-codes","Error codes",[433,844,845,855],{},[436,846,847],{},[439,848,849,852],{},[442,850,851],{},"Code",[442,853,854],{},"Meaning",[452,856,857,868,879,895],{},[439,858,859,863],{},[457,860,861],{},[147,862,569],{},[457,864,865,867],{},[147,866,590],{}," or protected environment",[439,869,870,874],{},[457,871,872],{},[147,873,572],{},[457,875,876],{},[147,877,878],{},"allowPull: false",[439,880,881,886],{},[457,882,883],{},[147,884,885],{},"SYNC_CONFLICT",[457,887,888,891,892,894],{},[147,889,890],{},"onPushConflict: fail"," (or ",[147,893,508],{}," in non-interactive mode)",[439,896,897,901],{},[457,898,899],{},[147,900,650],{},[457,902,903],{},"Server rejected a write to a protected environment",[143,905,906,907,487],{},"See ",[475,908,67],{"href":68},[168,910,912],{"id":911},"monorepos","Monorepos",[143,914,915,916,918,919,159,922,924,925,928],{},"Put ",[147,917,579],{}," in the ",[156,920,921],{},"root",[147,923,153],{},"; package-level files can override ",[147,926,927],{},"sync.environments"," for each app.",[930,931,932],"style",{},"html pre.shiki code .slsVL, html code.shiki .slsVL{--shiki-light:#24292E;--shiki-default:#E1E4E8;--shiki-dark:#E1E4E8}html pre.shiki code .suiK_, html code.shiki .suiK_{--shiki-light:#005CC5;--shiki-default:#79B8FF;--shiki-dark:#79B8FF}html pre.shiki code .sfrk1, html code.shiki .sfrk1{--shiki-light:#032F62;--shiki-default:#9ECBFF;--shiki-dark:#9ECBFF}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .shcOC, html code.shiki .shcOC{--shiki-light:#6F42C1;--shiki-default:#B392F0;--shiki-dark:#B392F0}",{"title":178,"searchDepth":192,"depth":192,"links":934},[935,936,937,938,943,944,945],{"id":170,"depth":192,"text":171},{"id":430,"depth":192,"text":431},{"id":622,"depth":192,"text":623},{"id":653,"depth":192,"text":654,"children":939},[940,941],{"id":658,"depth":209,"text":661},{"id":725,"depth":209,"text":942},"shelve sync {#sync-command}",{"id":805,"depth":192,"text":123},{"id":841,"depth":192,"text":842},{"id":911,"depth":192,"text":912},"Control who wins when local .env and Shelve diverge — push guards, pull merge, and diff.","md",null,{},true,{"title":71,"description":946},"xvrWcxzhbiGHRc2qG7mpqp8QZdBvucZeaBxLJNn4Zp0",[954,956],{"title":67,"path":68,"stem":69,"description":955,"children":-1},"Symptom → cause → fix for the Shelve CLI and agent automation.",{"title":75,"path":76,"stem":77,"description":957,"children":-1},"Inject secrets into your application at runtime without writing a .env file.",1780236538832]