Skip to main content

Project

Projects describe how the instance tree should look like and how files should be processed along the way!

Project File

Argon projects are JSON files that have the .project.json extension. They have the following fields:

FieldDefaultDescription
name*RequiredThe name of the project, displayed by Argon
tree*RequiredAn Instance Description describing the root instance of the project
hostlocalhostThe host name that Argon server should be running on
port8000The port number that Argon server should be running on
gameId*nullLimit Argon clients to only sync with this project when the game ID matches
placeIds*[]Limit Argon clients to only sync with this project when one of the place IDs matches
ignoreGlobs[]Exclude files that match any of these globs from processing and syncing
syncRules[]Custom set of user-defined Sync Rules that define how files should be processed
syncbacknullSyncback Settings that control how instances are synced back to the file system
legacyScriptstrueUse the legacy script run context

* These fields can be hot-reloaded so you don't need to restart the server to apply changes

Rojo Compatibility

Argon is 100% compatible with Rojo projects with the exception of the placeId field which should be moved to the placeIds array. Although some field names differ from Rojo ones, they work the same way and are interchangeable:

  • serveAddress == host
  • servePort == port
  • servePlaceIds == placeIds
  • globIgnorePaths == ignoreGlobs
  • emitLegacyScripts == legacyScripts

Instance Description

Instance Descriptions correspond to the actual Roblox Instances in the project.

FieldDescription
$classNameThe ClassName of the Instance being described
$pathThe path on the filesystem that should be the source of this instance
$propertiesProperties to apply to the instance
$keepUnknownsWhether instances that Argon doesn't know about should be deleted

All other fields in an Instance Description are turned into instances whose name is the key.

danger

Note that you can't set both $className and $path at the same time!

Sync Rule

Sync Rule allows you to define how specific file should be interpreted and how its name should be mapped to the instance name.

FieldDescription
typeThe type of file this rule applies to, valid options are: Project, InstanceData, ServerScript, ClientScript, ModuleScript, StringValue, LocalizationTable, JsonModule, TomlModule, JsonModel, RbxmModel, RbxmxModel
patternA glob pattern that matches the file path
childPatternA glob pattern that matches folder-contained file path
excludeA list of glob patterns that exclude the file path from this rule
suffixA suffix to stripe from the file path to get the instance name

Syncback Settings

Syncback Settings allow you to control which instances and properties should be synced back to the file system.

SettingDescription
ignoreGlobsExclude files that match any of these globs from processing changes
ignoreNamesExclude instances with these names from processing changes
ignoreClassesExclude instances with these classes from processing changes
ignorePropertiesExclude these properties from being saved to the file system

Example Projects

Example project of a plugin or model:

{
"name": "Plugin",
"ignoreGlobs": ["**/*.spec.lua"],
"tree": {
"$path": "src",
"manifest": {
"$path": "wally.toml"
}
}
}

Example project of a game:

{
"name": "Game",
"port:": 8080,
"gameId": "1234567890",
"tree": {
"$className": "DataModel",

"ReplicatedStorage": {
"$path": "src/Shared",

"Config": {
"$className": "Configuration",
"$keepUnknowns": true,

"StartPos": {
"$className": "Vector3Value",
"$properties": {
"Value": [0, 0, 0]
}
}
}
},

"ServerScriptService": {
"$path": "src/Server"
},

"StarterPlayer": {
"$properties": {
"CharacterWalkSpeed": 24
},

"StarterPlayerScripts": {
"$path": "src/Client"
}
}
}
}

This page is based on Rojo's Project Format as Argon has very similar project structure.