{"id":22006628,"url":"https://github.com/neoforged/autorenamingtool","last_synced_at":"2025-10-08T14:22:50.011Z","repository":{"id":180830679,"uuid":"664774560","full_name":"neoforged/AutoRenamingTool","owner":"neoforged","description":"Remapper/renamer of JAR files, with extensibility for other transformations","archived":false,"fork":false,"pushed_at":"2024-12-11T19:00:40.000Z","size":286,"stargazers_count":4,"open_issues_count":4,"forks_count":7,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-05-04T03:24:50.312Z","etag":null,"topics":["java-library","remapper"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-2.1","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/neoforged.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},"funding":{"github":"neoforged","open_collective":"neoforged"}},"created_at":"2023-07-10T18:06:50.000Z","updated_at":"2025-01-09T05:54:47.000Z","dependencies_parsed_at":"2023-07-13T02:36:34.457Z","dependency_job_id":"11f2eee7-1eee-41bc-90e4-c300ef6629ac","html_url":"https://github.com/neoforged/AutoRenamingTool","commit_stats":{"total_commits":55,"total_committers":14,"mean_commits":"3.9285714285714284","dds":0.7636363636363637,"last_synced_commit":"d363160cbe1d41036b46fcd676d6a5e71b504656"},"previous_names":["neoforged/autorenamingtool"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neoforged%2FAutoRenamingTool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neoforged%2FAutoRenamingTool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neoforged%2FAutoRenamingTool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neoforged%2FAutoRenamingTool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/neoforged","download_url":"https://codeload.github.com/neoforged/AutoRenamingTool/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252589381,"owners_count":21772855,"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":["java-library","remapper"],"created_at":"2024-11-30T01:13:28.877Z","updated_at":"2025-10-08T14:22:44.978Z","avatar_url":"https://github.com/neoforged.png","language":"Java","funding_links":["https://github.com/sponsors/neoforged","https://opencollective.com/neoforged"],"categories":[],"sub_categories":[],"readme":"# AutoRenamingTool\n\n**AutoRenamingTool**, or **ART**, is a tool for remapping/renaming the contents of a JAR file, with extensibility for\napplying other transformations, both built-in and user-provided.\n\nThis is the NeoForged successor\nto [ForgeAutoRenamingTool or FART](https://github.com/MinecraftForge/ForgeAutoRenamingTool).\n\n## Usage\n\nThis tool is available from NeoForged's Maven repository ([maven.neoforged.net][art_maven]), at the Maven coordinates\n`net.neoforged:AutoRenamingTool`. Check the Maven repository for the latest versions.\n\nFor ordinary command-line usage, use the `all`-classified artifact, which contains all of ART's dependencies shaded in.\n\nThe following are the core command-line options (options are optional unless otherwise specified):\n\n- `--input \u003cpath\u003e` - Path to the input JAR file; **required**\n- `--output \u003cpath\u003e` - Path to the output JAR file; if not present, then the input JAR file is _overwritten_ with the\n  output\n- `--map \u003cpath\u003e`/`--names \u003cpath\u003e` - Path to the mappings file, which may be of any format supported\n  by [SrgUtils][srgutils]. Can be specified multiple times. If more than one mappings file is specified, the rest will\n  be merged with the first one sequentially, only using the first entry for any duplicates across all files.\n- `--reverse` - When present, any provided mappings are first reversed (`A -\u003e B` becomes `B -\u003e A`) before its\n  application\n- `--log \u003cpath\u003e` - Path to an output file for logging; if not present, then logging is directed to the\n  console (`System.out`)\n- `--lib \u003cpath\u003e`/`-e \u003cpath` - Path to a library JAR file, used for inheritance calculations\n- `--threads \u003cnum\u003e` - The amount of threads to use for parallel processing; if not present, defaults to the amount of\n  processors\n\nCommand-line options are also provided for various additional built-in transformations included by ART.\n\n### Built-in transformation\n\nART provides certain additional built-in transformations, which are useful in correcting issues in the original code\n(commonly those made by [ProGuard][proguard]) or cleaning up certain attributes or bytecode. The following are\ncommand-line options for controlling these transformations.\n\n- `--ann-fix` - Fixes parameter annotation offsets in constructors with synthetic parameters caused by ProGuard\n\n  In ProGuard versions older than 6.1, the parameter annotations attributes are erroneously modified for\n  constructors which have synthetic parameters, such as enum constructors or constructors for inner (non-static)\n  classes. This caused parameter annotations on source-declared parameters to be 'shifted' towards those synthetic\n  parameters.\n\n  For example, given an enum constructor of `EnumValue(String name, int ordinal, @Nonnegative short a, short b,\n  @Nullable Object c)` (where the `String` and `int` parameters are synthetic ones inserted by the compiler for\n  enums), this issue would cause the constructor to be effectively written out by ProGuard as `EnumValue(@Nonnegative\n  String name, int ordinal, @Nullable short a, short b, Object c)` -- the parameter annotations are shifted over by two\n  places, corresponding to the two synthetic parameters.\n\n  By enabling this option, ART will detect constructors for enums and inner classes, and fix the problem if it exists.\n\n- `--record-fix` - Fixes certain record issues done by ProGuard\n\n  Certain issues may occur with records when processed by ProGuard:\n\n    - For ProGuard versions older than 7.4, the [`Record` attribute][record_attr] is erroneously removed for empty\n      records (records with zero components).\n    - ProGuard may accidentally raise the visibility of record fields from `private`.\n\n  By enabling this option, ART will detect and fix raised-visibility record fields and missing `Record` attributes for\n  empty records.\n\n- `--ids-fix [config]` - Renames source-invalid local variable identifiers\n\n  This option configures a transformer to fix source-invalid local variable identifiers by renaming them to an\n  autogenerated name.\n\n  The optional parameter may be of two values:\n\n    - `ALL` _(default)_ - All source-invalid local variable identifiers are renamed.\n    - `SNOWMEN` - Only local variable identifiers beginning with the snowman character (U+2603, `☃`), which was used for\n      Minecraft versions since ~1.8 up to 1.17.\n\n- `--src-fix [config]` - Renames source file names according to configured parameter\n\n  This option configures a transformer to rename the source file name stored in the [`SourceFile`\n  attributes][sourcefile_attr], according to a renaming strategy configured by an optional parameter.\n\n  The optional parameter may be of one value (more values may be added in the future by public contributions):\n\n    - `JAVA` _(default)_ - Source files get the name of the outermost class (even for inner/nested classes)\n\n- `--strip-sigs [config]`\n\n  This option configures a transformer to remove certain signature files and signature manifest entries from a\n  [signed JAR][signed_jar].\n\n  The optional parameter may be of one value (more values may be added in the future by public contributions):\n\n    - `ALL` _(default)_ - All signature files and manifest entries are removed.\n\n- `--ff-line-numbers \u003cpath\u003e` - Remaps source line numbers using [ForgeFlower][forgeflower] line mapping information\n\n  This option configures a transformer to remap the line numbers in the bytecode according to the line mapping\n  information stored in a source JAR created by the ForgeFlower decompiler and derivatives (specified by the required\n  parameter to this option). This allows compiled JARs to have matching line numbers with the decompiled source JAR\n  emitted by ForgeFlower.\n\n  The line mapping information is stored in the 'extra' field of the file header of each source file, as a header with\n  ID of `0x4646`, or `FF` in text form. After the ID and length of the header, the data is structured as follows:\n\n    - The code version of the line mapping information, which is `1` as of writing (any newer code version will cause an\n      exception), stored as a byte;\n    - 0 or more line mapping entries, stored as four bytes: two bytes for the original line number, and two bytes for\n      the new line number. The amount of line mapping entries can be calculated based off the length of the header (in\n      bytes): `(length - 1) / 4` (1 byte for the code version, 4 bytes for each entry).\n\n  A line number is remapped according to the line mapping entry whose original line number is equal or greater than that\n  line number. Classes which lack corresponding line mapping information will not have their line numbers modified.\n\n- `--disable-abstract-param` - Disables writing out abstract parameter naming information file to the output JAR\n\n  Ordinarily, `abstract` (and `native`) methods do not store the names of their parameters, because the\n  [`LocalVariableTable` attribute][lvt_attr] is only written out for code-bearing methods and the [`MethodParameters`\n  attribute][methodparams_attr] is only written out when the compiler is configured to do so with `-parameters`.\n\n  To allow for other programs, particularly the ForgeFlower decompiler and derivatives, to provide parameter names\n  for `abstract` methods, ART includes the `fernflower_abstract_parameter_names.txt` file in the root directory of the\n  output JAR, which contains the parameter names of `abstract` methods which have at least one parameter. (If the file\n  would be empty because there are no matching methods, then the file is not written out.)\n\n  The file is formatted such that each line contains one method, which is a space-separated list containing the\n  following: the class name, the method name, the method descriptor, and the names of parameters separated by spaces.\n\n  Because the parameter names are not present in the bytecode, the parameter names are synthesized in the format of\n  `var#`, where `#` is the local variable slot of the parameter. The parameter names are also remapped before being\n  stored in the file.\n\n  This option disables this feature, preventing the `fernflower_abstract_parameter_names.txt` from being written by ART.\n\n- `--unfinal-params`\n  \n  Removes the final attribute from method parameters.\n\n## License\n\nART is licensed under the GNU Lesser General Public License, version 2.1. See the `LICENSE` file for the full license.\n\n[art_maven]: https://maven.neoforged.net/#/releases/net/neoforged/AutoRenamingTool\n\n[srgutils]: https://github.com/neoforged/SrgUtils\n\n[proguard]: https://www.guardsquare.com/proguard\n\n[record_attr]: https://docs.oracle.com/javase/specs/jvms/se21/html/jvms-4.html#jvms-4.7.30\n\n[sourcefile_attr]: https://docs.oracle.com/javase/specs/jvms/se21/html/jvms-4.html#jvms-4.7.10\n\n[signed_jar]: https://docs.oracle.com/en/java/javase/21/docs/specs/jar/jar.html#signed-jar-file\n\n[forgeflower]: https://github.com/MinecraftForge/ForgeFlower\n\n[lvt_attr]: https://docs.oracle.com/javase/specs/jvms/se21/html/jvms-4.html#jvms-4.7.13\n\n[methodparams_attr]: https://docs.oracle.com/javase/specs/jvms/se21/html/jvms-4.html#jvms-4.7.24\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneoforged%2Fautorenamingtool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fneoforged%2Fautorenamingtool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneoforged%2Fautorenamingtool/lists"}