If you like or use this application, please consider supporting by starring the repo and checking out my other resources.
FiveM Artifact Updater is an application created with Node.JS to easily and quickly install/update your artifacts with the click of a button. No more are the days of needing to manually navigate to the Artifacts Site, download whatever version, unzip and replace your files. This tool does all that for you, and more with config file to tune it to your liking, as well as support for replacing all config file items with command line arguments for on the fly usage. It will also clean up after itself afterwards!
- Ability to install the latest, recommended, newest, or critical FiveM builds with a single click
- Ability to use custom command line arguments to adjust install on a case by case basis
FiveM Artifact Updater requires Node.js to run.
- Install Node.JS. May require a computer restart.
- Place the
FiveMArtifactUpdater
folder in the same directory as yourtxData
andartifacts
folders - Run
InstallDependencies.bat
ornpm install
in the install directory
After installing the dependencies you can use the application.
- Navigate to the
config.json
and verify theartifactsDirectory
value matches the folder name of the artifacts folder your server is using. By default this isartifacts
. This application's folder should be in the same directory as yourtxData
andartifacts
folders. - Verify the
downloadType
in theconfig.json
is what you want. Supported options are below - Run the
UpdateArtifacts.bat
and follow the prompts
You can edit the UpdateArtifacts.bat
file and add as many command line arguments like below:
node index.js -allowPrompt false
This works for any and all keys in the config.json
:
- artifactsURL
<url>
| URL to webscrape from - artifactsDirectory
<directoryName>
| Directory to place the unzipped artifacts - downloadType
<type>
| Which dynamic build to pull. Supportslatest
for the newest build,optional
for the optional build, andrecommended
for the recommended build, andcritical
for whatever thats for - verbose
<true/false>
| Show more console logging - allowPrompt
<true/false>
| Prompt the user for input before starting and doing important things
{
"artifactsURL": "https://runtime.fivem.net/artifacts/fivem/build_server_windows/master",
"artifactsDirectory": "../artifacts/",
"zipDirectory": "./artifacts-zipped/",
"downloadType": "latest",
"verbose": false,
"allowPrompt": true
}
- Node.JS - evented I/O for the backend
This was a great personal project not only for my use case (needing to easily and quickly update my servers artifacts), but also to spend more time learning Javascript and some new Node.JS modules. Here is what it does:
- Request - Use a get request to the cfx changelog api endpoint to get the url for the artifact build we want
- Download New Artifacts - Using
axios
we download theserver.zip
from the request url - Delete Current Artifacts - If they exist, we use
fs
to delete the current artifacts - Extract
server.zip - Using
node-stream-zipwe extract the
server.zip` files into our artifacts folder - Cleanup - Using
fs
we delete everything we downloaded
Want to contribute? Great!
This is an application for competant people who can follow directions. If you know what you're doing and are encountering issues, use the Issues and Pull Request section appropriately.
No longer uses webscraping at all, now uses the cfx changelog api endpoint. This endpoint has the artifacts bundled as a .zip instead of .7z as well, which allowed for lowering the package size by over 92% (1.53mb instead of 21.8mb).
- Refactored codebase, use new system for getting artifacts url, downloading, and extracting
- Removed webscrape dependency
- Removed html parser dependency
- Removed https dependency
- Removed 7zip-bin and node-7z dependencies (bulk of disk size change)
- Moved download from https to axios
- Removed buildSpecific option as the new method does not support it. Use v1.0.0 if you really need it.
- 50% less lines, 28% less characters
- Initial Release
- Linux support?