> For the complete documentation index, see [llms.txt](https://puck.gitbook.io/modding/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://puck.gitbook.io/modding/publishing/steamcmd.md).

# SteamCMD

[SteamCMD](https://developer.valvesoftware.com/wiki/SteamCMD) is a command-line version of the Steam client. Amongst many things, it's most often used to push content to or pull content directly from Steam. This includes publishing games, uploading game files, downloading dedicated server executables and in our case, uploading content to the Steam Workshop.

1. Installation of SteamCMD highly depends on the host platform you use. Official documentation is extensive and offers steps to get SteamCMD installed for either [Windows](https://developer.valvesoftware.com/wiki/SteamCMD#_Windows), [Linux](https://developer.valvesoftware.com/wiki/SteamCMD#_Linux) or [macOS](https://developer.valvesoftware.com/wiki/SteamCMD#_macOS).
2. Once you have the SteamCMD downloaded, extract the `steamcmd.exe` to a new empty folder.<br>

   <figure><img src="https://2911841908-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8ZDIsNKdEz0IT73wepog%2Fuploads%2FTHYGIilL4oK6BnnHPeUo%2Fimage.png?alt=media&amp;token=5d15af88-f86c-4d62-9b99-d2535e6367f5" alt=""><figcaption></figcaption></figure>
3. Run the executable and let the application go through its update process.<br>

   <figure><img src="https://2911841908-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8ZDIsNKdEz0IT73wepog%2Fuploads%2FmRYO5uSJE41bzjYIDfS4%2Fimage.png?alt=media&amp;token=5b879560-ff53-4ec6-acdd-06b4e11fc5c2" alt=""><figcaption></figcaption></figure>
4. Now that we have our SteamCMD installed and ready, create a new folder.\
   \
   Within this folder, we will need a sub-folder (content) containing our mod content, a mod preview image and an `upload.vdf` file that will tell Steam what we are uploading and which application we are targeting.<br>

   <figure><img src="https://2911841908-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8ZDIsNKdEz0IT73wepog%2Fuploads%2Fbdptq1o0hkuPy0gGNPm1%2Fimage.png?alt=media&amp;token=698b6f10-59a5-4e05-bcb7-859277da1951" alt=""><figcaption></figcaption></figure>

   <figure><img src="https://2911841908-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8ZDIsNKdEz0IT73wepog%2Fuploads%2Freu9WGUIm0PiMPPKH6hM%2Fimage.png?alt=media&amp;token=8b9ded91-87d3-449f-a7cd-568a9af33298" alt=""><figcaption></figcaption></figure>
5. The contents of `upload.vdf` should be as follows:<br>

   ```
   "workshopitem"
   {
       "appid"             "2994020"
       "publishedfileid"   ""
       "contentfolder"     "C:\Users\user\Desktop\MyPuckMod\content"
       "previewfile"       "C:\Users\user\Desktop\MyPuckMod\preview.png"
       "visibility"        "0"
       "title"             "My Puck Mod"
       "description"       "This is a sample mod for [b]Puck[/b]!"
       "changenote"        "v1.0"
   }
   ```

   \
   `appid` should be left with the value of `2994020`, since this is the unique identifier for Puck on Steam. All other fields should be filled in based on your own needs. `publishedfileid` should be left empty, since we are creating a new Steam Workshop item.

   <div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p>Use absolute paths for both <code>contentfolder</code> and <code>previewfile</code></p></div>
6. Launch `steamcmd.exe` again. We will be entering a `login` command first to log into your Steam account.<br>

   ```
   login YOUR_STEAM_USERNAME
   ```

   \
   Replace `YOUR_STEAM_USERNAME` with the same username you use for logging into Steam Client and execute the command. Steam might ask for your password and if you have Steam Guard set up, it will additionally ask for confirmation from that too. Just follow the instructions in the terminal.

   <figure><img src="https://2911841908-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8ZDIsNKdEz0IT73wepog%2Fuploads%2FvVMsp4s9CGyXD5eqsiak%2Fimage.png?alt=media&amp;token=c7a343ce-d2ef-4003-9702-6c71f457e8e9" alt=""><figcaption></figcaption></figure>
7. Once we are logged in, we can point SteamCMD to our `upload.vdf` file.<br>

   ```
   workshop_build_item ABSOLUTE_PATH_TO_UPLOAD_VDF
   ```

   \
   Replace `ABSOLUTE_PATH_TO_UPLOAD_VDF` with an absolute path to `upload.vdf` we created earlier. Execute the command and wait for SteamCMD to upload your mod to the Workshop.<br>

   <figure><img src="https://2911841908-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8ZDIsNKdEz0IT73wepog%2Fuploads%2FDyGlRLGOklj4fgeHrCgf%2Fimage.png?alt=media&amp;token=2ccadc7f-a837-42d6-bdbb-408aef017524" alt=""><figcaption></figcaption></figure>
8. Your mod is now available on the Steam Workshop! :clap: <br>

   <figure><img src="https://2911841908-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8ZDIsNKdEz0IT73wepog%2Fuploads%2FUa4Mde9bUkLlklllSKhy%2Fimage.png?alt=media&amp;token=5047292b-6977-4293-82db-2c80552dff21" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
SteamCMD will automatically edit the `upload.vdf` file's `publishedfileid` entry with your Steam Workshop item ID. In order to update your mod, you need to execute steps 6 to 7.\
\
For official documentation, see [Steam Workshop Implementation Guide](https://partner.steamgames.com/doc/features/workshop/implementation#SteamCmd)!
{% endhint %}
