---
title: Environments CLI reference
description: Manage Honeybadger project environments from the command line.
url: https://docs.honeybadger.io/resources/cli/environments/
---

The `environments` command lets you manage environments for your projects.

All environments commands require `--project-id`.

## List environments

```shell
hb environments list --project-id 12345
```

**Required flags:**

* `--project-id` — Project ID

**Optional flags:**

* `-o, --output` — Output format: `table` or `json` (default: `table`)

## Get environment details

```shell
hb environments get --project-id 12345 --id 67890
```

**Required flags:**

* `--project-id` — Project ID
* `--id` — Environment ID

**Optional flags:**

* `-o, --output` — Output format: `text` or `json` (default: `text`)

## Create an environment

```shell
hb environments create --project-id 12345 --cli-input-json '{
  "name": "staging",
  "notifications": true
}'
```

**Required flags:**

* `--project-id` — Project ID
* `--cli-input-json` — JSON payload (inline string or `file://path`)

**JSON fields:**

* `name` — Environment name
* `notifications` — Whether to send notifications for this environment

**Optional flags:**

* `-o, --output` — Output format: `text` or `json` (default: `text`)

## Update an environment

```shell
hb environments update --project-id 12345 --id 67890 --cli-input-json '{"notifications": false}'
```

**Required flags:**

* `--project-id` — Project ID
* `--id` — Environment ID
* `--cli-input-json` — JSON payload with fields to update

**Optional flags:**

* `-o, --output` — Output format: `text` or `json` (default: `text`)

## Delete an environment

```shell
hb environments delete --project-id 12345 --id 67890
```

**Required flags:**

* `--project-id` — Project ID
* `--id` — Environment ID

---

## Try Honeybadger for FREE

Intelligent logging, error tracking, and Just Enough APM™ in one dev-friendly platform. Find and fix problems before users notice.

[Start free trial](https://app.honeybadger.io/users/sign_up)

[See plans and pricing](https://www.honeybadger.io/plans/)
