feat: add CodeX support (#44)

Co-authored-by: Viet Tran <viettranx@gmail.com>
This commit is contained in:
Alliot
2026-01-07 10:31:42 +08:00
committed by GitHub
parent 6546f345be
commit d247b18188
7 changed files with 430 additions and 4 deletions

View File

@@ -1,4 +1,4 @@
export type AIType = 'claude' | 'cursor' | 'windsurf' | 'antigravity' | 'copilot' | 'kiro' | 'roocode' | 'all';
export type AIType = 'claude' | 'cursor' | 'windsurf' | 'antigravity' | 'copilot' | 'kiro' | 'roocode' | 'codex' | 'all';
export interface Release {
tag_name: string;
@@ -20,7 +20,7 @@ export interface InstallConfig {
force?: boolean;
}
export const AI_TYPES: AIType[] = ['claude', 'cursor', 'windsurf', 'antigravity', 'copilot', 'roocode', 'kiro', 'all'];
export const AI_TYPES: AIType[] = ['claude', 'cursor', 'windsurf', 'antigravity', 'copilot', 'roocode', 'kiro','codex', 'all'];
export const AI_FOLDERS: Record<Exclude<AIType, 'all'>, string[]> = {
claude: ['.claude'],
@@ -29,5 +29,6 @@ export const AI_FOLDERS: Record<Exclude<AIType, 'all'>, string[]> = {
antigravity: ['.agent', '.shared'],
copilot: ['.github', '.shared'],
kiro: ['.kiro', '.shared'],
codex: ['.codex', '.shared'],
roocode: ['.roo', '.shared'],
};

View File

@@ -28,6 +28,8 @@ export function detectAIType(cwd: string = process.cwd()): DetectionResult {
if (existsSync(join(cwd, '.kiro'))) {
detected.push('kiro');
}
if (existsSync(join(cwd, '.codex'))) {
detected.push('codex');
if (existsSync(join(cwd, '.roo'))) {
detected.push('roocode');
}
@@ -57,6 +59,8 @@ export function getAITypeDescription(aiType: AIType): string {
return 'GitHub Copilot (.github/prompts/ + .shared/)';
case 'kiro':
return 'Kiro (.kiro/steering/ + .shared/)';
case 'codex':
return 'Codex (.codex/skills/ + .shared/)';
case 'roocode':
return 'RooCode (.roo/commands/ + .shared/)';
case 'all':

View File

@@ -39,7 +39,7 @@ export async function copyFolders(
const copiedFolders: string[] = [];
const foldersToCopy = aiType === 'all'
? ['.claude', '.cursor', '.windsurf', '.agent', '.github', '.kiro', '.roo', '.shared']
? ['.claude', '.cursor', '.windsurf', '.agent', '.github', '.kiro', '.roo','.codex', '.shared']
: AI_FOLDERS[aiType];
// Deduplicate folders (e.g., .shared might be listed multiple times)