Dashboard › cli › Distillation
ad05551f-66d0-47f8-9a34-06325802b2de["lore_tm_v1_4wGRUGM_94YlukpyTR4w6e78Nf6x6fo8CRxrlV8vncs","lore_tm_v1_emD395w_JvhtekvBO2Zv_WRRPlhZCi2EwMkifyWeIJ0"]
/home/byk/Code/getsentry/cli-pr-1558/packages/cli/script/generate-skill.ts, extractCodeBlocks(markdown: string, language?: string) at lines 183-199 clones CODE_BLOCK_REGEX, iterates over all matches, trims each block’s code, defaults a missing language to "", optionally filters by exact language equality, and returns { code, lang }[]./home/byk/Code/getsentry/cli-pr-1558/packages/cli/script/generate-skill.ts, escapeRegex(str: string) at lines 202-204 escapes regex metacharacters with str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")./home/byk/Code/getsentry/cli-pr-1558/packages/cli/script/generate-skill.ts, loadDoc(relativePath: string) at lines 211-222 checks ${DOCS_PATH}/${relativePath} with access(), returns null when absent, otherwise reads UTF-8 content and returns stripMdxComponents(stripFrontmatter(content))./home/byk/Code/getsentry/cli-pr-1558/packages/cli/script/generate-skill.ts, extractPackageManagerCommand(rawContent: string) at lines 225-228 matches PACKAGE_MANAGER_REGEX and returns capture group match[1], or null when unmatched./home/byk/Code/getsentry/cli-pr-1558/packages/cli/script/generate-skill.ts, generateInstallSection(installSection: string, rawContent: string) at lines 231-255 emits ### Installation, extracts bash blocks with extractCodeBlocks(installSection, "bash"), and gets an npm command via extractPackageManagerCommand(rawContent). When either exists, it combines them into one fenced bash block; if both exist, it inserts a blank line and # Or install via npm/pnpm/bun before the npm command./home/byk/Code/getsentry/cli-pr-1558/packages/cli/script/generate-skill.ts, generateAuthSection(authSection: string) at lines 258-271 emits ### Authentication and, when available, combines all bash blocks extracted from the section into one fenced bash block./home/byk/Code/getsentry/cli-pr-1558/packages/cli/script/generate-skill.ts, loadPrerequisites() at lines 274-300 loads ${DOCS_PATH}/getting-started.mdx; if absent, it returns getDefaultPrerequisites(). If present, it strips frontmatter and MDX components, emits ## Prerequisites plus The CLI must be installed and authenticated before use., generates installation content from the Install Script section and raw content, and generates authentication content from the Authentication section./home/byk/Code/getsentry/cli-pr-1558/packages/cli/script/generate-skill.ts, getDefaultPrerequisites() at lines 303-329 provides fallback commands: install script curl https://cli.sentry.dev/install -fsS | bash; package-manager install npm install -g sentry; recommended OAuth login sentry auth; API-token login sentry auth --token YOUR_SENTRY_API_TOKEN; and auth-status check sentry auth status./home/byk/Code/getsentry/cli-pr-1558/packages/cli/script/generate-skill.ts found 3 relevant matches: formatCommandExamples imported at line 28, generateFullCommandDoc(cmd: CommandInfo): string declared at line 566, and const examples = formatCommandExamples(cmd.examples); at line 598.