Node.js utilities for resolving configuration directories for Codex, Claude Code, and VSCode across platforms.
// Source: https://github.com/kitfunso/hippo-memory | License: MIT | Copyright 2026 Keith So
// Provided via justclaw.it.com; keep this notice with the code.
// Where the agent tools keep their config and data, shared by the hook installers and the agent-memory readers.
import * as os from 'os';
import * as path from 'path';
import { envHomeDir, processEnv } from './env.js';
type Env = Readonly<Record<string, string | undefined>>;
const VSCODE_PRODUCTS = ['Code', 'Code - Insiders'] as const;
export function homeDir(): string {
return envHomeDir() || os.homedir();
}
/** Codex's config folder: $CODEX_HOME, else ~/.codex, as the Codex hooks docs describe. */
export function codexHomeDir(home: string = homeDir(), env: Env = processEnv()): string {
return env.CODEX_HOME || path.join(ho
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key