https://github.com/whoamaiii/devxp-cli
๐ฎ A gamified CLI tool for developers that tracks coding activities and rewards XP for development milestones
https://github.com/whoamaiii/devxp-cli
cli developer-tools gamification git-hooks npm-package productivity typescript xp-system
Last synced: 3 months ago
JSON representation
๐ฎ A gamified CLI tool for developers that tracks coding activities and rewards XP for development milestones
- Host: GitHub
- URL: https://github.com/whoamaiii/devxp-cli
- Owner: whoamaiii
- License: mit
- Created: 2025-08-06T14:24:36.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-08-06T14:36:10.000Z (11 months ago)
- Last Synced: 2025-08-06T16:36:17.418Z (11 months ago)
- Topics: cli, developer-tools, gamification, git-hooks, npm-package, productivity, typescript, xp-system
- Language: TypeScript
- Size: 233 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# DevXP CLI
๐ **Gamify Your Development Experience** - Track your coding progress, earn achievements, and level up your skills!
[](https://www.npmjs.com/package/devxp-cli)
[](https://opensource.org/licenses/MIT)
[](https://nodejs.org)
[](https://www.typescriptlang.org/)
## ๐ฎ What is DevXP?
DevXP CLI is a command-line tool that gamifies your development workflow. It tracks your Git commits, coding sessions, and development activities to provide:
- ๐ **Achievement System** - Unlock achievements as you code
- ๐ **XP & Leveling** - Gain experience points and level up
- ๐ **Statistics Tracking** - Monitor your coding habits and productivity
- ๐
**Leaderboards** - Compare your progress with other developers
- ๐จ **Beautiful Visualizations** - See your progress in stunning terminal graphics
- ๐ง **Shell Integration** - Automatic tracking with your favorite shell
## ๐ธ Screenshots
```
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ DevXP Status โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฃ
โ Level 42 Developer โ
โ โโโโโโโโโโโโโโโโโโโโโ 12,450 / 15,000 XP โ
โ โ
โ ๐ฅ Current Streak: 7 days โ
โ โก Today's XP: 450 โ
โ ๐ฏ Next Achievement: Code Warrior (78%) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
```
## ๐ Quick Start
### Installation
```bash
# Install globally via npm
npm install -g devxp-cli
# Or using yarn
yarn global add devxp-cli
# Or using pnpm
pnpm add -g devxp-cli
```
### Initial Setup
```bash
# Run the interactive setup wizard
devxp install
# Or manually configure
devxp config set name "Your Name"
devxp config set shell bash # or zsh, fish
```
### Basic Usage
```bash
# Check your current status
devxp status
# View your achievements
devxp achievements
# Show statistics
devxp stats
# View leaderboard
devxp leaderboard
# Configure settings
devxp config
```
## ๐ฏ Features in Detail
### Achievement System
Unlock achievements based on your coding activities:
- **First Commit** - Make your first commit
- **Streak Master** - Maintain a 30-day coding streak
- **Night Owl** - Code after midnight
- **Early Bird** - Start coding before 6 AM
- **Refactor King** - Perform multiple refactoring commits
- **Bug Squasher** - Fix bugs consistently
- **Documentation Hero** - Write comprehensive documentation
- And many more!
### XP System
Earn XP through various activities:
| Activity | XP Earned |
|----------|----------|
| Git Commit | 10-50 XP |
| Pull Request | 100 XP |
| Code Review | 75 XP |
| Issue Resolved | 50 XP |
| Documentation | 30 XP |
| Test Writing | 40 XP |
### Shell Integration
Automatically track your development activities by integrating with your shell:
```bash
# For Bash
echo 'eval "$(devxp shell-integration bash)"' >> ~/.bashrc
# For Zsh
echo 'eval "$(devxp shell-integration zsh)"' >> ~/.zshrc
# For Fish
devxp shell-integration fish | source
echo 'devxp shell-integration fish | source' >> ~/.config/fish/config.fish
```
## ๐ ๏ธ Advanced Configuration
### Configuration File
DevXP stores configuration in `~/.config/devxp/config.json`:
```json
{
"name": "John Doe",
"theme": "neon",
"notifications": true,
"trackingEnabled": true,
"excludePaths": ["/node_modules", "/.git"],
"xpMultiplier": 1.0
}
```
### Environment Variables
```bash
# Set custom config directory
export DEVXP_CONFIG_DIR="$HOME/.myconfig/devxp"
# Set custom database location
export DEVXP_DB_PATH="$HOME/.mydata/devxp.db"
# Enable debug mode
export DEVXP_DEBUG=true
```
### Git Hooks Integration
Automatically track Git activities:
```bash
# Install Git hooks for current repository
devxp install --git-hooks
# Install globally for all repositories
devxp install --git-hooks --global
```
## ๐ API Reference
### Commands
#### `devxp status [options]`
Display current level, XP, and recent activity.
**Options:**
- `-v, --verbose` - Show detailed information
- `-j, --json` - Output in JSON format
#### `devxp achievements [options]`
List all achievements and progress.
**Options:**
- `--unlocked` - Show only unlocked achievements
- `--locked` - Show only locked achievements
- `--recent` - Show recently unlocked achievements
#### `devxp stats [period]`
Display coding statistics.
**Arguments:**
- `period` - Time period: `today`, `week`, `month`, `year`, `all` (default: `week`)
#### `devxp leaderboard [options]`
Show leaderboard rankings.
**Options:**
- `--global` - Show global leaderboard
- `--friends` - Show friends leaderboard
- `--limit ` - Number of entries to show
#### `devxp config [key] [value]`
Manage configuration settings.
**Actions:**
- `get ` - Get configuration value
- `set ` - Set configuration value
- `list` - List all configuration
- `reset` - Reset to defaults
## ๐งช Development
### Prerequisites
- Node.js >= 18.0.0
- npm, yarn, or pnpm
- Git
### Setup Development Environment
```bash
# Clone the repository
git clone https://github.com/yourusername/devxp-cli.git
cd devxp-cli
# Install dependencies
npm install
# Run in development mode
npm run dev
# Run tests
npm test
# Build for production
npm run build
```
### Project Structure
```
devxp-cli/
โโโ src/
โ โโโ index.ts # CLI entry point
โ โโโ commands/ # Command implementations
โ โ โโโ status.command.ts
โ โ โโโ achievements.command.ts
โ โ โโโ stats.command.ts
โ โ โโโ ...
โ โโโ modules/ # Core modules
โ โ โโโ xp-system.ts # XP calculation logic
โ โ โโโ achievements.ts # Achievement system
โ โ โโโ database.ts # SQLite database
โ โ โโโ ...
โ โโโ types/ # TypeScript definitions
โ โโโ utils/ # Utility functions
โโโ tests/ # Test files
โโโ docs/ # Documentation
โโโ package.json
```
### Available Scripts
| Script | Description |
|--------|-------------|
| `npm run build` | Build for production |
| `npm run dev` | Run in development mode |
| `npm run test` | Run all tests |
| `npm run test:watch` | Run tests in watch mode |
| `npm run test:coverage` | Generate coverage report |
| `npm run lint` | Lint code |
| `npm run format` | Format code with Prettier |
### Creating Custom Commands
```typescript
// src/commands/mycommand.command.ts
import { Command } from '../types/command.js';
import { logger } from '../utils/logger.js';
export class MyCommand implements Command {
readonly name = 'mycommand';
readonly description = 'Description of my command';
readonly aliases = ['mc'];
async execute(args: ReadonlyArray): Promise {
logger.info('Executing my command');
// Your implementation here
}
}
```
## ๐ค Contributing
We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details.
1. Fork the repository
2. Create your feature branch (`git checkout -b feature/AmazingFeature`)
3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request
## ๐ Changelog
See [CHANGELOG.md](CHANGELOG.md) for a list of changes.
## ๐ Bug Reports
Found a bug? Please [open an issue](https://github.com/yourusername/devxp-cli/issues) with a detailed description.
## ๐ก Feature Requests
Have an idea? We'd love to hear it! [Open an issue](https://github.com/yourusername/devxp-cli/issues) with the `enhancement` label.
## ๐ License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
## ๐ Acknowledgments
- Built with [Commander.js](https://github.com/tj/commander.js/)
- Terminal graphics powered by [Chalk](https://github.com/chalk/chalk) and [Boxen](https://github.com/sindresorhus/boxen)
- Database management with [Better SQLite3](https://github.com/WiseLibs/better-sqlite3)
- Inspired by gaming achievement systems
## ๐ง Contact
- **Author**: Your Name
- **Email**: your.email@example.com
- **Twitter**: [@yourhandle](https://twitter.com/yourhandle)
- **Website**: [yourwebsite.com](https://yourwebsite.com)
---
Made with โค๏ธ by developers, for developers
โญ Star us on GitHub โ it helps!