{"id":37732517,"url":"https://github.com/dirkdigglerz/dirk_lib","last_synced_at":"2026-05-15T02:21:39.540Z","repository":{"id":253169210,"uuid":"796032872","full_name":"DirkDigglerz/dirk_lib","owner":"DirkDigglerz","description":"A collection of utils, bridging and more designed to make it easier for script creation within the FiveM platform.","archived":false,"fork":false,"pushed_at":"2026-04-25T18:35:23.000Z","size":2034,"stargazers_count":17,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-25T20:33:03.137Z","etag":null,"topics":["dirkscripts","fivem","gta5","library"],"latest_commit_sha":null,"homepage":"https://dirkscripts.gitbook.io/dirkscripts-documentation/resources/dirk-lib","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DirkDigglerz.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-05-04T18:22:26.000Z","updated_at":"2026-04-25T18:35:25.000Z","dependencies_parsed_at":"2024-08-14T23:46:38.220Z","dependency_job_id":"1e7a038e-5353-4374-a20a-592e9786c02a","html_url":"https://github.com/DirkDigglerz/dirk_lib","commit_stats":null,"previous_names":["clean-server-pack/clean_lib","clean-server-pack/dirk_lib"],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/DirkDigglerz/dirk_lib","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DirkDigglerz%2Fdirk_lib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DirkDigglerz%2Fdirk_lib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DirkDigglerz%2Fdirk_lib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DirkDigglerz%2Fdirk_lib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DirkDigglerz","download_url":"https://codeload.github.com/DirkDigglerz/dirk_lib/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DirkDigglerz%2Fdirk_lib/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32522252,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-02T01:12:54.858Z","status":"online","status_checked_at":"2026-05-02T02:00:05.923Z","response_time":132,"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":["dirkscripts","fivem","gta5","library"],"created_at":"2026-01-16T13:52:57.112Z","updated_at":"2026-05-02T04:01:18.608Z","avatar_url":"https://github.com/DirkDigglerz.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# DIRK LIB\nA useful library for script developement, includes all the standards set by ox_lib and improves on them with support for multiple types of target, inventory, framework, vehicle keys and more. \n\n[📖Documentation](https://docs.dirkscripts.com/welcome)\n[🦜Discord](https://discord.gg/dirkscripts)\n# Convars\n```properties\n\n# The theme below will apply to all UI created by DirkScripts utilising the lib themes. \n# Theme starts at 0 and goes to 9 \n# 0 is the lightest color and 9 is the darkest\n# You can set the primary color to custom and set the customTheme to your own colors\n# Use this generator in order to make your own custom color palettes https://mantine.dev/colors-generator/?color=7b36b5 \n# Default mantine colors can be found here https://mantine.dev/theming/colors/#default-colors\nsetr dirk_lib:primaryColor dirk # Set to custom to use customTheme\nsetr dirk_lib:primaryShade 9 # 0-9\nsetr dirk_lib:customTheme [\n  \"#e5f8ff\",\n  \"#d0ecff\",\n  \"#a0d7fc\",\n  \"#6dc1fa\",\n  \"#47aef9\",\n  \"#32a2f9\",\n  \"#259cfa\",\n  \"#1888df\",\n  \"#0179c8\",\n  \"#0068b1\"\n]\n\n\nsetr dirk_lib:language en\nsetr dirk_lib:debug true\nsetr dirk_lib:currency $\nsetr dirk_lib:serverName DirkRP\nsetr dirk_lib:logo https://via.placeholder.com/150\n\n# Configure the resources you want to use\nsetr dirk_lib:framework qbx_core\nsetr dirk_lib:inventory dirk_inventory\nsetr dirk_lib:itemImgPath nui://dirk_inventory/web/images/\nsetr dirk_lib:primaryIdentifier license\nsetr dirk_lib:target ox_target\nsetr dirk_lib:interact sleepless_interact\nsetr dirk_lib:time dirk_weather\nsetr dirk_lib:phone lb-phone\n\nsetr dirk_lib:keys dirk_keys\nsetr dirk_lib:garage dirk_vehicles\nsetr dirk_lib:fuel dirk_fuel\n\n\nsetr dirk_lib:ambulance dirk_ambulance\nsetr dirk_lib:prison dirk_prison\nsetr dirk_lib:dispatch dirk_dispatch\n\n\n# NOTIFICATIONS\nsetr dirk_lib:notify dirk_lib\nsetr dirk_lib:notifyPosition top-right\nsetr dirk_lib:notifyAudio true\n\n# Context Menu \nsetr dirk_lib:contextMenu dirk_lib\nsetr dirk_lib:contextClickSounds true\nsetr dirk_lib:contextHoverSounds true\n\n# Dialog\nsetr dirk_lib:dialog dirk_lib\nsetr dirk_lib:dialogClickSounds true\nsetr dirk_lib:dialogHoverSounds true\n\n# showTextUI \nsetr dirk_lib:showTextUI dirk_lib\nsetr dirk_lib:showTextPosition bottom-center\n\n# progressBar \nsetr dirk_lib:progress dirk_lib\nsetr dirk_lib:progBarPosition bottom-center\n\n# Groups \nsetr dirk_groups:maxMembers 5\nsetr dirk_groups:maxDistanceInvite 5\nsetr dirk_groups:inviteValidTime 5\nsetr dirk_groups:maxLogOffTime 5\n\n\n```\n\n## Hot-reloading settings in consumer resources\n\n`lib.onSettings(key | keys, cb, options?)` fires whenever the named keys on\n`lib.settings` change. Works across resources: dirk_lib broadcasts every\nscriptConfig change, consumers mutate their local `lib.settings` in place and\nforward the patch to their NUI as `UPDATE_DIRK_LIB_SETTINGS` (handled by\n`DirkProvider` in `dirk-cfx-react \u003e= 1.1.63`).\n\n```lua\nlib.onSettings('currency', function(new, old)\n  print(('currency: %s -\u003e %s'):format(old.currency, new.currency))\nend)\n\nlib.onSettings({ 'primaryColor', 'primaryShade' }, function(new)\n  refreshHud(new.primaryColor, new.primaryShade)\nend, { immediate = true }) -- fire once with current values\n```\n\n### IMPORTANT: we mutate `lib.settings` IN PLACE\n\nDo not replace `lib.settings` or any of its subtables with a new reference —\nother files capture subtable references at load time (e.g.\n`local groups = lib.settings.groups`) and a fresh reference leaves those\ncaptures pointing at stale data. `src/onSettings.lua` wipes + refills existing\ntables instead of swapping them; match that pattern if you add new code that\nwrites to `lib.settings`.\n\n### API-sync between the two lib definitions\n\nAnything added to the public `init.lua` `lib` table that dirk_lib's own\nmodules rely on must also exist in `src/init.lua`'s `lib` definition (e.g.\n`lib.onCache`). Both are loaded in different VMs but share module code, so a\nmissing field in `src/init.lua` crashes dirk_lib mid-module-load.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdirkdigglerz%2Fdirk_lib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdirkdigglerz%2Fdirk_lib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdirkdigglerz%2Fdirk_lib/lists"}