Skip to content
40 changes: 37 additions & 3 deletions docs/getting-started/clients/cli/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,43 @@ npm run build:oss:watch

</Community>

By default, this will use the official Bitwarden servers. You can target your local server by using
the [config command](https://bitwarden.com/help/article/cli/#config). You may need to
[configure node to use your self-signed certificate](https://bitwarden.com/help/article/cli/#using-self-signed-certificates).
By default, this will use the official Bitwarden servers. If you need to develop with Server running
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๐ŸŽจ SUGGESTED: Clarify section reference

Consider making this reference more explicit:

Suggested change
By default, this will use the official Bitwarden servers. If you need to develop with Server running
By default, this will use the official Bitwarden servers. If you need to develop with Server running locally, see [Environment setup](#environment-setup) below.

This makes it easier to understand that "Environment setup" is a specific section heading.

locally, follow the instructions below in Environment setup.

## Environment setup

### Configure Node to trust development certificates
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๐ŸŽจ SUGGESTED: Add context about environment variables

Consider adding a brief note about when and where to set these environment variables. Currently, it's not clear:

  • Whether these should be set before building or before running
  • Whether they need to be persistent (e.g., added to shell profile) or just for the current session
  • Which terminal session they apply to

Example addition:

### Configure Node to trust development certificates

Set one of the following environment variables in your shell before running the CLI to connect to a local server with self-signed certificates:

This would help developers understand the timing and scope of these configuration steps.


A quick way to do this is to give Node access to your system certificates:

```bash
export NODE_USE_SYSTEM_CA=1
```

Alternatively, you can add the certificate directly to Node:

```bash
export NODE_EXTRA_CA_CERTS=/path/to/your-certificate.pem
```
Comment on lines +60 to +72
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๐ŸŽจ SUGGESTED: Consider reformatting to use numbered instructions for consistency with the project style guide

The project style guide specifies: "Use numbered paragraphs for instructions/procedures, starting with action-oriented verbs."

Consider changing from the current descriptive format to numbered steps:

### Configure Node to trust development certificates

1. Set Node to use your system certificates:

   ```bash
   export NODE_USE_SYSTEM_CA=1

Alternatively, add the certificate directly to Node:

export NODE_EXTRA_CA_CERTS=/path/to/your-certificate.pem

This would match the pattern used throughout the documentation (e.g., in the [Server Setup Guide](../../server/guide.md)).


### Target local Server instance

If you are running the Bitwarden Web application locally, you only need to set the base server
location. The web application proxies API requests to your local Server APIs.

Run the following when you have Web running locally:

```bash
node build/bw.js config server https://localhost:8080
```

Otherwise, you need to set the individual Server API locations as follows:

```bash
node build/bw.js config server \
--api http://localhost:4000 \
--identity http://localhost:33656
```

## Testing and Debugging

Expand Down
2 changes: 1 addition & 1 deletion docs/getting-started/server/database/ef/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ chronological order.

### Requirements

- A working local development server
- A working local development server ([see steps](../../guide.md))
- Docker
- A way to manage user secrets in the server project - see
[User Secrets](../../../../contributing/user-secrets.md)
Expand Down