💡 摘要
MoAI Rank是一个用于跟踪Claude Code令牌使用和编码会话的竞争平台。
🎯 适合人群
🤖 AI 吐槽: “编码的排行榜?终于有办法量化我的拖延症了!”
该项目将API密钥存储在本地JSON文件中,如果文件系统被攻破,则存在风险。为减轻此风险,请确保适当的文件权限,并考虑加密敏感数据。
MoAI Rank - Claude Code Agent Leaderboard
A competitive leaderboard platform for tracking Claude Code token usage. Track your AI coding sessions, compete with the community, and discover your own coding style through Agentic Coding Analytics.
⚠️ Important Notice (2025-01-25)
Due to a production environment migration, all existing accounts have been reset. If you were previously registered, please sign up again at rank.mo.ai.kr. We apologize for any inconvenience.
📚 Everyone's AI Agentic Coding Lecture
This project was created as a lecture example demonstrating practical MoAI-ADK usage.
🎯 Project Purpose
Experience a new dimension of agentic coding!
MoAI Rank was created for the following learning purposes:
- Real-world AI Agent Orchestration: A complete system built through collaboration of 20 specialized agents
- SPEC-First TDD Realization: Perfect quality process from specifications to tests
- Scalable Architecture: Production-ready code with caching, data retention policies, and performance optimizations
- Open Source Contribution: Releasing all code to contribute to community learning
⚠️ Development Environment
48-Hour Hacking Project
This project was intensively built using MoAI-ADK over 48 hours. A practical example demonstrating rapid development in real-world environments.
Development Characteristics:
- Core functionality implemented using MoAI-ADK's
/moai:alfred/moai:loopfully autonomous automation commands - Cost-effective development using GLM 4.7 and Claude Opus in hybrid
- Worktree parallel development for simultaneous development of independent functional modules
Testing Insufficiency Notice:
- Due to the 48-hour development, sufficient testing may not have been conducted
- If you find any errors or improvements, please leave them at GitHub Issues
- Community contributions make the project more robust
🔗 Related Projects
- MoAI-ADK: AI Development Framework
🚀 Before You Start: Install MoAI-ADK
To use MoAI Rank, MoAI-ADK must be installed first.
What is MoAI-ADK?
MoAI-ADK is an AI development framework that creates quality code.
- SPEC-First TDD: 90% rework reduction with clear specifications
- AI Orchestration: 20 specialized agents + 48 skills
- Multi-language Support: Automatic Korean/English/Japanese/Chinese support
- Worktree Parallel Development: Unlimited parallel work in completely isolated environments
- MoAI Rank: Motivation through vibe coding leaderboard
Quick Installation
# Method 1: Quick Installation (Recommended) curl -LsSf https://modu-ai.github.io/moai-adk/install.sh | sh # Method 2: Manual Installation # Step 1: Install uv (macOS/Linux) curl -LsSf https://astral.sh/uv/install.sh | sh # Step 2: Install MoAI-ADK uv tool install moai-adk
🎮 MoAI Rank CLI Commands
Once MoAI-ADK is installed, you can use the MoAI Rank CLI.
Command Overview
moai rank [OPTIONS] COMMAND [ARGS]... MoAI Rank - Claude Code Token Usage Leaderboard Track your Claude Code sessions and compete on the leaderboard. Web dashboard: https://rank.mo.ai.kr Options: --help Show help message Commands: login Login to MoAI Rank via GitHub OAuth (alias: register) status Show current rank and statistics exclude Exclude project from session tracking include Re-include previously excluded project logout Remove stored MoAI Rank credentials
Detailed Command Explanations
1. login - GitHub OAuth Login
moai rank login
Note:
moai rank registeris still supported as an alias for backward compatibility.
How It Works:
- Opens browser for GitHub OAuth authentication
- Automatically generates and stores API key after successful authentication
- Installs global hook to start automatic session tracking
- Securely stores API key in
~/.moai/rank/credentials.json
Execution Example:
❯ moai rank login ╭──────────────────────────────── Login ───────────────────────────────╮ │ MoAI Rank Login │ │ │ │ This will open your browser to authorize with GitHub. │ │ After authorization, your API key will be stored securely. │ ╰──────────────────────────────────────────────────────────────────────╯ Opening browser for GitHub authorization... Waiting for authorization (timeout: 5 minutes)... ╭─────────────────────────── Login Complete ───────────────────────────╮ │ Successfully logged in as your-github-id │ │ │ │ API Key: moai_rank_a9011fac_c... │ │ Stored in: ~/.moai/rank/credentials.json │ ╰──────────────────────────────────────────────────────────────────────╯ ╭───────────────────────── Global Hook Installed ──────────────────────╮ │ Session tracking hook installed globally. │ │ │ │ Your Claude Code sessions will be automatically tracked. │ │ Hook location: ~/.claude/hooks/moai/session_end__rank_submit.py │ │ │ │ To exclude specific projects: │ │ moai rank exclude /path/to/project │ ╰──────────────────────────────────────────────────────────────────────╯
2. sync - Sync Session Data
moai rank sync
Synchronizes local Claude Code session data to the MoAI Rank server.
Example Output:
❯ moai rank sync Syncing 2577 session(s) to MoAI Rank Phase 1: Parsing transcripts (parallel: 20 workers) Parsing transcripts ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% (2577/2577) Phase 2: Submitting 1873 session(s) (batch mode) Batch size: 100 | Batches: 19 Submitting batches ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% (19/19) Sync Complete ✓ Submitted: 0 ○ Skipped: 704 (no usage or duplicate) ✗ Failed: 500
3. status - Check My Rank
moai rank status
How It Works:
- Calls
/api/v1/rankendpoint with stored API key - Retrieves user-specific ranking data from server
- Displays daily/weekly/monthly/all-time ranks and statistics
Execution Example:
❯ moai rank status ╭────────────────────────────── MoAI Rank ─────────────────────────────╮ │ your-github-id │ │ │ │ 🏆 Global Rank: #42 │ ╰──────────────────────────────────────────────────────────────────────╯ ╭───── Daily ──────╮ ╭───── Weekly ─────╮ ╭──── Monthly ─────╮ ╭──── All Time ────╮ │ #12 │ │ #28 │ │ #42 │ │ #156 │ ╰──────────────────╯ ╰──────────────────╯ ╰──────────────────╯ ╰──────────────────╯ ╭─────────────────────────── Token Usage ──────────────────────────────╮ │ 1,247,832 total tokens │ │ │ │ Input ██████████████░░░░░░ 847,291 (68%) │ │ Output ██████░░░░░░░░░░░░░░ 400,541 (32%) │ │ │ │ Sessions: 47 │ ╰──────────────────────────────────────────────────────────────────────╯ ● Hook: Installed | https://rank.mo.ai.kr
4. exclude/include - Project Management
# Exclude current project moai rank exclude # Exclude specific path moai rank exclude /path/to/private # Wildcard patterns moai rank exclude "*/confidential/*" # List excluded projects moai rank list-excluded # Re-include moai rank include /path/to/project
Privacy Protection:
- Sensitive projects can be excluded from tracking
- Data from excluded projects is not sent to the server
5. logout - Logout
moai rank logout
- Removes stored API key
- Removes global hook
- Stops all tracking
📊 Collected Metrics
| Metric | Description | Collected | | ---------------- | ----------------------------------- | --------- | | Token Usage | Input/Output tokens, Cache tokens | O | | Tool Usage | Read, Edit, Bash usage counts | O | | Model Usage | Opus, Sonnet, Haiku breakdown | O | | Code Metrics | Added/deleted lines, modified files | O | | Session Info | Duration, turn count, timestamps | O | | Code Content | Actual code content | X | | File Paths | File paths within project | X | | Prompts | Conversation content with Claude | X |
Guarantee: Collected data contains only numerical metrics; code content or conversation details are never transmitted.
Table of Contents
优点
- 鼓励竞争编码和社区参与
- 提供编码会话的详细指标
- 支持多种语言以提高可及性
缺点
- 有限的测试可能导致错误
- 需要安装额外的框架
- 会话跟踪的隐私问题
相关技能
免责声明:本内容来源于 GitHub 开源项目,仅供展示和评分分析使用。
版权归原作者所有 modu-ai.
