{"id":18562451,"url":"https://github.com/replit/desktop","last_synced_at":"2025-04-05T12:05:02.441Z","repository":{"id":243258854,"uuid":"614055541","full_name":"replit/desktop","owner":"replit","description":"Replit Desktop App","archived":false,"fork":false,"pushed_at":"2025-03-26T07:53:57.000Z","size":5731,"stargazers_count":119,"open_issues_count":2,"forks_count":8,"subscribers_count":16,"default_branch":"main","last_synced_at":"2025-03-29T11:06:59.353Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/replit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-03-14T19:56:30.000Z","updated_at":"2025-03-26T07:54:02.000Z","dependencies_parsed_at":"2024-06-07T17:17:32.813Z","dependency_job_id":"7e2f2e02-3588-4949-b9e2-707e88c4c7b5","html_url":"https://github.com/replit/desktop","commit_stats":null,"previous_names":["replit/desktop"],"tags_count":39,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/replit%2Fdesktop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/replit%2Fdesktop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/replit%2Fdesktop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/replit%2Fdesktop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/replit","download_url":"https://codeload.github.com/replit/desktop/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247332602,"owners_count":20921853,"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":[],"created_at":"2024-11-06T22:09:45.346Z","updated_at":"2025-04-05T12:05:02.421Z","avatar_url":"https://github.com/replit.png","language":"TypeScript","readme":"# Replit Desktop\n\nWelcome to the Replit desktop app for MacOS, Windows, and Linux.\n\nThe app is developed using [Electron](https://www.electronjs.org/) and packaged and distributed using [Electron Forge](https://www.electronforge.io/).\n\n## Development\n\nTo get started, clone this repository and run `pnpm install` to install dependencies.\n\nFrom there, you can start the app by running one of the following commands:\n\n```bash\n# Start the app against replit.com (as the user will see it)\npnpm start\n\n# Start the app against a local dev server running repl-it-web (useful for testing local web changes that may affect the app)\npnpm start:local\n\n# Start the app against staging.replit.com (useful for testing changes that may affect the app on staging)\npnpm start:staging\n```\n\nIf you need to build a production version of the app, you can run:\n\n```bash\npnpm make\n```\n\nYou can then launch a packaged version of the app (needed to test certain features like auto-updating) by running the outputted binary locally (e.g. on an M1 Mac: `./out/Replit-darwin-arm64/Replit.app/Contents/MacOS/Replit`).\n\nTo test your changes on other platforms, we recommend using a Virtual Machine host like [UTM](https://mac.getutm.app).\n\nWhen going through the authentication flow in development (through unpackaged app) on macOS and Linux, after clicking \"Login\" on the welcome page, a new empty Electron window will open. This is expected, as [deeplinks are not support in unpackaged apps](https://www.electronjs.org/docs/latest/tutorial/launch-app-from-url-in-another-app#:~:text=On%20macOS%20and%20Linux%2C%20this%20feature%20will%20only%20work%20when%20your%20app%20is%20packaged.%20It%20will%20not%20work%20when%20you%27re%20launching%20it%20in%20development%20from%20the%20command%2Dline). To finish the flow, copy the URL from the browser into the clipboard (it should look like `http://localhost:3000/desktopApp/authSuccess?authToken=...`), and from the app menubar choose \"File -\u003e Complete Auth From Clipboard\". This menu item is only available in dev.\n\n## API Versioning\n\nThe Electron app communicates with the web frontend through the `replitDesktop` global object defined in `src/preload.ts`. As we develop both applications, this API has to be able to adapt, but at the same time can't break existing clients. The main failure mode we're trying to avoid is someone opening an older version of the Electron app and loading a newer version of the web client which requires a new API that's not supported by the old Electron client.\n\nWe're following a set of principles inspired by protobuf versioning:\n- don't remove the existing APIs\n- don't modify existing API call signatures\n- adding new APIs in the Electron app is ok, in the web client these should be optionally typed, and checked for existence dynamically (`if ('logout2' in replitDesktop) { ... }`)\n\n## Deeplinking\n\nThe app supports deeplinks with the `replit` protocol which can be used to open specific pages or flows directly, launching the app if it's not already running.\n\nThe following deeplinks are currently supported:\n- `replit://home`: Opens the desktop app home page in the focused window (or a new window if none are open).\n- `replit://new`: Opens a new window which launches the Repl creation flow.\n  - Optionally accepts a `language` string param which prefills the new Repl modal with that language's template (defaults to Python).\n- `replit://authComplete`: Completes the authentication flow which is triggered by the app during the login process, which redirects to the browser to generate a valid auth token that can be exchanged in order to authenticate the user associated with the browser's session. No-op if the user is already logged in.\n  - Requires an `authToken` string param which represents a valid auth token generated by the repl-it-web server that is necessary to complete the authentication process.\n- `replit://repl/@:username/:slug`: Opens the Repl associated with that username and slug in the focused window (or a new one if none are open).\n\n## Release\n\nTo publish a new release of the app, run the release script like so:\n\n```bash\npnpm release $version\n```\n\nwhere `version` is either a semver release keyword like major, minor, or patch, or an exact version like `v1.0.0`. While you can pass in exact versions, it's recommended to use semver keywords in most cases.\n\nThis will trigger a GitHub workflow that builds the artifacts for each platform and uploads them to a new [Release](https://github.com/replit/desktop/releases) by pushing a tagged commit to main.\n\nNote that the Release will be in a draft state until you manually publish it. Make sure you add release notes to describe what changed since the last published version as they will be displayed to users when they download updates.\n\nBefore you run the script, make sure that the `GH_TOKEN` environment variable is a valid [fine-grained personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#fine-grained-personal-access-tokens) with read access to metadata and read/write access to actions and code in order for the publish process to succesfully push the final build artifacts (exe, dmg, etc) from CI. You can view and update it via the repository settings as described [here](https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions).\n\n## Auto Updates\n\nThe MacOS and Windows apps support auto-updating on start-up using the Electron [autoUpdater module](https://www.electronjs.org/docs/latest/api/auto-updater).\n\nAs part of the auto-updating process, the app will communicate with our [Update Release Server](https://github.com/replit/desktop-releases/) which acts as a proxy for this repo's GitHub releases and exposes an API to fetch the latest artifacts for each platform.\n\n## Code Signing\n\nAs part of the Release process, we sign the MacOS and Windows apps according to the instructions [here](https://www.electronforge.io/guides/code-signing).\n\nThis is done to verify that the app comes from us and to prevent users from seeing warnings when installing the app. See instructions on how to sign for each platform below:\n\n### MacOS\n\nTo sign the app on MacOS, you need to set the `APPLE_ID`, `APPLE_PASSWORD`, and `APPLE_TEAM_ID` environment variables before you run `pnpm make`. Those are accessible in 1Password.\n\nAlternatively, if you are a member of the company's Apple Developer Team, you can use your own Apple ID and app-specific password.\n\n### Windows\n\nTo sign the Windows app, you need to set the `WINDOWS_CERTIFICATE_FILE` and `WINDOWS_CERTIFICATE_PASSWORD` environment variables before you run `pnpm make`.\n\nTo avoid leaking the certificate itself, we generate it from a Base64 encoded string rather than committing it to git.\nYou can find the encoded certificate and the certificate password in 1Password.\n\nYou can view and download the certificate itself by visiting the Comodo SSL Store [Certpanel dashboard](https://certpanel.com/comodo/) and logging in with the credentials found in 1Password.\n\nNote that to recreate the `pfx` file (which is what's ultimately needed to sign the app) from the `cer` or `crt` file that you download from the Certpanel dashboard, you will need to generate it by via `openssl` by following the instructions [here](https://help.comodosslstore.com/support/solutions/articles/22000265839-windows-converting-code-signing-to-pfx). To do so, you will need our private key (also in 1Password) as well as the intermediate certificates that Comodo provides.\n\n### CI\n\nWe sign the app in CI as part of the build and release process when publishing a new release. Make sure that the above env vars (`APPLE_*` and `WINDOWS_*`) remain valid credentials and are kept up to date in the repository secrets settings used by GitHub actions otherwise the app will not get correctly signed on subsequent releases.\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freplit%2Fdesktop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freplit%2Fdesktop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freplit%2Fdesktop/lists"}