Generates secure POSIX shell commands for loopback API requests. Use to safely communicate with local agent hooks or services without exposing tokens in process arguments.
// Source: https://github.com/generalaction/emdash | License: Apache-2.0 | Copyright 2026 General Action, Inc // Provided via justclaw.it.com; keep this notice with the code. /** * Which curl a loopback command's POSIX shell runs: a POSIX curl, or the native Windows * curl that Git for Windows' MSYS sh starts. */ export type LoopbackCurlPlatform = 'posix' | 'windows'; /** * A POSIX shell command that runs `curl <args>` against an Emdash loopback endpoint, * such as the Git credential helper's or the agent hooks', authenticated by the nonce in * the environment variable `nonceVar`. * * - The `X-Emdash-Token` header never enters a process's argv, which other local users * can read (`/proc/<pid>/cmdline`): the `printf` builtin writes it into curl's config * on fd 3, and curl's ... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key