各ターンの所要時間とトークン消費をトーストで表示する

個人用のdotfiles設定リポジトリです。 パッケージ管理と Homebrew 管理は別の nix-config リポジトリで行い、このリポジトリは主にシェルやアプリ設定を管理します。
git clone https://github.com/yourusername/dotfiles.git ~/dotfiles
cd ~/dotfiles
cd ~/nix-config
darwin-rebuild switch --flake .#<nix-configで定義したホスト名>
./install.sh
既存の設定ファイルは~/backupディレクトリにバックアップされます。
install.sh: dotfilesのシンボリックリンク作成スクリプトMANUAL_APPS.md: 手動インストールが必要なアプリケーション一覧.config/: 各種アプリケーションの設定ファイル.zshrc: Zshシェルの設定.gitconfig: Git設定.tmux.conf: tmux設定.claude/: Claude Code の設定.codex/: Codex の設定hooks/index.ts 16 lines1import type { Register } from "claude-code";
2
3export const register: Register = (on) => {
4 on("turn.complete", ($, e, next) => {
5 // サブエージェントのターンと中断は通知しない (メインループの完了だけ知りたい)
6 if (!e.agentId && !e.isAborted) {
7 const sec = (e.durationMs / 1000).toFixed(1);
8 const tok = e.usage
9 ? ` · ${(e.usage.input_tokens + e.usage.output_tokens).toLocaleString()} tok`
10 : "";
11 $.ui.toast(`⏱ ${sec}s${tok}`, { timeoutMs: 10000 });
12 }
13 return next(e);
14 });
15};
16