Skip to content

Configuration Reference

Tungsten is configured through a tungsten.toml file in your project’s root directory. Run tungsten init to generate one, or create it manually.

[creator]
type = "user"
id = 12345678

[codegen]
style = "nested"
strip_extension = true
ts_declaration = true

# Example: UI Icons
[inputs.icons]
path = "assets/icons/**/*"
output_path = "src/Icons.luau"
packable = true
svg_scale = 2.0

# Example: Large backgrounds
[inputs.backgrounds]
path = "assets/backgrounds/**/*"
output_path = "src/Backgrounds.luau"
packable = false

# Large backgrounds mean a lot of data, so...
# ...compress them!
[inputs.backgrounds.compress_options]
jpeg_quality = 75
png_quality = 50
keep_metadata = false

# Example: Audio and Models
[inputs.audio]
path = "assets/audio/**/*"
output_path = "src/Audio.luau"

[inputs.models]
path = "assets/models/**/*"
output_path = "src/Models.luau"

Defines which Roblox account or group assets are uploaded under.

FieldTypeDescription
type"user" or "group"Whether to upload under a user or a group, defaults to "user".
idnumberThe Roblox user or group ID to upload under.

Controls how Tungsten generates your Luau output files.

FieldTypeDescription
style"flat" or "nested"The structure of the generated Luau table, defaults to "flat".
strip_extensionbooleanWhether to strip the file extension from asset keys, defaults to false.
ts_declarationbooleanWhether to generate a TypeScript definition file, defaults to false.

Defines a set of assets to sync. You can define as many input blocks as you need — each one is identified by its name (e.g. [inputs.packed_assets]).

FieldTypeDescription
pathstringA glob pattern pointing to the assets to sync.
output_pathstringWhere Tungsten writes the generated Luau file.
packablebooleanWhether to pack matched assets into a spritesheet before uploading.
svg_scalenumber(Optional) Multiplier for SVG rasterization, defaults to 1.0.

Enables and configures image optimization for a specific input group. When this table is present, Tungsten uses libcaesium to reduce the file size of your images before they are uploaded to Roblox.

FieldTypeDescription
jpeg_qualitynumberQuality of the JPEG image (0-100), defaults to 80.
png_qualitynumberQuality of the PNG image (0-100), defaults to 80.
keep_metadatabooleanWhether to keep metadata in the compressed image, defaults to true.