Skip to content

Commit 46ab7cf

Browse files
aster-voidclaude
andcommitted
Merge README and CLAUDE.md into single README, symlink CLAUDE.md and AGENTS.md
Both CLAUDE.md and AGENTS.md now point to README.md so that humans, Claude Code, and Codex all read the same document. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent c17fcc0 commit 46ab7cf

File tree

3 files changed

+55
-54
lines changed

3 files changed

+55
-54
lines changed

AGENTS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
README.md

CLAUDE.md

Lines changed: 0 additions & 53 deletions
This file was deleted.

CLAUDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
README.md

README.md

Lines changed: 53 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,15 @@
1-
# Discord Bots
1+
# Discord-bots
2+
3+
Discord (など) で定期実行などされるBotのmonorepo。
4+
5+
## Bot 一覧
6+
7+
- bots/auto-moderator: 運営タスクリマインド (毎日)
8+
- bots/gsc-report: Google の検索パフォーマンス通知 (毎週)
9+
- bots/asakatsu-bot: 朝活確認 (毎日)
10+
- bots/joji-bot: Youtube から RSS で最新動画取得 (毎日)
11+
12+
詳細は ./rollcron.yaml で。
213

314
## Bot を追加する
415

@@ -45,3 +56,44 @@ schedule の書き方:
4556
```
4657

4758
SOPS を使う場合は [docs/sops.md](docs/sops.md) を参照。
59+
60+
## 機密情報
61+
62+
### 配置・権限
63+
64+
sops を使う場合:
65+
66+
- SOPS ファイル: `bots/BOT/sops.env`
67+
- 暗号化ルール: `./.sops.yaml`
68+
69+
ローカル,デプロイ読み取りチェーン: `run.sh` -> `sops exec-env` -> `bots/BOT/sops.env` + (`.age-key` | `~/.config/sops/age/keys.txt`)
70+
71+
sops を使わない場合:
72+
73+
- ローカル読み取りチェーン: `run.sh` -> `bots/BOT/.env`
74+
- デプロイ読み取りチェーン: `rollcron.yaml` -> `~/run/discord-bots/BOT/env` (サーバーに `bots/BOT/.env` は存在しないので二重読みはない)
75+
76+
詳細は [docs/sops.md](docs/sops.md) を参照。
77+
78+
### 管理ルール
79+
80+
- `.env` を読まない。`sops -d` を実行しない。`.age-key` を読まない。サーバ上の機密ファイルを読まない。
81+
- もし確認する必要がある場合はコンテキストに入らないような仕組みでやる: `cat .env | cut -d= -f1` やハッシュ、 `wc`、コマンド直接実行など
82+
83+
## ファイル・インフラ配置 (.git 外)
84+
85+
### ローカルファイル配置
86+
87+
- `.age-key` - ローカル復号用
88+
89+
### coolify.utcode.net
90+
91+
- `/home/deploy/.config/sops/age/keys.txt` - デプロイ時復号用
92+
93+
## コマンド
94+
95+
```bash
96+
eval "$(direnv export bash)" && COMMAND
97+
sops exec-env path/to/sops.env 'echo success!' # sops 鍵検証
98+
ssh USER@coolify.utcode.net "sudo -u deploy bash -c 'COMMAND'" # デプロイ先で操作
99+
```

0 commit comments

Comments
 (0)