mirror of
https://github.com/Xevion/dotfiles.git
synced 2025-12-08 18:07:10 -06:00
- Add comprehensive CLAUDE.md with chezmoi best practices and AI assistant guidelines - Restructure TODO.md with prioritized tasks and detailed organization - Add PowerShell profile template for Windows platform support - Split git configs into identity-specific templates (ryan/xevion) - Convert nushell env.nu and gitconfig to templates for cross-platform rendering - Refactor chezmoi hooks to TypeScript (.init_pre.ts, .update_pre.ts) - Update .chezmoiignore with better platform-specific file handling - Remove deprecated shellchecker.sh and tasks.json from VS Code config - Add mise integration to shell configs (bash, zsh, nushell, PowerShell) - Clean up commonrc.sh.tmpl WSL-specific code - Disable Deno in VS Code settings, enable simple dialog mode - Add nushell extension recommendation to VS Code This commit establishes better cross-platform support (Windows/WSL/Linux), improves documentation for future maintenance, and standardizes configuration management patterns across the repository.
28 lines
678 B
TypeScript
Executable File
28 lines
678 B
TypeScript
Executable File
#!/usr/bin/env bun
|
|
console.log("init_pre.ts");
|
|
|
|
import { exists } from "node:fs/promises";
|
|
import { join } from "node:path";
|
|
import { homedir } from "node:os";
|
|
import { $ } from "bun";
|
|
|
|
const filePath = join(homedir(), "key.txt");
|
|
|
|
if (await exists(filePath)) {
|
|
console.log("key.txt already exists");
|
|
process.exit(0);
|
|
}
|
|
|
|
// Acquire the secret from Doppler
|
|
const result = await $`doppler secrets get KEY_TXT --plain`.quiet();
|
|
|
|
// Check if the command was successful
|
|
if (result.exitCode !== 0) {
|
|
console.error("Failed to get secret KEY_TXT");
|
|
process.exit(1);
|
|
}
|
|
|
|
// Write the secret to a file
|
|
await Bun.write(filePath, result.stdout);
|
|
console.log("key.txt bootstrapped");
|