Claude Execution Runner (execution/runner.ts)

CodeMachine-CLI · infra, Infra / DevOps, claude, execution, telemetry, process, cli

Spawns Claude process, builds command, reads session telemetry, and formats output markers for CLI execution.

// Source: https://github.com/mperkins0155/CodeMachine-CLI | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
import * as path from 'node:path';
import { homedir } from 'node:os';
import { readFileSync, existsSync } from 'node:fs';

import { spawnProcess } from '../../../../process/spawn.js';
import { buildClaudeExecCommand } from './commands.js';
import { metadata } from '../metadata.js';
import { expandHomeDir } from '../../../../../shared/utils/index.js';
import { ENV } from '../config.js';
import { debug } from '../../../../../shared/logging/logger.js';
import type { ParsedTelemetry } from '../../../core/types.js';
import {
  formatThinking,
  formatCommand,
  formatResult,
  for

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search 40K more like it.

Get a free API key