clixor
v1.0.2
Published
A modern CLI for initializing and managing development projects
Downloads
3
Readme
🚀 Clixor
Streamline your project setup with Clixor - the modern CLI for effortless development initialization.
Installation • Usage • Features • Contributing • Support
🌟 Features
- 🏗️ Project Initialization: Quickly bootstrap projects using predefined or custom templates
- 🎨 Customizable Templates: Easily manage and use your own project templates
- 🧭 Interactive Setup: User-friendly prompts guide you through project configuration
- 📦 Multiple Package Managers: Seamless support for npm, Yarn, and Bun
- 🛠️ Optional Tooling: Integrate popular tools like ESLint, Prettier, Jest, and Docker with ease
- ⚙️ Flexible Configuration: Persist and manage your preferences for future use
🚀 Quick Start
npx clixor init my-awesome-project
This command initializes a new project named "my-awesome-project" using Clixor's interactive setup.
📦 Installation
Prerequisites
- Node.js (v14 or later)
- Git
Steps
Clone the repository:
git clone https://github.com/Youssefbaghr/Clixor.git cd Clixor
Install dependencies:
npm install # or yarn install # or bun install
Link the CLI globally:
npm link
🖥️ Usage
Initialize a New Project
clixor init
Follow the interactive prompts to configure your project.
Manage Configuration
clixor config --list
clixor config --set templateDir=/path/to/templates
clixor config --reset
Manage Templates
clixor template --list
clixor template --add react-ts https://github.com/example/react-ts-template.git
clixor template --remove react-ts
🛠️ Configuration
Clixor uses a JSON configuration file stored at ~/.Clixor-config.json
. You can edit this file
directly or use the clixor config
command.
Example configuration:
{
"defaultTemplate": "react",
"packageManager": "npm",
"features": ["eslint", "prettier"],
"customTemplates": {
"react-ts": "https://github.com/example/react-ts-template.git"
}
}
🧩 Extending Clixor
Creating Custom Templates
- Create a Git repository with your project structure
- Add a
clixor.json
file to specify template options:{ "variables": ["projectName", "author"], "scripts": { "post-init": "npm run setup" } }
- Add the template using
clixor template --add
Creating Plugins
Clixor supports a plugin system that allows you to extend its functionality. Here's how to create a plugin:
- Create a new TypeScript file in the
src/plugins
directory. - Import the
PluginInterface
fromsrc/plugins/types/index.ts
. - Create a class that implements the
PluginInterface
. - Implement the required methods:
name
: A string identifier for your plugin.version
: The version of your plugin.initialize
: A method called when the plugin is registered.execute
: The main functionality of your plugin.
Example plugin:
import { PluginInterface } from '../types';
export class MyCustomPlugin implements PluginInterface {
name = 'MyCustomPlugin';
version = '1.0.0';
initialize(): void {
console.log('MyCustomPlugin initialized');
}
async execute(context: any): Promise<string> {
return MyCustomPlugin executed with context: ${JSON.stringify(context)};
}
}
To use your plugin, register it in the src/utils/plugins.ts
file:
import { MyCustomPlugin } from '../plugins/MyCustomPlugin';
// In the loadPlugins function
const myCustomPlugin = new MyCustomPlugin();
myCustomPlugin.initialize();
// Add logic to use the plugin as needed
Plugins allow you to add new commands, modify existing functionality, or integrate with external services to enhance Clixor's capabilities.
🤝 Contributing
We love our contributors! ❤️ Check out the CONTRIBUTORS.md file to see the amazing people who have helped make Clixor awesome.
Want to join this list of amazing people? We'd love your help! Here's how you can contribute:
- 🍴 Fork the repository
- 🌿 Create a new branch
- ✨ Make your changes
- 🔧 Test your changes
- 📤 Submit a pull request
For more detailed information, please read our Contributing Guide.
Whether it's submitting a bug report, proposing a new feature, or improving documentation - every contribution counts!
📜 Changelog
See CHANGELOG.md for a history of changes to this project.
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🙏 Acknowledgements
- Commander.js - CLI framework
- Inquirer.js - Interactive prompts
- Chalk - Terminal styling