{"id":22731734,"url":"https://github.com/fenhl/melt","last_synced_at":"2025-07-17T23:32:44.866Z","repository":{"id":148504073,"uuid":"146021818","full_name":"fenhl/melt","owner":"fenhl","description":"A command-line tool for working with Twitter/Discord snowflake IDs","archived":false,"fork":false,"pushed_at":"2025-06-22T14:02:03.000Z","size":95,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-22T14:40:47.625Z","etag":null,"topics":["cli","snowflake-twitter"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fenhl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2018-08-24T17:39:00.000Z","updated_at":"2025-06-22T13:56:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"6c856db8-b552-4351-ad57-bf35b473dc3f","html_url":"https://github.com/fenhl/melt","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/fenhl/melt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fenhl%2Fmelt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fenhl%2Fmelt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fenhl%2Fmelt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fenhl%2Fmelt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fenhl","download_url":"https://codeload.github.com/fenhl/melt/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fenhl%2Fmelt/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265678527,"owners_count":23810114,"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","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":["cli","snowflake-twitter"],"created_at":"2024-12-10T19:30:13.321Z","updated_at":"2025-07-17T23:32:44.851Z","avatar_url":"https://github.com/fenhl.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# What is `melt`?\n\n`melt` is a command-line utility for working with [snowflake identifiers](https://en.wikipedia.org/wiki/Snowflake_ID), as used by Twitter and Discord.\n\n# What are snowflakes?\n\nA snowflake is a number used to uniquely identify a piece of data. Twitter uses it for tweets, e.g. the `1212702693736767490` in \u003chttps://twitter.com/qntm/status/1212702693736767490\u003e is a snowflake. Discord uses it for pretty much everything: users, servers, channels, messages, roles… You can access these snowflakes by going into your Advanced settings, enabling Developer Mode, then right-clicking on something to select Copy ID. Originally specified in [this document](https://github.com/twitter-archive/snowflake/blob/b3f6a3c6ca8e1b6847baa6ff42bf72201e2c2231/README.mkd), they have been used by Twitter since 2010 and by Discord since the beginning. Instagram uses a format that's based on snowflakes but slightly different, and is not supported by `melt`.\n\nA snowflake consists of 4 pieces of information: Timestamp, data center ID, worker ID, and sequence number. The interesting one is the timestamp: a representation of the date and time when the snowflake was generated, exact to the millisecond. This means that the time it was created (and thus the approximate time the tweet was sent, the Discord server was created, etc.) can be calculated from the snowflake itself. This is called melting the snowflake.\n\n# Installation\n\nPlease see the install instructions for your operating system:\n\n* [Windows](https://github.com/fenhl/melt/blob/main/assets/doc/install-windows.md)\n\nIf your operating system is not listed here, or if you would like to manage updates of `melt` using [`cargo-update`](https://crates.io/crates/cargo-update), follow [the instructions for building from source](https://github.com/fenhl/melt/blob/main/assets/doc/build.md).\n\n# Usage\n\nBy default, `melt` takes Twitter snowflakes from stdin, one per line, and converts them into UNIX timestamps with milliseconds:\n\n```sh\n$ echo 1212702693736767490 | melt\n1577965827.770\n```\n\nSnowflakes can also be passed as command-line arguments:\n\n```sh\n$ melt 1212702693736767490\n1577965827.770\n```\n\nThe `--format` (or `-f`) flag can be used to modify the output format, as [defined by `chrono`](https://docs.rs/chrono/0.4/chrono/format/strftime/index.html). Additionally, the formatting directives `%^d`, `%^w`, and `%^s` may be used to include the data center ID, worker ID, or sequence number, respectively.\n\n```sh\n$ echo 1212702693736767490 | melt -f '%d.%m.%Y %H:%M:%S'\n02.01.2020 11:50:27\n```\n\nThe flag `-H` is a shorthand and specifies a format of `%Y-%m-%d %H:%M:%S`:\n\n```sh\n$ echo 1212702693736767490 | melt -H\n2020-01-02 11:50:27\n```\n\nSimilarly, the flag `-T` is a shorthand and specifies a format of `%+` (the ISO 8601 / RFC 3339 date \u0026 time format):\n\n```sh\n$ echo 1212702693736767490 | melt -T\n2020-01-02T11:50:27.770+00:00\n```\n\nThe `--timezone` (or `-z`) flag can be used to change the timezone in which formatted times are displayed. The timezone must be given as a name from [the Olson timezone database](https://en.wikipedia.org/wiki/Tz_database). By default, UTC is used. This flag has no effect on UNIX timestamps (i.e. when none of `-f`, `--format`, `-H` are specified), which are always in UTC.\n\n```sh\n$ echo 1212702693736767490 | melt -f '%d.%m.%Y %H:%M:%S' -z Europe/Berlin\n02.01.2020 12:50:27\n```\n\nThe `--epoch` (or `-e`) flag can be used to change the epoch from Twitter's default to Discord's:\n\n```sh\n$ echo 86841168427495424 | melt -e discord\n1309539522.641\n```\n\nA different epoch, given as a UNIX timestamp, may also be specified:\n\n```sh\n$ echo 0 | melt -e 0\n0\n```\n\nThe `--discord-format` (or `-d`) flag can be used to format the times using [Discord's timestamp syntax](https://discord.com/developers/docs/reference#message-formatting), which can be pasted into a Discord message to get human-readable timestamps. Possible values are `d` (or  `short-date`), `D` (or `long-date`), `t` (or `short-time`), `T` (or `long-time`), `f` (or `short-date-time`), `F` (or `long-date-time`), and `R` (or `relative`). Using this flag implies `--epoch=discord` and disables the `--timezone` parameter, since Discord will display the times in the system timezone of the viewer.\n\n```sh\n$ echo 86841168427495424 | melt -dF\n\u003ct:1440774947:F\u003e\n```\n\n(When sent as a message, my Discord app displays the above as `Friday, 28 August 2015 15:15`. The exact format may vary depending on your locale.)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffenhl%2Fmelt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffenhl%2Fmelt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffenhl%2Fmelt/lists"}