CLI
If you’re not familiar with the CLI client, the Bitwarden Help Center has lots of great documentation that will help you get oriented.
Requirements
Before you start, you must complete the Clients repository setup instructions.
Build instructions
We now recommend using Nx commands for building projects. For the cli:
# Build and watch (GPL)
npx nx serve cli --configuration=oss-dev
# Build and watch (Bitwarden)
npx nx serve cli --configuration=commercial-dev
For complete Nx documentation and all available commands, see Using Nx to Build Projects.
Build and run:
cd apps/cli
npm run build:oss:watch
By default, this will use the official Bitwarden servers. You can target your local server by using the config command. You may need to configure node to use your self-signed certificate.
Testing and Debugging
The build is located at build/bw.js
. You can run this with node, for example:
node build/bw.js login
It may be more convenient to make the file executable first:
cd build
chmod +x bw.js
./bw.js login
To debug the CLI client, run it from a Javascript Debug Terminal and place the breakpoints in your Typescript code.