Add mokku CLI, release workflow, and improve codebase#12
Merged
arthurkowalsky merged 7 commits intomainfrom Dec 19, 2025
Merged
Conversation
Implements comprehensive CLI functionality for RustMock with the new `mokku` command, making API mocking easier and more intuitive. Features: - 🎯 New `mokku` binary with intuitive command-line interface - 🔄 Interactive mode with inquire for guided workflows - 📥 OpenAPI import from YAML/JSON files - 🔨 Quick mock creation via CLI - 🌐 Browser auto-open with --open flag - 🔗 Smart proxy mode support - 📝 Beautiful colored terminal output Commands: - `mokku` - Start server with interactive menu (default) - `mokku server` - Start server with options - `mokku import <file>` - Import OpenAPI spec (YAML/JSON) - `mokku mock <method> <path> [status] [body]` - Create quick mocks - `mokku replay <name>` - Placeholder for future session replay Architecture changes: - Refactored src/main.rs → src/lib.rs (library crate) - Created src/bin/server.rs (backward-compatible RustMock binary) - Created src/bin/mokku.rs (new CLI with all features) - Added dependencies: inquire, colored, anyhow, thiserror, open, serde_yaml Backward compatibility: - Old `RustMock` binary still available with original CLI - Existing users can continue using RustMock binary unchanged Documentation: - Updated README.md with CLI section at the top - Added CLI to features list - Included interactive mode examples and command reference
Prepares project for automated releases with multi-platform binaries and crates.io publication. Changes: - 📝 Added CHANGELOG.md with version 0.2.0 release notes - 📦 Updated Cargo.toml with crates.io metadata - Description, license, repository, keywords, categories - Exclude unnecessary files from package - 🤖 New GitHub Actions release workflow: - Automatic crates.io publishing on tag push - Multi-platform binary builds (Linux, macOS, Windows) - Cross-compilation support (x86_64, ARM64, musl) - Automated GitHub Release creation with binaries - 🏷️ Added crates.io badges to README - 📖 Updated installation instructions with crates.io option Release workflow triggers on version tags (v*.*.*) and: 1. Publishes to crates.io using CARGO_REGISTRY_TOKEN secret 2. Builds binaries for 6 platforms: - Linux: x86_64-gnu, x86_64-musl, aarch64-gnu - macOS: x86_64-darwin, aarch64-darwin - Windows: x86_64-msvc 3. Creates GitHub Release with changelog and binaries 4. Generates installation instructions for each platform Usage: git tag v0.2.0 git push origin v0.2.0
Updates: - Fix release workflow to use tags without v prefix (0.3.0 not v0.3.0) - Remove all code comments from Rust files and Cargo.toml - Bump version to 0.3.0 - Update CHANGELOG.md to 0.3.0 Release workflow changes: - Tag pattern changed from v*.*.* to [0-9]+\.[0-9]+\.[0-9]+ - Version extraction fixed for tags without v prefix - Release name format: "Release 0.3.0" not "Release v0.3.0" Code cleanup: - Removed all // comments from src/lib.rs, src/bin/mokku.rs, src/bin/server.rs - Removed section comments from Cargo.toml - Kept doc comments (///) for API documentation
8ff7918 to
281d5f7
Compare
281d5f7 to
862295e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
New features:
mokkuCLI with interactive mode, quick mock creationCode quality: