# Did You Know? How to Use Flags When Pushing Content to Transifex with the JavaScript SDK

**URL:** <https://community.transifex.com/t/did-you-know-how-to-use-flags-when-pushing-content-to-transifex-with-the-javascript-sdk/4209>\
**Category:** What's new?\
**Tags:** transifex-native, javascript, didyouknow, push, flags\
**Created:** [October 2, 2024, 1:40am UTC](https://community.transifex.com/t/did-you-know-how-to-use-flags-when-pushing-content-to-transifex-with-the-javascript-sdk/4209 "2024-10-02T01:40:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sandy\_DLR](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.transifex.com/sandy_dlr/32/2498_2.png) [@Sandy\_DLR](https://community.transifex.com/u/Sandy_DLR)\
**Post date:** [October 2, 2024, 1:40am UTC](https://community.transifex.com/t/did-you-know-how-to-use-flags-when-pushing-content-to-transifex-with-the-javascript-sdk/4209/1 "2024-10-02T01:40:17Z")

</div>

**Hi everyone! I’m Sandy,** and today I’ll share how to optimize your workflow using flags in the Transifex JavaScript SDK. These flags help you control what gets pushed, tag management, and even simulate changes before committing. Let’s explore how to use them!

### Key Command Flags

1. **–verbose** : Enables detailed logging during the push. This flag provides in-depth details on the process, perfect for debugging or tracking large uploads.

2. **–append-tags** : Adds new tags to strings without removing existing ones. If you want to add a new tag like “release\_v1” to strings that already have other tags (e.g., “urgent”), this flag allows you to append without overwriting the current tags. It’s perfect for maintaining both old and new categorizations of content.

3. **–dry-run** : Simulates the push without making changes. This is your “preview mode.” It lets you check what will be pushed before any real changes happen in Transifex.

4. **–with-tags-only** : This flag allows you to push only the strings tagged with a specific value. It’s perfect when you’re working with staged releases, or when you want to prioritize content that’s tagged for a particular feature or purpose.

5. **–purge** : Removes content in Transifex that no longer exists in your local files. Over time, your codebase evolves, and you may remove or replace strings. The `--purge` flag ensures your Transifex project stays clean by removing outdated strings that no longer exist in your local files. This keeps your translations in sync with your current content.

6. **–parser** : Specifies the parser used for localization files (e.g., `i18next`).  
This flag ensures that Transifex processes your files correctly based on their format, reducing parsing errors during uploads.

### Real-Life Use Case Example

Imagine you’re launching a new feature and need to push only strings tagged “release\_v2.” You also want to clean up outdated strings from your project. Here’s how you’d do it:

```bash
txjs-cli push --with-tags-only="release_v2" --purge --verbose

```

This does three things:

- Pushes only strings tagged with “release\_v2.”
- Removes outdated content in Transifex that no longer exists in your local files.
- Provides detailed logs throughout the process for easy monitoring.

### Conclusion

These flags give you precise control over how your content is uploaded to Transifex, making your workflow more efficient. Whether you need to append tags, simulate a push, or clean up old content, these tools ensure you’re always in control of your localization process.

For more detailed information, check out the official [Transifex documentation](https://developers.transifex.com/docs/javascript-sdk-uploading-source-content-to-transifex#push-command-options).
