Answer: Commit a `.cursor/environment.json` to your repository; a saved environment uses the file only when its environment.json location points at it. The file can specify a snapshot and install command, or a build with dockerfile and context plus an install command. Status: Confirmed Entry: tool/cursor/settings/environment-json-config Revision: 2 Digest: sha256:c90ba7b523dbc690 (changes whenever the content changes) Timeline: Created: 2026-11-13T03:10:17Z Last changed: 2026-11-18T12:31:14Z (install script sample: — → pnpm install && ./custom_script.sh) Last verified: 2026-11-20T12:37:05Z Next check: 2026-11-21T12:37:05Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of config file path | .cursor/environment.json | [1] | 2026-11-20 snapshot sample | snapshot-20260212-00000000-0000-0000-0000-000000000000 | [1] | 2026-11-20 install command sample | npm install | [1] | 2026-11-20 dockerfile sample | Dockerfile | [1] | 2026-11-20 context sample | .. | [1] | 2026-11-20 install script sample | pnpm install && ./custom_script.sh | [1] | 2026-11-20 default context | .cursor | [1] | 2026-11-20 Sources: [1] Anysphere. "cursor.com/docs/cloud-agent/setup.md". https://cursor.com/docs/cloud-agent/setup.md Role: primary. Accessed: 2026-11-20T12:37:05Z Quote: "you can commit a `.cursor/environment.json` to your repository" (Supports: config file path) Quote: ""snapshot": "snapshot-20260212-00000000-0000-0000-0000-000000000000"" (Supports: snapshot sample) Quote: ""install": "npm install"" (Supports: install command sample) Quote: ""dockerfile": "Dockerfile"" (Supports: dockerfile sample) Quote: ""context": ".."" (Supports: context sample) Quote: ""install": "pnpm install && ./custom_script.sh"" (Supports: install script sample) Quote: "When you omit `context`, it defaults to `.cursor`." (Supports: default context) Snapshot SHA-256: bee9bf95b0d0ddc89471ed9a2785bf36af0740a8856abbbdc55e98692c1af03d (captured 2026-11-17T12:46:57Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. On this check the text of [1] was unchanged since 2026-11-17T12:46:58Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T12:37:05Z. No independent second source is configured for this entry Last successful check: 2026-11-20T12:37:05Z Last attempt: 2026-11-20T12:37:05Z Notes and limitations: Extracted automatically from a single official source (section "Configuration in code with environment.json"). Related: https://latestn.com/tool/cursor/settings/eval-max-concurrency How do I set the max concurrency for Cursor agent evals? https://latestn.com/tool/cursor/settings/filter-extensions-by-scope How do I filter extensions by scope (user, workspace, or team) in Cursor's Customize page? https://latestn.com/tool/cursor/settings/find-app-id-installation-id Where do I find the App ID and installation id for a Cursor Origin app? https://latestn.com/tool/cursor/settings/enable-origin How do I enable Cursor Origin? https://latestn.com/tool/cursor/settings/enable-vim-mode How do I enable Vim mode in the Cursor Agent CLI? https://latestn.com/tool/cursor/settings/enable-vim-mode-2 How do I enable Vim mode in Cursor CLI? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-18T12:31:14Z | changed | install script sample: — → pnpm install && ./custom_script.sh | [1] 2026-11-18T12:31:14Z | changed | install command sample: — → npm install | [1] 2026-11-18T12:31:14Z | changed | install sample 2: pnpm install && ./custom_script.sh → — | [1] 2026-11-18T12:31:14Z | changed | install sample: npm install → — | [1] 2026-11-13T03:10:17Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/cursor/settings/environment-json-config/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/cursor/settings/environment-json-config POST: https://latestn.com/dispute/tool/cursor/settings/environment-json-config with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/cursor/settings/environment-json-config?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I configure a Cursor cloud agent environment using environment.json in code? Revision 2, last verified 2026-11-20T12:37:05Z. https://latestn.com/tool/cursor/settings/environment-json-config (accessed 2026-11-21T09:53:49Z). @misc{LatestN_tool_cursor_settings_environment_json_config_r2, title = {How do I configure a Cursor cloud agent environment using environment.json in code?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/cursor/settings/environment-json-config}}, note = {Revision 2; digest sha256:c90ba7b523dbc690; last verified 2026-11-20T12:37:05Z; accessed 2026-11-21T09:53:49Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/cursor/settings/environment-json-config