Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.
TypeScript
/**
* The row's `entrypoint` field: the variable as the CLI or its host set it
* when spelled like one (a short lowercase token), else `other`.
*
* @param variable CLAUDE_CODE_ENTRYPOINT as read; undefined stays so
* @returns the field, or undefined
*/
export function entrypointOf(variable: string | undefined) {
const isSpelled =
variable === undefined || /^[a-z][a-z0-9_-]{0,39}$/.test(variable)
return isSpelled ? variable : 'other'
}