Skip to content

A Go-Based CLI Tool to Deduplicate your files

License

chishxd/dedup-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

dedup-go

dedup-go is a simple, fast, idiomatic Go tool to detect and remove duplicate files in a directory by computing their content hashes.
It’s designed to be a lightweight, real-world example of writing robust Go CLIs and learning file I/O, hashing, and concurrency.


✨ Features

  • Scan any target directory recursively
  • Compute SHA-256 hashes for file comparison
  • Report duplicates and optionally delete them
  • Clean, modular Go project structure
  • Ready for use as a CLI or as a library

πŸ“¦ Installation

# Clone the repo
git clone https://github.com/chishxd/dedup-go.git

# Initialize dependencies
cd dedup-go
go mod tidy

# Run the CLI
go run ./cmd/dedup.go ./path/to/your/target_dir

βš™οΈ Usage

Basic usage:

dedup-go --path ./target_dir --delete
Flag Description
--path Path to the directory to scan
--delete Remove duplicates automatically

πŸ—‚οΈ Project Structure

dedup-go/
β”œβ”€β”€ cmd/            # CLI entry point
β”‚   └── dedup.go
β”œβ”€β”€ internal/       # Core logic
β”‚   β”œβ”€β”€ hash.go
β”‚   β”œβ”€β”€ dedup.go
β”‚   └── utils.go
β”œβ”€β”€ go.mod
β”œβ”€β”€ go.sum
β”œβ”€β”€ README.md
└── LICENSE

πŸš€ Roadmap

  • Add unit tests
  • Add concurrency for faster hashing
  • Add logging and verbose output
  • Build cross-platform binaries

🀝 Contributing

Pull requests are welcome! Please open an issue first to discuss major changes. Make sure to follow Go best practices and run go fmt before submitting.


πŸ“„ License

This project is licensed under the MIT License β€” see LICENSE for details.


Built with πŸ’š by Chinmay Shet.

About

A Go-Based CLI Tool to Deduplicate your files

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages