Skip to main content
Glama
paths.ts483 B
import path from 'path'; import * as os from "node:os"; /** * Normalizes a path to a consistent format */ export function normalizePath(p: string): string { return path.normalize(p).toLowerCase(); } /** * Expands the tilde (~) in a filepath to the user's home directory */ export function expandHome(filepath: string): string { if (filepath.startsWith('~/') || filepath === '~') { return path.join(os.homedir(), filepath.slice(1)); } return filepath; }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/lamemind/coder-toolbox-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server