MCPcopy
hub / github.com/claude-code-best/claude-code / isDevMode

Function isDevMode

src/utils/desktopDeepLink.ts:13–28  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

11const MIN_DESKTOP_VERSION = '1.1.2396'
12
13function isDevMode(): boolean {
14 if ((process.env.NODE_ENV as string) === 'development') {
15 return true
16 }
17
18 // Local builds from build directories are dev mode even with NODE_ENV=production
19 const pathsToCheck = [process.argv[1] || '', process.execPath || '']
20 const buildDirs = [
21 '/build-ant/',
22 '/build-ant-native/',
23 '/build-external/',
24 '/build-external-native/',
25 ]
26
27 return pathsToCheck.some(p => buildDirs.some(dir => p.includes(dir)))
28}
29
30/**
31 * Builds a deep link URL for Claude Desktop to resume a CLI session.

Callers 3

buildDesktopDeepLinkFunction · 0.85
isDesktopInstalledFunction · 0.85
openDeepLinkFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected