Skip to content

docs: Doppler Personal Config セットアップガイドとテンプレートを追加 - #604

Merged
keito4 merged 2 commits into
mainfrom
feat/doppler-personal-config
Mar 21, 2026
Merged

docs: Doppler Personal Config セットアップガイドとテンプレートを追加#604
keito4 merged 2 commits into
mainfrom
feat/doppler-personal-config

Conversation

@keito4

@keito4 keito4 commented Mar 21, 2026

Copy link
Copy Markdown
Owner

Summary

Doppler を使ったシークレット管理の dev / dev_personal 構成を導入するためのガイドとテンプレートを追加。

追加ファイル

  • docs/doppler-setup-guide.md — 包括的なセットアップガイド

    • dev(チーム共通)+ dev_personal(個人差分)の構成説明
    • CLI インストール、ログイン、Personal Config 有効化手順
    • package.json scripts、DevContainer 統合、GitHub Actions 統合
    • 既存 1Password 管理からの移行手順
    • トラブルシューティング(DOPPLER_CONFIG 優先順位等)
  • templates/doppler.yaml — プロジェクト設定テンプレート

    • dev_personal をデフォルト config に設定
    • 各プロジェクトにコピーして project 名を変更するだけで使える

運用ルール

値の種類 配置先
チーム共通(DB URL、共通 API key) dev
個人差分(sandbox key、個人 DB 名) dev_personal
ステージング・本番 stg / prd(Service Token)

Test plan

  • ドキュメントの内容が正確であること
  • テンプレートの YAML 構文が正しいこと

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Added a comprehensive Doppler setup guide covering installation, onboarding, env/config structure, dev workflows, DevContainer and GitHub Actions integration, migration notes, operational rules, and troubleshooting.
    • Added a Doppler configuration template to streamline project initialization.
    • Added a command reference for automating Doppler setup/check steps.
    • Updated README directory listing to document these new assets.

- docs/doppler-setup-guide.md: dev / dev_personal 構成の運用ガイド
  - セットアップ手順、package.json scripts、DevContainer 統合
  - GitHub Actions 統合、1Password からの移行手順
  - トラブルシューティング(DOPPLER_CONFIG 優先順位等)
- templates/doppler.yaml: プロジェクト設定テンプレート
  - dev_personal をデフォルト config に設定

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Mar 21, 2026

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c5fbd14a-a56a-4bd8-a8d4-f224544ce558

📥 Commits

Reviewing files that changed from the base of the PR and between e8debd4 and 9c37e1f.

📒 Files selected for processing (2)
  • .claude/commands/setup-doppler.md
  • README.md

📝 Walkthrough

Walkthrough

Added documentation and repository assets to enable Doppler secret-management setup: a detailed setup guide, a CLI-driven setup command spec, and a default Doppler configuration template; README directory listings were updated to reference these new files.

Changes

Cohort / File(s) Summary
Doppler docs & command
README.md, docs/doppler-setup-guide.md, .claude/commands/setup-doppler.md
Added a comprehensive Doppler setup guide, README directory entries, and a command-spec describing CLI checks, project/config selection, --check mode, package.json script updates, .gitignore advice, DevContainer/Codespaces/GitHub Actions integration notes, troubleshooting, and verification steps.
Doppler template
templates/doppler.yaml
Added a default Doppler template with setup.project and setup.config (dev_personal) and comments describing config precedence and CLI/env override behavior.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~8 minutes

Possibly related PRs

Poem

🐰 I found a patch of docs so fine,

Doppler seeds in tidy line,
Templates snug in YAML beds,
Scripts and secrets safely fed,
Hopping off to test and shine!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main changes: adding a Doppler Personal Config setup guide and template file to the documentation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/doppler-personal-config

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@keito4

keito4 commented Mar 21, 2026

Copy link
Copy Markdown
Owner Author

🔍 AI Code Review (Local Hook)

Models: Codex (default) / Gemini (default)

🤖 Codex Review

指摘事項はありません。変更はドキュメントとテンプレート追加のみで、正確性・セキュリティ・保守性に影響する問題は見当たりません。

全体判定: patch is correct。ドキュメント/テンプレート追加のみで、動作への影響や不整合を確認できないため。信頼度 0.62


🤖 Generated by post_pr_ai_review.py hook

@keito4 keito4 self-assigned this Mar 21, 2026
@keito4

keito4 commented Mar 21, 2026

Copy link
Copy Markdown
Owner Author

🔍 AI Code Review (Local Hook)

Models: Codex (default) / Gemini (default)

🤖 Codex Review

