Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .ai-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,15 @@
"Use logical section ordering",
"Include practical examples",
"Maintain professional yet friendly tone"
],
"git_workflow": [
"Always create GitHub issues first for features/bugs",
"Use GitHub CLI (gh) for all Git interactions",
"Create feature branches and pull requests",
"Wait for CI/CD pipeline to succeed before merging",
"Bump version in package.json before publishing",
"Use 'npm publish' only after successful merge to main",
"Never push directly to main - always use PR workflow"
]
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"type": "git",
"url": "git+https://github.com/rkristelijn/lcode.git"
},
"version": "2.2.0",
"version": "2.3.0",
"main": "index.mjs",
"bin": {
"lcode": "index.mjs"
Expand Down
18 changes: 18 additions & 0 deletions src/config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,24 @@ export const CONFIG_TEMPLATES = {
};

export async function createInteractiveConfig() {
// Detect CI environment and use basic setup
const isCI = process.env.CI || process.env.GITHUB_ACTIONS || process.env.JENKINS_URL;

if (isCI) {
console.log('🤖 CI environment detected - using basic configuration');
const basicConfig = CONFIG_TEMPLATES.basic.config;
const configPath = path.resolve(process.env.HOME, '.lcodeconfig');

try {
fs.writeFileSync(configPath, JSON.stringify(basicConfig, null, 2));
console.log(`✓ Configuration file created at ${configPath}`);
return true;
} catch (error) {
console.error(`✗ Failed to create configuration file: ${error.message}`);
return false;
}
}

console.log('\n🚀 Welcome to lcode configuration setup!\n');

const answers = await inquirer.prompt([
Expand Down