Skip to content

nkostic/mydocs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“ mydocs CLI

A console-based journaling utility written in Go to help you quickly generate daily Markdown notes and publish them to a centralized index.

License: MIT Go Version Build Status

✨ Features

  • πŸ†• Create journal entries for today or specific dates
  • πŸ“‘ Auto-generate home index with links to all entries
  • 🎨 Beautiful terminal UI with colors and styling
  • πŸš€ Fast and lightweight - single binary with no dependencies
  • πŸ“… Smart date handling with validation
  • πŸ”„ Duplicate prevention - won't overwrite existing entries
  • πŸ“Š Comprehensive testing with benchmarks

⚑ Quick Install

# Clone and install globally
git clone https://github.com/nkostic/mydocs.git
cd mydocs
make build
make install-global

# Now use from anywhere
mydocs new
mydocs help

πŸš€ Quick Start

Installation Options

Option 1: Install Globally (Recommended)

# Build and install to your system PATH
make build
make install-global

Now you can use mydocs from anywhere:

mydocs new
mydocs publish
mydocs help

Option 2: Install to Go PATH

# Install to $GOPATH/bin (requires Go environment)
make install

Make sure $GOPATH/bin is in your PATH.

Option 3: Build and Use Locally

# Build locally
make build

Then use with ./mydocs

Basic Usage

Create a journal entry for today

mydocs new

Create a journal entry for a specific date

mydocs new 2025-12-25

Update the home index

mydocs publish

Show version information

mydocs version

Show help

mydocs help

πŸ“ Project Structure

mydocs/
β”œβ”€β”€ cmd/mydocs/          # Application entry point
β”‚   └── main.go
β”œβ”€β”€ internal/            # Core application logic
β”‚   β”œβ”€β”€ create.go        # Journal entry creation
β”‚   β”œβ”€β”€ create_test.go   # Tests for create functionality
β”‚   β”œβ”€β”€ publish.go       # Home index publishing
β”‚   β”œβ”€β”€ publish_test.go  # Tests for publish functionality
β”‚   β”œβ”€β”€ styles.go        # Terminal UI styling
β”‚   └── version.go       # Version information
β”œβ”€β”€ docs/                # Documentation
β”‚   β”œβ”€β”€ CODE_STANDARDS.MD # Development standards
β”‚   └── INSTRUCTIONS.MD   # Original project requirements
β”œβ”€β”€ .editorconfig        # Editor configuration
β”œβ”€β”€ .gitignore          # Git ignore rules
β”œβ”€β”€ CONTRIBUTING.md     # Contribution guidelines
β”œβ”€β”€ LICENSE             # MIT License
β”œβ”€β”€ Makefile            # Build and development tasks
β”œβ”€β”€ README.md           # This file
└── go.mod              # Go module definition

πŸ›  Development

Available Make targets

make help              # Show available commands
make build             # Build the binary
make run               # Run the application
make test              # Run tests
make bench             # Run benchmarks
make lint              # Run linter
make fmt               # Format code
make vet               # Run go vet
make clean             # Remove built binary
make install           # Install to GOPATH/bin

Running tests

make test

Running benchmarks

make bench

πŸ“– Usage Examples

Creating entries

# Create entry for today
mydocs new

# Create entry for Christmas
mydocs new 2025-12-25

Publishing to index

# Update home.md with all journal entries
mydocs publish

This will create a home.md file with links to all your journal entries, sorted by date (newest first).

πŸ§ͺ Testing

The project includes comprehensive tests for all core functionality:

  • Unit tests for entry creation
  • Unit tests for home publishing
  • Benchmarks for performance testing
  • Table-driven tests following Go best practices

Run the tests with:

go test ./...

🀝 Contributing

We welcome contributions! This is an open source project.

Quick Start for Contributors

  1. Fork the repository on GitHub
  2. Clone your fork: git clone https://github.com/YOUR_USERNAME/mydocs.git
  3. Create a feature branch: git checkout -b feature/amazing-feature
  4. Make your changes following our Code Standards
  5. Run tests: make test
  6. Commit your changes: git commit -m 'feat: add amazing feature'
  7. Push to your fork: git push origin feature/amazing-feature
  8. Open a Pull Request on GitHub

Guidelines

Development Setup

# Install dependencies
go mod tidy

# Build the application
make build

# Run all tests
make test

# Check code quality
make lint && make vet && make fmt

πŸ“š Documentation

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ‘¨β€πŸ’» Author

Nenad Kostic

πŸ™ Acknowledgments

This project follows the specifications in docs/INSTRUCTIONS.MD and docs/CODE_STANDARDS.MD.

Built with ❀️ using:

  • Go - The programming language
  • Charm - Beautiful terminal UI components
  • lipgloss - Terminal styling

About

Dead Simple Markdown Journal CLI

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published