以下は変更点に対するレビューです。

指摘事項

  1. doppler setup 実行時に「カレントディレクトリに .doppler.yaml が生成される」と記載されていますが、Doppler CLI の設定ファイルは既定で ~/.doppler/.doppler.yaml に作成されます。現状の記述だと開発者が誤った場所を探したり、不要な .doppler.yaml をリポジトリに作成・コミットしかねません。doppler.yaml は任意でリポジトリに置く別物である旨を明記すべきです。
    影響箇所: docs/doppler-setup-guide.md:57

判定
patch is incorrect — Doppler CLI の設定ファイルの生成場所に関する記述が誤っており、セットアップ手順として不正確です。信頼度 0.62


⚠️ 修正が必要です

上記のレビューで問題が指摘されています。修正してからマージしてください。


🤖 Generated by post_pr_ai_review.py hook

@claude

claude Bot commented Mar 21, 2026

Copy link
Copy Markdown
Contributor

PR レビュー

ドキュメントとテンプレート追加のみの変更ですが、いくつか指摘事項があります。


要修正: .doppler.yaml のファイル名誤記

docs/doppler-setup-guide.md 内で .doppler.yaml(ドットあり)と記述されている箇所が複数ありますが、Doppler CLI の doppler setup が生成するプロジェクト設定ファイルは doppler.yaml(ドットなし)です。

  • .doppler.yaml はグローバル設定(~/.doppler/ 配下)
  • doppler.yaml がリポジトリに置くプロジェクト設定

この誤記があると、開発者が間違ったファイル名を期待して設定が読まれない原因に気づけないトラブルが発生しえます。


改善提案

|| true のサイレント失敗(L113付近)

DOPPLER_TOKEN が未設定の場合にサイレントで失敗し、開発者が気づかないまま作業を開始するリスクがあります。以下のようにワーニングを出す形を推奨します:
postStartCommand: "doppler setup --no-interactive || echo '[Warning] Doppler setup skipped. DOPPLER_TOKEN が設定されているか確認してください。'"

GitHub Actions のアクションバージョン(L130付近)

uses: dopplerhq/secrets-fetch-action@v2 はメジャーバージョンタグで可変参照のため、予期しない更新でワークフローが壊れる可能性があります。SHA ピン推奨の注記を添えると親切です。

templates/doppler.yaml — dev_personal が未作成の場合のフォールバック説明

config: dev_personal を使う前に Personal Config を作成する必要がありますが、未作成のまま doppler run を実行するとエラーになります。テンプレートのコメントに「Personal Config が未作成の場合は config: dev に変更して doppler setup を再実行すること」などのフォールバック手順を追記することを提案します。


問題なし

  • ドキュメント内に実際のトークン値は含まれず、dp.pt.xxxxx 形式のプレースホルダーのみ使用
  • DOPPLER_TOKEN を containerEnv 経由で渡すパターンは公式推奨で適切
  • ドキュメント全体の構造・読みやすさは良好

マージ前に .doppler.yaml から doppler.yaml への誤記修正をお願いします。 その他は提案レベルです。

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🧹 Nitpick comments (1)
docs/doppler-setup-guide.md (1)

1-202: Consider adding a status indicator for integration examples.

This guide provides valuable documentation for Doppler setup patterns. However, to avoid confusion, consider adding a status indicator (e.g., "✅ Implemented", "📋 Pattern for adoption", "🚧 Planned") to each integration section to clarify which patterns are currently applied to this repository versus examples for projects adopting Doppler.

