2.3 KiB
unique
A small but practical command-line utility for creating safe, unique file and directory names.
When scripts, backups, content pipelines, or file-based workflows need to create or rename paths
without collisions, unique appends a timestamp-, UUID-, or entropy-based suffix to keep names
distinct, readable, and easy to trace.
Why use unique?
File naming collisions are a recurring problem in scripting, automation, backups, content pipelines,
and content authoring workflows. unique gives you a simple interface to:
- create a new file or directory with a guaranteed unique name
- rename an existing path to have a unique name
- duplicate a file while preserving its original contents under a fresh name
- choose the suffix generation method that best fits your workflow
Features
- Create files or directories with unique names
- Rename existing files or folders safely
- Duplicate files with a unique derivative name
- Multiple suffix strategies:
datetime,epoch,uuid,uuid7,uuid-b36, anduuid7-b36 - Python-based CLI design for simple automation and scripting
Quick Usage
The CLI is organized around a small set of commands.
Create a unique file
unique create --file notes.txt
This creates a new file with a name like notes-20260916-153425.txt
Create a unique directory
unique create --dir project
This creates a new folder with a name like project-20260916-153425
Rename an existing file or directory
unique touch report.md
report.md must pre-exist. This appends a generated suffix to the original path instead of
overwriting an existing file.
Duplicate a file with a unique name
unique duplicate archive.tar.gz
archive.tar.gz must pre-exist. A copy of the file will be created with a name like
archive-20260916-153425.tar.gz
Documentation
- Build from Source — set up the project and produce a distributable build.
- Installation — install the CLI tool and make it available from any directory.
- Using unique — learn the CLI commands and examples for more detailed usage.
- Suffix methods - the different strategies to generate a unique name.
License
This project is distributed under the DuxTechnica Limited Use Source Code License Agreement.