1# Local environments1# Local environments – Codex app
2 2
3Local environments let you configure setup steps for worktrees as well as common actions for a project.3Local environments let you configure setup steps for worktrees as well as common actions for a project.
4 4
5You configure your local environments through the [Codex app settings](codex://settings) pane. You can check the generated file into your project's Git repository to share with others.5You configure your local environments through the [Codex app settings](codex://settings) pane. You can check the generated file into your project’s Git repository to share with others.
6 6
7Codex stores this configuration inside the `.codex` folder at the root of your7Codex stores this configuration inside the `.codex` folder at the root of your
8project. If your repository contains more than one project, open the project8project. If your repository contains more than one project, open the project
10 10
11## Setup scripts11## Setup scripts
12 12
13Since worktrees run in different directories than your local tasks, your project might not be fully set up and might be missing dependencies or files that aren't checked into your repository. Setup scripts run automatically when Codex creates a new worktree at the start of a new thread.13Since worktrees run in different directories than your local tasks, your project might not be fully set up and might be missing dependencies or files that aren’t checked into your repository. Setup scripts run automatically when Codex creates a new worktree at the start of a new thread.
14 14
15Use this script to run any command required to configure your environment, such as installing dependencies or running a build process.15Use this script to run any command required to configure your environment, such as installing dependencies or running a build process.
16 16
17For example, for a TypeScript project you might want to install the dependencies and do an initial build using a setup script:17For example, for a TypeScript project you might want to install the dependencies and do an initial build using a setup script:
18 18
19```bash19```
20npm install20npm install
21npm run build21npm run build
22```22```
25 25
26## Actions26## Actions
27 27
28<section class="feature-grid">28Use actions to define common tasks like starting your app’s development server or running your test suite. These actions appear in the Codex app top bar for quick access. The actions will be run within the app’s [integrated terminal](https://developers.openai.com/codex/app/features#integrated-terminal).
29
30<div>
31Use actions to define common tasks like starting your app's development server or running your test suite. These actions appear in the Codex app top bar for quick access. The actions will be run within the app's [integrated terminal](https://developers.openai.com/codex/app/features#integrated-terminal).
32 29
33Actions are helpful to keep you from typing common actions like triggering a build for your project or starting a development server. For one-off quick debugging you can use the integrated terminal directly.30Actions are helpful to keep you from typing common actions like triggering a build for your project or starting a development server. For one-off quick debugging you can use the integrated terminal directly.
34 31
35</div>32
36
37<CodexScreenshot
38 alt="Project actions list shown in Codex app settings"
39 lightSrc="/images/codex/app/actions-light.webp"
40 darkSrc="/images/codex/app/actions-dark.webp"
41 maxHeight="400px"
42 class="mb-4 lg:mb-0"
43/>
44 33
45</section>34For example, for a Node.js project you might create a “Run” action that contains the following script:
46 35
47For example, for a Node.js project you might create a "Run" action that contains the following script:36```
48
49```bash
50npm start37npm start
51```38```
52 39