# Can I export maps with embedded tilesets from the command line?

**URL:** <https://discourse.mapeditor.org/t/can-i-export-maps-with-embedded-tilesets-from-the-command-line/4227>\
**Category:** Questions\
**Created:** [November 28, 2019, 7:45am UTC](https://discourse.mapeditor.org/t/can-i-export-maps-with-embedded-tilesets-from-the-command-line/4227 "2019-11-28T07:45:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ghostomato](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/ghostomato/32/2545_2.png) [@Ghostomato](https://discourse.mapeditor.org/u/Ghostomato)\
**Post date:** [November 28, 2019, 7:45am UTC](https://discourse.mapeditor.org/t/can-i-export-maps-with-embedded-tilesets-from-the-command-line/4227/1 "2019-11-28T07:45:07Z")

</div>

I’m trying to automate the exporting of maps with embedded tilesets to JSON, but the line `tiled --export-maps json map_in.tmx map_out.json` always creates a JSON file that uses references to .tsx files instead of embedding the tilesets, regardless of what preferences I’ve set in the editor. Is there any way to use the command line to export JSON maps with embedded tilesets, or do I have to export via the editor to achieve that effect?

---

<div class="post-metadata">

**Author:** ![bjorn](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/bjorn/32/1599_2.png) [@bjorn](https://discourse.mapeditor.org/u/bjorn)\
**Post date:** [November 28, 2019, 12:28pm UTC](https://discourse.mapeditor.org/t/can-i-export-maps-with-embedded-tilesets-from-the-command-line/4227/2 "2019-11-28T12:28:30Z")

</div>

Hey @Ghostomato, welcome to the Tiled forums!

The preferences in the editor do not affect the command-line behavior. Instead, the command-line provides its own options to control the export options. See the output of `tiled --help`.

---

<div class="post-metadata">

**Author:** ![Ghostomato](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/ghostomato/32/2545_2.png) [@Ghostomato](https://discourse.mapeditor.org/u/Ghostomato)\
**Post date:** [November 28, 2019, 9:13pm UTC](https://discourse.mapeditor.org/t/can-i-export-maps-with-embedded-tilesets-from-the-command-line/4227/3 "2019-11-28T21:13:11Z")

</div>

Unfortunately, I’m on Windows, so I can’t see the output of `tiled --help`. Is there anywhere else where I can find documentation for the command line options?

---

<div class="post-metadata">

**Author:** ![bjorn](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/bjorn/32/1599_2.png) [@bjorn](https://discourse.mapeditor.org/u/bjorn)\
**Post date:** [November 29, 2019, 8:52am UTC](https://discourse.mapeditor.org/t/can-i-export-maps-with-embedded-tilesets-from-the-command-line/4227/4 "2019-11-29T08:52:34Z")

</div>

> [@Ghostomato](#):
>
> Unfortunately, I’m on Windows, so I can’t see the output of `tiled --help` . Is there anywhere else where I can find documentation for the command line options?

Hmm, I made that work at some point, so it appears it broke again. I’ll look into that, but in the meantime, here are the arguments in the code:

> <https://github.com/mapeditor/tiled/blob/2e53f9639e155ae711c17c332d5fcd39bd72b92d/src/tiled/main.cpp#L222-L240>
