{"id":15674451,"url":"https://github.com/bacongravy/glitcheroo","last_synced_at":"2025-05-06T23:18:05.428Z","repository":{"id":42857730,"uuid":"260335939","full_name":"bacongravy/glitcheroo","owner":"bacongravy","description":"Give 'em the ol' glitcheroo","archived":false,"fork":false,"pushed_at":"2022-03-26T15:13:24.000Z","size":518,"stargazers_count":14,"open_issues_count":7,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-06T23:18:00.386Z","etag":null,"topics":["cli","glitch"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bacongravy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-04-30T22:58:14.000Z","updated_at":"2023-08-14T01:12:55.000Z","dependencies_parsed_at":"2022-09-15T02:12:48.052Z","dependency_job_id":null,"html_url":"https://github.com/bacongravy/glitcheroo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bacongravy%2Fglitcheroo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bacongravy%2Fglitcheroo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bacongravy%2Fglitcheroo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bacongravy%2Fglitcheroo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bacongravy","download_url":"https://codeload.github.com/bacongravy/glitcheroo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252782835,"owners_count":21803410,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","glitch"],"created_at":"2024-10-03T15:44:59.275Z","updated_at":"2025-05-06T23:18:05.414Z","avatar_url":"https://github.com/bacongravy.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/bacongravy/glitcheroo/master/logo.png\" width=300\u003e\n\u003c/p\u003e\n\nA CLI tool to deploy an app to an existing [Glitch](https://glitch.com) project. The contents of the existing Glitch project are completely replaced. Use carefully!\n\n## Basic usage\n\nA target Glitch project must be setup to receive deployments before you can deploy an app with `glitcheroo`.\n\nDeployment is initiated from the source project. The source may be another Glitch project or a project committed to a Git repository on your local device.\n\n[Node.js](https://nodejs.org) is required, version 8.2.0 or higher.\n\n### Step 1: Setup the target\n\nOpen a terminal in the root of the Glitch project that you want to deploy to. Run the following command to setup the target project:\n\n```sh\nnpx glitcheroo setup-target\n```\n\n**WARNING:** This command allows the Glitch project to be completely overwritten via remote Git operations.\n\n### Step 2: Deploy the app\n\nOpen a terminal in the root of the project that you want to deploy. Run the following command to deploy the app:\n\n```sh\nnpx glitcheroo deploy\n```\n\nThe first time you run this command in a project it will prompt you to provide the Git URL of the **target project**. Find it in the \"Tools \u003e Import and Export\" panel of the Glitch project editor.\n\nAnd that's it! _There is no step 3._ Glitch will automatically detect the project change, reinstall the dependencies, and start the deployed app.\n\n## Installation\n\nInstallation is not required. Node.js already includes the `npx` tool, and the `npx` tool automatically downloads and runs the latest version of `glitcheroo` every time you use it to run the commands.\n\nIf you don't want `npx` to re-download `glitcheroo` every time you run the commands you can install the `glitcheroo` package as a devDependency of the project you are deploying:\n\n```sh\nnpm install -D glitcheroo\n```\n\nYou should continue to use `npx` to run `glitcheroo` after installing the package. The `npx` tool will find the version of `glitcheroo` installed in your project and use it instead of downloading the latest version.\n\n## Advanced usage\n\n### Remix\n\nAs a convenience, this tool lets you remix a Glitch project to your local device. The remixed project is configured to target the original Glitch project for deployment.\n\nRemix a target Glitch project by running the following command:\n\n```sh\nnpx glitcheroo remix\n```\n\nProvide the Git URL of the _target project_ when prompted.\n\n### Status\n\nThe configuration status for a project may be retrieved by running the following command:\n\n```sh\nnpx glitcheroo status\n```\n\nThis prints whether the project has been configured as a source, a target, or both.\n\n### Reset\n\nThe configuration for a project may be reset by running the following command:\n\n```sh\nnpx glitcheroo reset\n```\n\nThis removes the Git configuration values added by the `setup-target`, `deploy`, and `remix` commands.\n\n## Evironment variables\n\nThe `glitcheroo deploy` command will read the Git URL of the target project from the `GLITCHEROO_GIT_URL` environment variable if it is set.\n\n## Implementation details\n\nThe `glitcheroo` tool works by configuring and using Git.\n\nThe `setup-target` command:\n\n- sets the `receive.denyCurrentBranch` config value to `ignore` so that the `master` branch can be pushed to\n- sets the `receive.shallowUpdate` config value to `true` so that shallow checkouts can be pushed\n- installs a `post-receive` hook that runs after deploy and refreshes the workspace and Glitch editor with the new changes\n\nThe `deploy` command:\n\n- adds a remote tracked repository named `glitcheroo` that points at the target\n- pushes `+HEAD:master` to the `glitcheroo` remote\n\nThe `remix` command:\n\n- clones the target Git repository\n- renames the default remote in the new repository from `origin` to `glitcheroo`\n\n## Acknowledgements\n\nThis project was inspired by [Melissa McEwen's](http://www.melissamcewen.com/) fascinating article [Automating My Deploys From GitHub to Glitch](https://dev.to/glitch/automating-my-deploys-from-github-to-glitch-2fpd), published on [DEV](https://dev.to/) on April 21, 2020.\n\nHuge thanks to Glitch for providing a great service. This project is not affiliated with Glitch in any way.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbacongravy%2Fglitcheroo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbacongravy%2Fglitcheroo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbacongravy%2Fglitcheroo/lists"}