Skip to content

ahhzaky/mklog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MKLOG - Project Log Management Tool

MKLOG Logo

Go Version License: MIT

MKLOG is a command-line tool for managing project logs with a built-in web visualization interface. It offers a simple way to track project progress, decisions, and notes with different status categories.


Features

  • Simple Log Management: Create and maintain a structured log file for your project
  • Status Tracking: Categorize entries as Approve, Reject, or Prepare
  • Web Visualization: View your logs in a clean, color-coded web interface
  • Timestamped Entries: Automatic timestamps for all log entries
  • Portable: Single executable with no external dependencies

Installation

Download the appropriate binary for your platform from the releases page, or build from source:

git clone https://github.com/ahhzaky/mklog.git
cd mklog
go build -o mklog

Make sure to add the executable to your PATH for easy access.

Installation Using go install

You can install MKLOG directly using the go install command:

go install github.com/ahhzaky/mklog/cmd/mklog@latest

This will download and build the latest version of MKLOG, placing the executable in your $GOPATH/bin directory. Make sure $GOPATH/bin is included in your system's PATH.

Environment Setup

On Windows

  1. Add to PATH:

    • Move mklog.exe to a directory in your PATH or add the build directory to your PATH.
  2. Verify Installation:

    mklog help

Windows PowerShell

irm https://raw.githubusercontent.com/ahhzaky/mklog/main/scripts/install.ps1 | iex

On Linux

  1. Add to PATH:

    • Move mklog to a directory in your PATH (e.g., /usr/local/bin):
      sudo mv mklog /usr/local/bin/
  2. Verify Installation:

    mklog help

Now you are ready to use MKLOG on your system.

Usage

Initialize a Log File

Before using MKLOG, you need to initialize a log file in your project directory:

mklog init

This creates a LOGPROJECT.log file in the current directory.

Adding Log Entries

Add new entries to your log with the write command:

# Basic entry with a comment (defaults to Approve status)
mklog write -c "Initial code implementation"

# Entry with comment and description
mklog write -c "Fixed login bug" -d "Resolved issue with user authentication timeout"

# Entry with Reject status
mklog write -c "UI design proposal" -d "Color scheme needs revision" -sR

# Entry with Prepare status
mklog write -c "Database schema" -d "Ready for review" -sP

Command Options

  • -c: Comment for the log entry (required)
  • -d: Description for the log entry (optional, defaults to "Description Default")
  • -sA: Set status to "Approve" (default if no status flag is provided)
  • -sR: Set status to "Reject"
  • -sP: Set status to "Prepare"

Web Visualization

View your log entries in a web browser with:

mklog webgraph

This starts a web server at http://localhost:8080 displaying your log entries in a color-coded table:

  • Green: Approved entries
  • Red: Rejected entries
  • Blue: Prepared entries

You can specify a different port with:

mklog webgraph -port 3000

Help and Version

# Display help information
mklog help

# Display version information
mklog version

Log File Format

MKLOG stores entries in a simple text format:

File Log manager
[2025-02-28 15:04:05.000] [Approve] ["Initial code implementation"] ["Description Default"]
[2025-02-28 15:10:23.000] [Reject] ["UI design proposal"] ["Color scheme needs revision"]

Each entry includes:

  1. Timestamp in YYYY-MM-DD HH:MM:SS.sss format
  2. Status (Approve, Reject, or Prepare)
  3. Comment (in quotes)
  4. Description (in quotes)

Web Interface

The web interface provides:

  • A complete view of all log entries
  • Color-coded rows based on entry status
  • Count of total entries
  • Manual refresh option
  • Responsive design that works on mobile devices

Requirements

  • For building: Go 1.24 or higher
  • For running: No special requirements
  • For using make the Makefile commands

Screenshots

Command-Line Interface

CLI Example

Web Visualization Interface

Web Visualization

License

MIT License 2025, Read more LICENSE