| Crates.io | asphalt |
| lib.rs | asphalt |
| version | 1.1.0 |
| created_at | 2024-03-07 11:34:41.65658+00 |
| updated_at | 2025-09-13 16:12:38.63143+00 |
| description | Upload and reference Roblox assets in code |
| homepage | https://github.com/jacktabscode/asphalt |
| repository | https://github.com/jacktabscode/asphalt |
| max_upload_size | |
| id | 1165865 |
| size | 191,742 |
Asphalt is a command line tool used to upload assets to Roblox and easily reference them in code. It's a modern alternative to Tarmac.
mise use ubi:jacktabscode/asphalt
cargo install asphalt
pesde add --dev pesde/asphalt --target lune
rokit add jacktabscode/asphalt
brew tap jacktabscode/tap
brew install asphalt
asphalt syncSyncs all of your assets defined in your inputs.
There are three targets you can use to sync assets:
cloud: Uploads your assets to Roblox. This will generate a asphalt.lock.toml file which you should commit to source control. This is the default target.
studio: Syncs assets locally to Roblox Studio. This is useful for testing assets in Studio before uploading them to Roblox.
debug: Syncs assets to an .asphalt-debug folder in the current directory. You can use this option see how Asphalt will process your files.
asphalt sync # Equivalent to --target cloud
asphalt sync --target studio
asphalt sync --target debug
You can also perform a dry run to verify which assets will be synced. This exits with a non-zero status code if any asset hashes have changed. You can use this for CI checks to ensure that your assets are up-to-date.
asphalt sync --dry-run
asphalt migrate-lockfileWill migrate your lockfile to the newest format, if there is one. See asphalt migrate-lockfile --help for more information.
asphalt uploadUploads a single asset to Roblox. See asphalt upload --help for more information.
Asphalt is configured with a project file called asphalt.toml. It is required for the program to run.
[creator]
type = "user"
id = 9670971
[codegen]
typescript = true
style = "flat"
[inputs.assets]
path = "assets/**/*"
output_path = "src/shared"
[inputs.assets.web]
"some_sound_on_roblox.ogg" = { id = 123456789 }
"some_image_on_roblox.png" = { id = 987654321 }
creator: Creator
codegen: Codegen (optional)
inputs: map<string, Input>
type: "user" or "group"id: numbertypescript: boolean (optional)
style: "flat" | "nested" (optional)
flat, which makes accessing assets feel like writing file paths. You may consider using nested if you are not a TypeScript user, however, as Luau does not support template literal types.strip_extensions: boolean (optional)
false for the same reason described above.content: boolean (optional)
Content instead of strings. Defaults to false.path: glob
output_path: string
web: map<string, WebAsset>
bleed: boolean (optional)
true. Keep in mind that changing this setting won't invalidate your lockfile or reupload your images.warn_each_duplicate: boolean (optional)
true.id: numberThe formatting of code generation (such as spaces, tabs, width, and semicolons) is not guaranteed by Asphalt and may change between releases without being noted as a breaking change.
Therefore, it is recommended to add Asphalt's generated files to your linter/formatter's "ignore" list. Here are instructions for the most commonly used tools:
You can specify this using the --api-key argument, or the ASPHALT_API_KEY environment variable.
You can get one from the Creator Dashboard.
The following permissions are required:
asset:readasset:writeMake sure that you select an appropriate IP and that your API key is under the Creator (user, or group) that you've defined in asphalt.toml.
Your cookie will be pulled from your ROBLOSECURITY environment variable. If not present, it be automatically detected from the current Roblox Studio installation.
You will probably want to disable Session Protection if you are using Asphalt in an environment where your IP address changes frequently, but we don't recommend this on your main Roblox account, as it makes your account less secure.
[!WARNING] This feature uses a private Studio API, so this feature may break without warning.
Asphalt expects a single KeyframeSequence to be saved as either a .rbxm or .rbxmx file.
When uploading videos, you must provide the --expected-price argument, which is the price you expect to be charged for the video. See the Roblox documentation on Videos for more details.
Asphalt supports uploading .fbx files purely out of ease, but Roblox does not offer control over the import settings through the web API. As such, this is not a feature that most developers use.
We instead recommend uploading your models with the 3D Importer in Studio, which provides a 3D preview, error checking, and customizable settings. You can then use a tool like Rojo to build them into your project.
Thank you to Tarmac for the alpha bleeding implementation, which was used in this project.