Introduction
Note
Beginning August 4, 2026, GitHub Spark will no longer accept new users or allow the creation of new apps. Existing users can continue to access and use apps they have already created. Open Spark workbench for your app, select "..." and "Create repository" to save your app code before August 31, 2026.
If you’re developing your spark further in a GitHub codespace, you can deploy it directly from the command line using the Spark CLI, an extension of the GitHub CLI.
Prerequisites
- Access to GitHub Copilot. You need a Copilot Pro+, Copilot Max, or Copilot Enterprise license to use Spark. See What is GitHub Copilot?.
- You must have built a Spark app (a "spark"). To start building, navigate to Spark.
- You have created a repository for your spark on GitHub. For instructions, see Building and deploying AI-powered apps with GitHub Spark.
Open your spark in a codespace
The Spark CLI currently only works within a GitHub codespace.
- Navigate to the main page of your spark's repository on GitHub.
- Click the Code button, then click the Codespaces tab.
- Click to create a codespace. The codespace opens in a new browser tab.
Install the Spark CLI
-
In the terminal in your codespace, run the following command to install the Spark CLI:
Bash gh extensions install github/gh-runtime-cli
gh extensions install github/gh-runtime-cli -
Once the installation is complete, to verify that the Spark CLI is installed, run:
Bash gh runtime-cli version
gh runtime-cli version
Build your spark
-
In the terminal in your codespace, run the following command to install the latest version of the Spark SDK:
Bash npm install @github/spark@latest
npm install @github/spark@latest -
Next, run the following command to compile your Spark app.
Bash npm run build
npm run build
Deploy your spark
-
To deploy your Spark app, run:
Bash gh runtime-cli deploy --dir ./dist
gh runtime-cli deploy --dir ./dist
Troubleshooting
If you're being asked to supply the --app parameter when deploying your spark, update to the latest version of the Spark SDK by following step 1 in Build your spark.