https://github.com/lukesthl/bitwarden-env-sync
A CLI tool to sync environment files with Bitwarden secure notes.
https://github.com/lukesthl/bitwarden-env-sync
bitwarden bun cli environment
Last synced: about 2 months ago
JSON representation
A CLI tool to sync environment files with Bitwarden secure notes.
- Host: GitHub
- URL: https://github.com/lukesthl/bitwarden-env-sync
- Owner: lukesthl
- License: mit
- Created: 2024-12-24T10:44:38.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-20T12:59:57.000Z (over 1 year ago)
- Last Synced: 2025-06-12T02:59:19.477Z (about 1 year ago)
- Topics: bitwarden, bun, cli, environment
- Language: TypeScript
- Homepage:
- Size: 28.4 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# bitwarden-env-sync
A CLI tool to sync environment files with Bitwarden secure notes.
## Installation & Usage
### Option 1: Run from source
1. Install dependencies:
```bash
bun install
```
2. Run the CLI:
```bash
bun run src/index.ts
```
### Option 2: Use pre-built binary
1. Download the latest `bw-env-sync` binary from the [Releases](https://github.com/lukesthl/bitwarden-env-sync/releases) page
2. Make it executable:
```bash
chmod +x bw-env-sync
```
3. Run the CLI:
```bash
./bw-env-sync
```
## Configuration
### Self-hosted Bitwarden Server
If you're using a self-hosted Bitwarden server, you need to configure the server URL before using the CLI:
```bash
# Verify the configuration
bw config server https://your-bitwarden-server.com
```
## Features
- Syncs environment files to Bitwarden secure notes
- Supports glob patterns for finding env files
- Automatically updates existing entries or creates new ones
- Organization support via `-o` or `--organization` flag
- Compatible with self-hosted Bitwarden servers
## Usage Examples
1. Basic usage (will prompt for organization ID):
```bash
./bw-env-sync
```
2. Specify organization ID via flag:
```bash
./bw-env-sync --organization=YOUR_ORG_ID
```
The tool will:
1. Prompt for your Bitwarden password
2. Ask for a glob pattern to find env files (defaults to `**/.env*(!(.example))`)
3. Sync all matching files to your Bitwarden vault
## Development
This project uses [Bun](https://bun.sh) as its runtime. To build the binary:
```bash
bun run build
```