Editing your code

Change your code right in Tokay, whether it lives here or on GitHub. Hosted code saves straight to its branch. GitHub code becomes a pull request, so GitHub stays in charge of what merges.

Last updated

AI agent? Start with llms.txt.

Save changes to hosted code

Open Source Code to edit, add, or remove files. Opening it from a Service shows that Service's branch. Otherwise you see the default branch.

Edits stay a draft until you choose Save changes. Tokay saves them only if the branch hasn't changed since you started. If someone pushed in the meantime, Tokay keeps your draft and says so, and you can copy what you want to keep before starting over from the latest version. The Project's auto-deploy setting decides whether a saved change deploys right away or waits for Update.

Paste, upload, and Git all create the same kind of hosted code. Clone it whenever you want to work locally, with no conversion. Pull changes saved in the browser before you push local ones.

Open pull requests for GitHub code

For code connected to GitHub, the same editor offers Create pull request. Tokay pushes your changes to a new branch named after what changed, such as tokay/update-index-js-4513f674, and opens a pull request against the branch you were editing. That branch stays as it is until you merge. The change deploys once it's merged and Tokay syncs it.

To edit GitHub code in Tokay, a GitHub admin of the repository chooses Enable pull requests once. Tokay then opens pull requests itself for everyone who can edit the code, and deletes each pull request's branch after it's merged or closed. A branch someone has pushed to since stays in place.

Without that, Tokay opens pull requests through your own GitHub account when it can push to the repository. Those branches are yours, so Tokay leaves them alone. Turn on Automatically delete head branches in the repository's GitHub settings and GitHub removes them after each merge.

Deploying from GitHub needs only read access. Pull requests from Tokay are optional.

Review suggested fixes

Tokay's suggested fixes follow the same path. Review the change, then choose Apply fix for hosted code or Create pull request for GitHub code. A fix stays tied to the branch and commit it was prepared against.

See Logs and debugging for the evidence included with a failure.