Blog
/
Announcement

Seamless syncing: A better local development experience with GGT

Published
March 13, 2024
Last updated
December 20, 2024
Gadget's CLI tool syncs local and cloud code, giving you better development, easy collaboration, and speedy deploys.
TL;DR: Write code in your local editor and sync code changes to environments in your Gadget project.

Gadget’s CLI tool now has new commands to power your projects and make your local development experience friction-free.

GGT has been available for a long time, giving developers a way to sync code between their local machine and their Gadget app on the cloud. But with the release of unlimited environments and source control, there’s a lot more to do.

<inline-code>ggt<inline-code> is the connector between all of these new features, and allows you and your team to follow the same development workflow used when building locally. All changes to your code and config will sync between your remote Gadget environment and your local machine, and you can use <inline-code>git<inline-code> to manage your branches on your own personal development environment. When changing branches, any differences are instantly applied to your remote Gadget environment. 

As a team, you're able to collaborate and review each other's code in Gadget, knowing you're working with the same infrastructure and tooling. Or you can do code reviews and view diffs using the git provider of your choice, such as GitHub or GitLab. Your testing and feedback loops become almost instant, so you can build and ship faster.

The Gadget editor is powerful because it abstracts so much boilerplate code and repetitive patterns when developing. The new <inline-code>ggt<inline-code> commands bring that experience to your local machine. Generate boilerplate, push and pull your code, and sync files back and forth between your local machine and the Gadget cloud environment of your choice in real time. You can even deploy to production using <inline-code>ggt<inline-code>!

New commands to power your projects

Here are some of the new commands to give developers a better overall experience when working with Gadget from their local machine.

<inline-code>dev<inline-code> allows you to clone your environment’s filesystem and start syncing Gadget to your local machine. You can specify both the app and the environment you want to work on, and easily switch environments as needed.

<inline-code>push<inline-code> will send any changes made in your local filesystem to your remote Gadget environment. 

<inline-code>pull<inline-code> will pull all the changes made on your remote Gadget environment to your local filesystem.

<inline-code>status<inline-code> will show you everything that’s changed since the last time you ran <inline-code>ggt dev<inline-code>, <inline-code>ggt push<inline-code>, or <inline-code>ggt pull<inline-code> in the chosen directory, similar to <inline-code>git status<inline-code>. In the event your connection drops or there are discrepancies between your code, you’re able to safely push and pull your code between Gadget and your local machine.

<inline-code>deploy<inline-code> will deploy your current environment to production. If there are differences between your local filesystem and your remote Gadget environment, these will need to be resolved before deploying.

You can see all the available GGT commands and what they do in our docs. In-depth documentation about ggt and all of its commands and flags is available in the GitHub repository.

Emma Hyde
Author
Riley Draward
Reviewer
Try Gadget
See the difference a full-stack development platform can make.
Create app

Seamless syncing: A better local development experience with GGT

Gadget's CLI tool syncs local and cloud code, giving you better development, easy collaboration, and speedy deploys.
Problem
Solution
Result
TL;DR: Write code in your local editor and sync code changes to environments in your Gadget project.

Gadget’s CLI tool now has new commands to power your projects and make your local development experience friction-free.

GGT has been available for a long time, giving developers a way to sync code between their local machine and their Gadget app on the cloud. But with the release of unlimited environments and source control, there’s a lot more to do.

<inline-code>ggt<inline-code> is the connector between all of these new features, and allows you and your team to follow the same development workflow used when building locally. All changes to your code and config will sync between your remote Gadget environment and your local machine, and you can use <inline-code>git<inline-code> to manage your branches on your own personal development environment. When changing branches, any differences are instantly applied to your remote Gadget environment. 

As a team, you're able to collaborate and review each other's code in Gadget, knowing you're working with the same infrastructure and tooling. Or you can do code reviews and view diffs using the git provider of your choice, such as GitHub or GitLab. Your testing and feedback loops become almost instant, so you can build and ship faster.

The Gadget editor is powerful because it abstracts so much boilerplate code and repetitive patterns when developing. The new <inline-code>ggt<inline-code> commands bring that experience to your local machine. Generate boilerplate, push and pull your code, and sync files back and forth between your local machine and the Gadget cloud environment of your choice in real time. You can even deploy to production using <inline-code>ggt<inline-code>!

New commands to power your projects

Here are some of the new commands to give developers a better overall experience when working with Gadget from their local machine.

<inline-code>dev<inline-code> allows you to clone your environment’s filesystem and start syncing Gadget to your local machine. You can specify both the app and the environment you want to work on, and easily switch environments as needed.

<inline-code>push<inline-code> will send any changes made in your local filesystem to your remote Gadget environment. 

<inline-code>pull<inline-code> will pull all the changes made on your remote Gadget environment to your local filesystem.

<inline-code>status<inline-code> will show you everything that’s changed since the last time you ran <inline-code>ggt dev<inline-code>, <inline-code>ggt push<inline-code>, or <inline-code>ggt pull<inline-code> in the chosen directory, similar to <inline-code>git status<inline-code>. In the event your connection drops or there are discrepancies between your code, you’re able to safely push and pull your code between Gadget and your local machine.

<inline-code>deploy<inline-code> will deploy your current environment to production. If there are differences between your local filesystem and your remote Gadget environment, these will need to be resolved before deploying.

You can see all the available GGT commands and what they do in our docs. In-depth documentation about ggt and all of its commands and flags is available in the GitHub repository.

Interested in learning more about Gadget?

Join leading agencies making the switch to Gadget and experience the difference a full-stack platform can make.