Skip to main content
Glama
nrwl

Nx MCP Server

Official
by nrwl
get-nx-execution-command.ts744 B
import { platform } from 'os'; import { getPackageManagerCommand } from './local-nx-utils/package-manager-command'; /** * see `getShellExecutionForConfig` for a vscode-specific implementation of this */ export async function getNxExecutionCommand(config: { cwd: string; displayCommand: string; encapsulatedNx: boolean; }): Promise<string> { let command = config.displayCommand; if (config.encapsulatedNx) { if (platform() == 'win32') { command = command.replace(/^nx/, './nx.bat'); } else { command = command.replace(/^nx/, './nx'); } } else { const packageManagerCommand = await getPackageManagerCommand(config.cwd); command = `${packageManagerCommand.exec} ${command}`; } return command; }

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/nrwl/nx-console'

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