{"id":30325768,"url":"https://github.com/zcyc/idinfo","last_synced_at":"2025-08-17T23:07:47.864Z","repository":{"id":310046248,"uuid":"1038420459","full_name":"zcyc/idinfo","owner":"zcyc","description":"A Go-based command-line tool for debugging and analyzing unique identifiers. This tool can parse, analyze, and generate various types of unique identifiers with detailed information extraction.","archived":false,"fork":false,"pushed_at":"2025-08-15T10:29:22.000Z","size":69,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-15T12:19:38.925Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zcyc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-08-15T06:58:02.000Z","updated_at":"2025-08-15T10:30:50.000Z","dependencies_parsed_at":"2025-08-15T12:20:45.833Z","dependency_job_id":"b846f587-b089-4a4b-b380-293c2eccbb84","html_url":"https://github.com/zcyc/idinfo","commit_stats":null,"previous_names":["zcyc/idinfo"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/zcyc/idinfo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zcyc%2Fidinfo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zcyc%2Fidinfo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zcyc%2Fidinfo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zcyc%2Fidinfo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zcyc","download_url":"https://codeload.github.com/zcyc/idinfo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zcyc%2Fidinfo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270918404,"owners_count":24667679,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-17T02:00:09.016Z","response_time":129,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-08-17T23:07:47.291Z","updated_at":"2025-08-17T23:07:47.854Z","avatar_url":"https://github.com/zcyc.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# idinfo: ID Information Tool\n\n[![Go Version](https://img.shields.io/badge/Go-1.20+-blue.svg)](https://golang.org/)\n[![License](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)\n[![Build Status](https://img.shields.io/badge/Build-Passing-brightgreen.svg)](#)\n\nA Go-based command-line tool for debugging and analyzing unique identifiers. This tool can parse, analyze, and generate various types of unique identifiers with detailed information extraction.\n\n## Quick Start\n\n```bash\n# Install\ngo install github.com/zcyc/idinfo@latest\n\n# Generate a UUID\nidinfo -g uuid\n\n# Analyze the generated UUID\nidinfo $(idinfo -g uuid)\n\n# Try different formats\nidinfo -g snowflake\nidinfo -g nanoid\nidinfo -g ulid\n```\n\n## Features\n\n- **Multiple ID Format Support**: UUID (v1-v8), ULID, MongoDB ObjectId, KSUID, Xid, NanoID, NUID, Snowflake variants, Unix timestamps, hex-encoded hashes, Base58, Firebase PushID, Base32, ShortUUID, Sqids, and TypeID\n- **Auto-Detection**: Automatically detects ID format using heuristics\n- **Force Format**: Override auto-detection to parse as specific format\n- **Multiple Output Formats**: Card-style (default), short, JSON, and binary output\n- **Comprehensive Analysis**: Extracts timestamps, entropy, node information, sequences, and format-specific details\n- **Pipeline Support**: Read from stdin for integration with other tools\n- **Comparison Mode**: Compare timestamps from different format interpretations\n- **Everything Mode**: Show all possible format interpretations\n\n## Installation\n\n### Using go install\n\n```bash\ngo install github.com/zcyc/idinfo@latest\n```\n\n### Build from Source\n\n```bash\ngit clone \u003crepository-url\u003e\ncd idinfo\ngo build -o idinfo .\n```\n\n## Usage\n\n### Basic Usage\n\n```bash\n# Analyze a UUID (using installed binary)\nidinfo 550e8400-e29b-41d4-a716-446655440000\n\n# Analyze a MongoDB ObjectId\nidinfo 507f1f77bcf86cd799439011\n\n# Analyze a ULID\nidinfo 01ARZ3NDEKTSV4RRFFQ69G5FAV\n\n# If you built from source, use ./idinfo instead:\n./idinfo 550e8400-e29b-41d4-a716-446655440000\n```\n\n### Force Specific Format\n\n```bash\n# Parse a number as Twitter Snowflake\nidinfo -f snowflake 1777150623882019211\n\n# Parse as UUID even if it could be something else\nidinfo -f uuid 550e8400-e29b-41d4-a716-446655440000\n```\n\n### Different Output Formats\n\n```bash\n# Short format\nidinfo -o short 507f1f77bcf86cd799439011\n\n# JSON format\nidinfo -o json 550e8400-e29b-41d4-a716-446655440000\n\n# Binary output (useful for further processing)\nidinfo -o binary 550e8400-e29b-41d4-a716-446655440000 | xxd\n```\n\n### Advanced Features\n\n```bash\n# Show all possible format interpretations\nidinfo -e 1777150623882019211\n\n# Compare timestamps from different interpretations\nidinfo --compare 1777150623882019211\n\n# Generate new IDs\nidinfo -g uuid\nidinfo -g snowflake\nidinfo -g nanoid\n\n# Pipeline usage\necho \"550e8400-e29b-41d4-a716-446655440000\" | idinfo -\n```\n\n## Supported ID Formats\n\n### Core Formats\n- **UUID (RFC-9562)**: All versions (1-8), including Nil and Max UUIDs\n- **ULID**: Universally Unique Lexicographically Sortable Identifier\n- **MongoDB ObjectId**: 96-bit ObjectId with timestamp, machine, process, and counter\n- **KSUID**: K-Sortable Unique Identifier with timestamp and payload\n- **Xid**: Globally unique sortable id with timestamp, machine, process, and counter\n\n### Additional Formats\n- **NanoID**: URL-safe unique ID generator\n- **NUID**: NATS Unique Identifier - high-performance 22-character base62 IDs\n- **Snowflake Variants**: Twitter, Discord, Instagram formats\n- **Unix Timestamps**: Seconds, milliseconds, microseconds, nanoseconds\n- **Hex-encoded Hashes**: MD5, SHA-1, SHA-256, SHA-384, SHA-512\n\n### Extended Formats\n- **Base58**: Bitcoin-style base58 encoded IDs (no confusing characters)\n- **Firebase PushID**: Firebase real-time database push IDs\n- **Base32**: RFC 4648 base32 encoded identifiers\n- **Hashids**: Reversible obfuscated numeric IDs\n\n### Platform \u0026 Service IDs\n- **ShortUUID**: 22-character UUID representations\n\n- **Sqids**: Modern Hashids successor with anti-profanity\n- **TypeID**: Type-prefixed ULID format (type_id)\n\n## Output Examples\n\n### Card Format (Default)\n```\n┏━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\n┃ ID Type   │ UUID (RFC-9562)                             ┃\n┃ Version   │ 4 (random)                                  ┃\n┠───────────┼─────────────────────────────────────────────┨\n┃ String    │ 550e8400-e29b-41d4-a716-446655440000        ┃\n┃ Integer   │ 113059749145936325402354257176981405696     ┃\n┃ Base64    │ VQ6EAOKbQdSnFkRmVUQAAA==                    ┃\n┠───────────┼─────────────────────────────────────────────┨\n┃ Size      │ 128 bits                                    ┃\n┃ Entropy   │ 122 bits                                    ┃\n┃ Node 1    │ -                                           ┃\n┃ Node 2    │ -                                           ┃\n┃ Sequence  │ -                                           ┃\n┠───────────┼─────────────────────────────────────────────┨\n┃ 550e 8400 │ 0101 0101 0000 1110 1000 0100 0000 0000     ┃\n┃ e29b 41d4 │ 1110 0010 1001 1011 0100 0001 1101 0100     ┃\n┃ a716 4466 │ 1010 0111 0001 0110 0100 0100 0110 0110     ┃\n┃ 5544 0000 │ 0101 0101 0100 0100 0000 0000 0000 0000     ┃\n┗━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\n```\n\n### JSON Format\n```json\n{\n  \"id_type\": \"UUID (RFC-9562)\",\n  \"version\": \"4 (random)\",\n  \"standard\": \"550e8400-e29b-41d4-a716-446655440000\",\n  \"integer\": \"113059749145936325402354257176981405696\",\n  \"base64\": \"VQ6EAOKbQdSnFkRmVUQAAA==\",\n  \"size\": 128,\n  \"entropy\": 122,\n  \"hex\": \"550e8400e29b41d4a716446655440000\",\n  \"extra\": {\n    \"variant\": \"RFC 4122\"\n  }\n}\n```\n\n### Short Format\n```\nID Type: UUID (RFC-9562), version: 4 (random).\n```\n\n## Command Line Options\n\n### Parsing Options\n- `-f \u003cFORMAT\u003e`: Force parsing as specific format\n- `-o \u003cOUTPUT\u003e`: Output format (card, short, json, binary)\n- `-e`: Show all possible format interpretations\n- `--compare`: Compare timestamps from different format interpretations\n- `--color`: Enable colored output (default: true)\n\n### Generation Options\n- `-g \u003cFORMAT\u003e`: Generate new ID of specified format\n\n### General Options\n- `--help`: Show help message\n\n### Available Force Formats\n- `uuid`, `guid`\n- `ulid`\n- `objectid`, `mongodb`, `bson`\n- `ksuid`\n- `xid`\n- `nanoid`, `nano-id`\n- `snowflake`, `sf`, `sf-twitter`, `sf-discord`, `twitter`, `discord`\n- `unixtime`, `unix`, `timestamp`\n- `hashhex`, `hash`, `hex`\n\n## Architecture\n\nThe tool follows a modular architecture:\n\n```\n├── main.go                 # CLI entry point\n├── internal/\n│   ├── types/             # Common types and interfaces\n│   ├── parsers/           # ID parsers for each format\n│   │   ├── registry.go    # Parser registration and management\n│   │   ├── uuid.go        # UUID parser\n│   │   ├── ulid.go        # ULID parser\n│   │   └── ...            # Other format parsers\n│   └── output/            # Output formatters\n│       └── output.go      # Card, short, JSON, binary formatters\n```\n\nEach parser implements the `IDParser` interface:\n```go\ntype IDParser interface {\n    Name() string\n    CanParse(input string) bool\n    Parse(input string) (*IDInfo, error)\n    Generate() (string, error)  // New: ID generation capability\n}\n```\n\n\n\n\n## License\n\nThis project is licensed under the MIT License.\n\n## Acknowledgments\n\n- Inspired by [uuinfo](https://github.com/Racum/uuinfo)\n- Thanks to the Go community for the excellent ID generation libraries","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzcyc%2Fidinfo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzcyc%2Fidinfo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzcyc%2Fidinfo/lists"}