File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # Repository Guidelines
2+
3+ Docker image wrapper around the official Bitwarden CLI, with Renovate-tracked
4+ upstream version bumps and GHCR publishing on ` main ` .
5+
6+ ## Quick Reference
7+
8+ - ` docker build -t bitwarden-cli-docker:local . ` : local image build
9+ - ` shellcheck entrypoint.sh ` : shell lint
10+ - ` actionlint .github/workflows/build.yml ` : workflow lint
11+ - ` docker run --rm -v "$PWD:/usr/src/app" -w /usr/src/app \ `
12+ ` renovate/renovate:latest renovate-config-validator ` : validate Renovate
13+ config
14+
15+ ## Detailed Instructions
16+
17+ - [ Architecture & Layout] ( agent-instructions/architecture.md )
18+ - [ Runtime Behavior] ( agent-instructions/runtime.md )
19+ - [ Testing & Verification] ( agent-instructions/testing.md )
20+ - [ Release Workflow] ( agent-instructions/release-workflow.md )
Original file line number Diff line number Diff line change 1+ # Architecture & Layout
2+
3+ ## Overview
4+
5+ Use this file when deciding where image, runtime, or automation changes belong.
6+
7+ ## Project Structure
8+
9+ - ` Dockerfile ` : tracked Bitwarden CLI version and image build logic
10+ - ` entrypoint.sh ` : runtime wrapper for passthrough CLI mode and ` bw serve `
11+ - ` .github/workflows/build.yml ` : PR build plus ` main ` publish flow
12+ - ` renovate.json ` : upstream version-tracking rules for ` BW_VERSION `
13+ - ` README.md ` : operator-facing usage and runtime guidance
14+
15+ ## Placement Rules
16+
17+ - Put Bitwarden CLI version tracking in ` Dockerfile `
18+ - Keep runtime behavior in ` entrypoint.sh `
19+ - Keep publish automation in GitHub Actions, not ad hoc shell scripts
20+ - Document operator-facing changes in ` README.md `
Original file line number Diff line number Diff line change 1+ # Release Workflow
2+
3+ ## Overview
4+
5+ Use this file when changing upstream version tracking or publish automation.
6+
7+ ## Rules
8+
9+ - ` BW_VERSION ` in ` Dockerfile ` is the single tracked source of the bundled CLI
10+ version
11+ - Renovate is responsible for proposing upstream Bitwarden CLI bumps
12+ - Pull requests should build the image without publishing
13+ - Pushes to ` main ` publish the image tag that matches ` BW_VERSION `
14+
15+ ## Avoid
16+
17+ - Do not reintroduce keepalive commits or cron-driven "stay active" workflows
18+ - Do not add out-of-repo state such as S3 revision markers for version tracking
19+ - Do not bypass the tracked ` BW_VERSION ` by auto-resolving latest tags inside
20+ the workflow
Original file line number Diff line number Diff line change 1+ # Runtime Behavior
2+
3+ ## Overview
4+
5+ Use this file when changing container startup behavior or ` /bw ` state handling.
6+
7+ ## Entrypoint Rules
8+
9+ - Passing explicit arguments should remain a direct passthrough to ` bw `
10+ - No-argument startup is the managed ` bw serve ` path
11+ - ` bw serve ` mode requires ` BW_HOST ` and either API-key or user/password login
12+ - Keep runtime behavior non-root with ` HOME=/bw `
13+
14+ ## State Handling
15+
16+ - Persisted ` /bw ` is acceptable for interactive CLI use
17+ - Long-lived ` bw serve ` automation is safer with a clean or ephemeral ` /bw `
18+ across upgrades
19+ - Do not add runtime logging that exposes secrets or session material
Original file line number Diff line number Diff line change 1+ # Testing & Verification
2+
3+ ## Overview
4+
5+ Use this file when validating changes in this repository.
6+
7+ ## Commands
8+
9+ - ` docker build -t bitwarden-cli-docker:local . `
10+ - ` shellcheck entrypoint.sh `
11+ - ` actionlint .github/workflows/build.yml `
12+ - ` docker run --rm -v "$PWD:/usr/src/app" -w /usr/src/app \ `
13+ ` renovate/renovate:latest renovate-config-validator `
14+
15+ ## Expectations
16+
17+ - Validate both image buildability and workflow syntax for automation changes
18+ - Keep verification focused on the tracked release flow and runtime wrapper
19+ - Prefer operator-facing README updates when runtime expectations change
You can’t perform that action at this time.
0 commit comments