code-mantras
Version:
Lightweight npm package delivering 100+ powerful, tech-focused motivational greetings to boost productivity for developers, and teams.
213 lines (148 loc) โข 6.29 kB
Markdown
# ๐ Code Mantras
<div align="center">
**๐ก Daily dose of motivation for developers who code, create, and conquer!**
*Transform your terminal into a source of inspiration with powerful mantras crafted for the modern developer.*
</div>
---
## โจ What is Code Mantras?
Code Mantras delivers **100+ insperitional quotes** designed specifically for developers, programmers, and tech enthusiasts. Whether you're debugging at 3 AM, pushing through a challenging feature, or just need that extra spark of motivation, Code Mantras has got your back!
## ๐ฏ Features
- ๐ฒ **100+ Unique Messages** - Never see the same motivation twice
- ๐จ **Personalized Greetings** - Add your name for a personal touch
- โก **Lightning Fast** - Zero dependencies, pure JavaScript magic
- ๐ **Universal** - Works everywhere: Node.js, browsers, terminals
- ๐ญ **Smart Capitalization** - Automatically formats names beautifully
- ๐ฆ **Tiny Bundle** - Lightweight and efficient
## ๐ Quick Start
### Installation
```bash
# Or install from npm
npm install code-mantras
```
### Usage
```javascript
import { greetings } from 'code-mantras';
// Get a random motivational message
console.log(greetings());
// Output: "Code is poetry written in logic. Make yours a masterpiece!"
// Add your name for personalization
console.log(greetings('Alice'));
// Output: "Every expert was once a beginner. Every pro was once an amateur. โ Alice"
// Perfect for CLI tools
console.log(greetings('john doe'));
// Output: "Think twice, code once. Debug never! โ John Doe"
```
## ๐ช Real-World Examples
### ๐ฅ๏ธ Terminal Greeting
```javascript
// Add to your .zshrc or .bashrc
import { greetings } from 'code-mantras';
console.log(`\n${greetings('YourName')}\n`);
```
### ๐ค CLI Tool Integration
```javascript
#!/usr/bin/env node
import { greetings } from 'code-mantras';
console.log('๐ Starting development server...');
console.log(`๐ญ ${greetings()}`);
// Your CLI logic here
```
### ๐ฏ Build Scripts
```javascript
// package.json
{
"scripts": {
"start": "node -e \"import('code-mantras').then(m => console.log(m.greetings()))\" && your-start-command",
"build": "node -e \"import('code-mantras').then(m => console.log(m.greetings()))\" && your-build-command"
}
}
```
### ๐จ React/Vue Apps
```javascript
import { greetings } from 'code-mantras';
function WelcomeComponent() {
const motivation = greetings('Developer');
return (
<div className="welcome-banner">
<h2>๐ฏ Daily Motivation</h2>
<p>{motivation}</p>
</div>
);
}
```
## ๐ญ Sample Messages
Here's a taste of what Code Mantras delivers:
> **"Code is poetry written in logic. Make yours a masterpiece!"**
> **"Think twice, code once. Debug never!"**
> **"Every expert was once a beginner. Every pro was once an amateur."**
> **"Your code today is someone's inspiration tomorrow."**
> **"Bugs are just features in disguise waiting to be discovered!"**
*...and 95+ more inspiring messages!*
## ๐ ๏ธ API Reference
### `greetings(userName?)`
Returns a random motivational message with optional name personalization.
**Parameters:**
- `userName` (optional): String - Your name or any name to personalize the message
**Returns:**
- `String` - A formatted motivational message
**Examples:**
```javascript
greetings() // Returns: "Code is art. Make it beautiful!"
greetings('Alice') // Returns: "Debug with patience, code with passion! โ Alice"
greetings('bob joe') // Returns: "Think like a computer, dream like a human! โ Bob Joe"
```
## ๐ฏ Use Cases
- **๐ฅ๏ธ Terminal Startup Messages** - Motivate yourself every time you open the terminal
- **๐ค CLI Tool Enhancement** - Add inspiration to your command-line applications
- **๐ฑ Development Dashboards** - Display motivational quotes in your dev environment
- **๐ฎ Coding Practice Apps** - Encourage learners with positive reinforcement
- **๐ Build Scripts** - Make your build process more enjoyable
- **๐ผ Team Tools** - Boost team morale in internal tools
## ๐งช Testing
Code Mantras comes with comprehensive tests to ensure reliability:
```bash
# Run tests
npm test
# Expected output
โ
Returns a string
โ
Includes name when provided
โ
Returns greeting without name
โ
Capitalizes names properly
โ
Returns different messages (randomness check)
```
## ๐ค Contributing
We love contributions! Whether it's:
- ๐ก **New motivational messages** - Add your favorite coding mantras
- ๐ **Bug fixes** - Help us squash those pesky bugs
- ๐ **Documentation** - Improve our docs and examples
- โจ **Features** - Suggest new ways to motivate developers
### Quick Contribution Guide:
1. **Fork** the repository
2. **Create** a feature branch: `git checkout -b feature/amazing-mantras`
3. **Add** your motivational messages to `src/greetings.js`
4. **Test** your changes: `npm test`
5. **Commit** your changes: `git commit -m "Add amazing new mantras"`
6. **Push** to the branch: `git push origin feature/amazing-mantras`
7. **Open** a Pull Request
## ๐ Stats & Performance
- **โก Bundle Size**: < 5KB minified
- **๐ Load Time**: < 1ms average execution
- **๐ฏ Zero Dependencies**: Pure JavaScript, no external deps
- **๐ Cross-Platform**: Works on Node.js 14+, all modern browsers
- **๐พ Memory Usage**: < 1MB RAM footprint
## ๐บ๏ธ Roadmap
- [ ] ๐ **Multi-language Support** - Mantras in different languages
- [ ] ๐จ **Themed Collections** - Frontend, Backend, DevOps specific mantras
- [ ] ๐
**Daily Mantra API** - Get date-specific motivational messages
## ๐ License
MIT License - feel free to use Code Mantras in your projects, commercial or personal!
## ๐ Acknowledgments
- Inspired by developers worldwide who turn coffee into code โ
- Built with โค๏ธ for the coding community
- Special thanks to all contributors who make this project awesome
---
<div align="center">
**๐ If Code Mantras inspired you, give it a star! ๐**
Made with ๐ป and โ for developers by developers
[Report Bug](https://github.com/viveksojitra/code-mantras/issues) โข [Request Feature](https://github.com/viveksojitra/code-mantras/issues) โข [Documentation](https://github.com/viveksojitra/code-mantras#readme)
</div>