Mochi
Competitive Programming Template Manager
Source Code
Go CLI implementation repository
Installation
Available via GitHub releases and Go install
Project Overview
🏗️ Single Repository CLI Tool
Mochi is a single Go repository containing a complete CLI tool for competitive programming template management. Installation and usage instructions are available in the repository's README.
Mochi is a lightweight command-line tool designed specifically for competitive programmers who need quick access to code templates and boilerplate setups. Built with Go for speed and simplicity, it helps streamline the process of starting new competitive programming problems.
The tool provides template management, quick file generation, and customizable configurations that can be tailored to different competitive programming platforms and personal coding preferences. It's designed to minimize setup time and maximize coding efficiency during contests.
Technology Stack
Core Technologies
- Go programming language
- CLI framework (Cobra)
- File system operations
- Template engine
Features
- Template management
- Quick file generation
- Configuration system
- Cross-platform support
Core Features
Template Management
- • Pre-built C++ templates
- • Custom template creation
- • Template versioning
- • Language-specific templates
- • Template sharing
Quick Setup
- • One-command file generation
- • Automatic directory creation
- • Boilerplate code insertion
- • Contest-specific setups
- • Batch file creation
CLI Interface
- • Simple command structure
- • Interactive prompts
- • Help documentation
- • Command aliases
- • Tab completion
Configuration
- • User preferences
- • Default template settings
- • Custom file extensions
- • Platform-specific configs
- • Environment variables
Usage Examples
Basic Commands
# Create a new competitive programming file mochi new problem_name # Use a specific template mochi new problem_name --template advanced # Create multiple files for a contest mochi contest codeforces_round_123 # List available templates mochi list # Update templates mochi update
Template Structure
// Default C++ template #include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); // Your code here return 0; } // Advanced template with common utilities #include <bits/stdc++.h> using namespace std; #define ll long long #define vi vector<int> #define vll vector<long long> #define pb push_back #define all(x) x.begin(), x.end() int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); // Your code here return 0; }
Installation & Setup
Go Install
# Install via Go go install github.com/devyk100/mochi@latest # Verify installation mochi --version
Requires Go 1.19 or later installed on your system.
Manual Installation
# Clone repository git clone https://github.com/devyk100/mochi.git # Build from source cd mochi go build -o mochi # Add to PATH sudo mv mochi /usr/local/bin/
Build from source for the latest development features.