# Bootstrap a project

Most commands are _app-scoped:_ they target one app, and accept an `--app-id` flag or the `STREAM_API_KEY` and `STREAM_API_SECRET` environment variables.

For convenience, you can also turn your app's directory into a _project._ The project is linked to an app in your account, and every command run inside the project, subdirectories included, targets this app. You can recognize a project by the `.stream` directory in its root.

## Initialize a project

In your app's root directory, run:

```sh
getstream init
```

Don't have a Stream account? You can sign up in the browser, or choose a guest account that needs no email and can be used by an agent. When you want to keep your work, you can always [upgrade to a real account](https://getstream.io/cli/docs/commands/login/).

In CI or any other headless environment, set `STREAM_API_KEY` and `STREAM_API_SECRET` from your secret store instead, and every app-scoped command runs without a login or a project.

>
> **Warning:** This command creates the `.stream` directory that holds the app's secret and adds it to `.gitignore`. Don't commit it.
>

Check whether you're inside a project at any time:

```sh
getstream status
```

Opens the app's page in the Stream Dashboard in your browser:

```sh
getstream open
```

Re-running `getstream init` inside a project re-links it to another app. To unlink a project, remove the `.stream` directory.

When working with an agent, just ask:

- Set up Stream in this project and link it to my app acme-chat.
- Create a temporary Stream app for this project so I can try things out.

## Install agent skills

The [Stream Agent Skills](https://getstream.io/agent-skills/docs/) teach an AI agent to work with Stream and the CLI. After initializing a project, `getstream init` prompts you to install the skills. We recommend you install them into each project the agent works in.

You can install the skills at any time:

```sh
getstream skills
```

The skills are downloaded into a global cache and linked into the project root, or into the working directory when you're not inside a project. You may need to restart your agent for the newly installed skills to load.

For building on a specific platform, Stream provides a skill for each SDK. Your agent installs it when it needs it. You can also install one manually:

```sh
getstream skills stream-react
```

All skills are available on [GetStream/agent-skills](https://github.com/GetStream/agent-skills/tree/main/skills). You can also install them from [skills.sh](https://www.skills.sh/getstream/agent-skills/stream).

When working with an agent, just ask:

- Install the Stream skills in this project.
- Add the Stream skill for React Native.

## Add the API key to your app

Your code needs the app's API key to connect. A backend app may also need the secret. To write the keys into the env file your platform expects:

```sh
getstream env
```

Like every app-scoped command, `env` acts on the current project's app unless `--app-id` or the `STREAM_API_KEY` and `STREAM_API_SECRET` environment variables override it.

The CLI makes a best effort to pick the file format suitable for your platform, or you can ask for a specific format. The env file is added to `.gitignore`.

When working with an agent, just ask:

- Put my Stream API key into this project's env file.

---

For the most recent version of this documentation, visit [https://getstream.io/cli/docs/bootstrap/](https://getstream.io/cli/docs/bootstrap/).