This would help readers distinguish between:

  • Patterns ready to use in this repository
  • Examples for other projects to follow
  • Planned future enhancements
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/doppler-setup-guide.md` around lines 1 - 202, Add a one-line status
indicator (e.g., "✅ Implemented", "📋 Pattern for adoption", "🚧 Planned") at
the top of each integration section such as the "DevContainer での統合" block, the
"GitHub Actions での統合" block, the "package.json の推奨 scripts" examples, and the
"doppler.yaml テンプレート" snippet to clarify what's already used in this repo vs.
examples; update the three code/example blocks (the
.devcontainer/devcontainer.json snippet, the GitHub Actions yaml snippet, and
the package.json scripts snippet) by prepending a short status line and ensure
the chosen status matches the repository's current usage (e.g., mark
DevContainer integration as ✅ if present, GitHub Actions as ✅/📋 as
appropriate), leaving the rest of the content unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/doppler-setup-guide.md`:
- Around line 182-194: The docs describe migrating to Doppler but the
credentials framework (script/credentials.sh) only supports the `op` provider;
either implement a Doppler provider or update the docs to avoid implying
integration. To implement: add a new provider script at
script/credentials/providers/doppler.sh that implements the
credential_provider::inject interface used by script/credentials.sh, register
the provider name so the pluggable loader recognizes `doppler`, and implement
the necessary operations referenced by the guide (import into `dev`, move
personal diffs, place doppler.yaml, and CI token handling). Alternatively,
update the migration section to explicitly state migration is manual or a future
enhancement if you don’t want to add the provider now.
- Around line 104-121: The docs claim a DevContainer integration using
containerEnv DOPPLER_TOKEN and a postStartCommand "doppler setup
--no-interactive || true" but the repository's .devcontainer/devcontainer.json
only defines CLAUDE_ENV_FILE and CLAUDE_CODE_DISABLE_1M_CONTEXT; update the repo
or the docs to match: either add the containerEnv entry ("DOPPLER_TOKEN":
"${localEnv:DOPPLER_TOKEN}") and the postStartCommand to
.devcontainer/devcontainer.json so the documented pattern is implemented, or
change the docs text to clearly state this is an example pattern (not applied
here) and remove or annotate the JSON snippet to avoid implying it exists in
this repository; reference DOPPLER_TOKEN, containerEnv, postStartCommand and the
command doppler setup to locate the relevant code and docs to change.
- Around line 8-14: Add a language identifier to the fenced code block that
starts with "Doppler Project: my-app" by changing the opening ``` to ```text so
the block is typed (e.g., ```text) and the markdown linter stops flagging it; do
not alter the block content otherwise.

---

Nitpick comments:
In `@docs/doppler-setup-guide.md`:
- Around line 1-202: Add a one-line status indicator (e.g., "✅ Implemented", "📋
Pattern for adoption", "🚧 Planned") at the top of each integration section such
as the "DevContainer での統合" block, the "GitHub Actions での統合" block, the
"package.json の推奨 scripts" examples, and the "doppler.yaml テンプレート" snippet to
clarify what's already used in this repo vs. examples; update the three
code/example blocks (the .devcontainer/devcontainer.json snippet, the GitHub
Actions yaml snippet, and the package.json scripts snippet) by prepending a
short status line and ensure the chosen status matches the repository's current
usage (e.g., mark DevContainer integration as ✅ if present, GitHub Actions as
✅/📋 as appropriate), leaving the rest of the content unchanged.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 80089c52-2040-4d2e-9ef6-b29a0425adee

📥 Commits

Reviewing files that changed from the base of the PR and between 1c34e03 and e8debd4.

📒 Files selected for processing (3)
  • README.md
  • docs/doppler-setup-guide.md
  • templates/doppler.yaml

Comment on lines +8 to +14
```
Doppler Project: my-app
├── dev # チーム共通の開発用シークレット
├── dev_personal # 各開発者の個人差分(Personal Config)
├── stg # ステージング(CI/CD token で取得)
└── prd # 本番(CI/CD token で取得)
```

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Fix the fenced code block language identifier.

The fenced code block is missing a language identifier, which violates markdown linting rules.

📝 Proposed fix
-```
+```text
 Doppler Project: my-app
 ├── dev              # チーム共通の開発用シークレット
 ├── dev_personal     # 各開発者の個人差分(Personal Config)
 ├── stg              # ステージング(CI/CD token で取得)
 └── prd              # 本番(Service Token で取得)

</details>

As per coding guidelines, "Fail on code formatting violations during code review" for `**/*.md` files.

<details>
<summary>🧰 Tools</summary>

<details>
<summary>🪛 markdownlint-cli2 (0.21.0)</summary>

[warning] 8-8: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

</details>

</details>

<details>
<summary>🤖 Prompt for AI Agents</summary>

Verify each finding against the current code and only fix it if needed.

In @docs/doppler-setup-guide.md around lines 8 - 14, Add a language identifier
to the fenced code block that starts with "Doppler Project: my-app" by changing
the opening totext so the block is typed (e.g., ```text) and the
markdown linter stops flagging it; do not alter the block content otherwise.


</details>

<!-- fingerprinting:phantom:triton:puma -->

<!-- This is an auto-generated comment by CodeRabbit -->

Comment on lines +104 to +121
## DevContainer での統合

### containerEnv で Doppler を使う

`.devcontainer/devcontainer.json`:

```json
{
"containerEnv": {
"DOPPLER_TOKEN": "${localEnv:DOPPLER_TOKEN}"
},
"postStartCommand": "doppler setup --no-interactive || true"
}
```

> `DOPPLER_TOKEN` はホストマシンの環境変数から注入。
> Service Token(`dp.st.*`)または Personal Token(`dp.pt.*`)を設定する。

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Documentation describes unimplemented DevContainer integration.

The guide documents DOPPLER_TOKEN in containerEnv and postStartCommand, but the actual .devcontainer/devcontainer.json (lines 34-37) only contains CLAUDE_ENV_FILE and CLAUDE_CODE_DISABLE_1M_CONTEXT. The Doppler integration pattern shown here hasn't been applied to the repository's DevContainer configuration.

This creates a gap where developers following the guide will find that the described integration doesn't match the actual implementation.

Recommendation: Either:

  1. Apply the Doppler integration to the actual devcontainer.json, or
  2. Clarify that this section describes a pattern for projects adopting Doppler, not the current state of this repository
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/doppler-setup-guide.md` around lines 104 - 121, The docs claim a
DevContainer integration using containerEnv DOPPLER_TOKEN and a postStartCommand
"doppler setup --no-interactive || true" but the repository's
.devcontainer/devcontainer.json only defines CLAUDE_ENV_FILE and
CLAUDE_CODE_DISABLE_1M_CONTEXT; update the repo or the docs to match: either add
the containerEnv entry ("DOPPLER_TOKEN": "${localEnv:DOPPLER_TOKEN}") and the
postStartCommand to .devcontainer/devcontainer.json so the documented pattern is
implemented, or change the docs text to clearly state this is an example pattern
(not applied here) and remove or annotate the JSON snippet to avoid implying it
exists in this repository; reference DOPPLER_TOKEN, containerEnv,
postStartCommand and the command doppler setup to locate the relevant code and
docs to change.

Comment on lines +182 to +194
## 既存の 1Password 管理からの移行

このリポジトリでは `script/setup-env.sh` + 1Password CLI でシークレットを管理しているが、
プロジェクトごとに Doppler に移行する場合の手順:

1. 1Password のシークレットを Doppler の `dev` config にインポート
2. 個人差分を `dev_personal` に移動
3. `doppler.yaml` をプロジェクトルートに配置
4. `package.json` に `dev:doppler` スクリプトを追加
5. CI/CD の `secrets` を Doppler の Service Token に置き換え

> 1Password と Doppler は併用可能。1Password は長期保管の認証情報、
> Doppler はアプリケーション実行時のシークレット注入という使い分けが有効。

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Migration steps lack implementation support in the credential infrastructure.

The guide describes migrating from 1Password to Doppler (lines 184-191), but the current script/credentials.sh framework has no Doppler provider plugin implemented. The pluggable provider system (see script/credentials.sh:1-122) only supports 1Password via the op provider.

To actually enable the migration workflow described here, a Doppler provider plugin would need to be added to script/credentials/providers/doppler.sh implementing the credential_provider::inject interface.

Recommendation: Either:

  1. Implement a Doppler provider plugin for credentials.sh to support the migration workflow, or
  2. Clarify that migration is a manual process outside the existing credential management framework, or
  3. Document this as a future enhancement and note that the current repository still uses 1Password exclusively
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/doppler-setup-guide.md` around lines 182 - 194, The docs describe
migrating to Doppler but the credentials framework (script/credentials.sh) only
supports the `op` provider; either implement a Doppler provider or update the
docs to avoid implying integration. To implement: add a new provider script at
script/credentials/providers/doppler.sh that implements the
credential_provider::inject interface used by script/credentials.sh, register
the provider name so the pluggable loader recognizes `doppler`, and implement
the necessary operations referenced by the guide (import into `dev`, move
personal diffs, place doppler.yaml, and CI token handling). Alternatively,
update the migration section to explicitly state migration is manual or a future
enhancement if you don’t want to add the provider now.

Doppler シークレット管理の対話的セットアップコマンド:

- doppler.yaml の作成・更新(プロジェクト名は対話的に指定)
- package.json に dev:doppler スクリプトを追加
- .gitignore に .doppler.yaml を追加
- DevContainer / Codespaces への DOPPLER_TOKEN 統合提案
- GitHub Actions 統合の手順提示
- --check モードで現在の設定状況を確認

使い方:
  /setup-doppler
  /setup-doppler --project my-app
  /setup-doppler --check

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@keito4
keito4 merged commit a3d9cf6 into main Mar 21, 2026
3 of 4 checks passed
@keito4
keito4 deleted the feat/doppler-personal-config branch March 21, 2026 04:17
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 1.101.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@github-actions github-actions Bot added the released リリース済み label Mar 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released リリース済み

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant