You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/copilot/reference/copilot-cli-reference/cli-command-reference.md
+22Lines changed: 22 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -337,6 +337,28 @@ Create `.github/copilot/settings.local.json` in the repository, for personal ove
337
337
338
338
The local configuration file uses the same schema as the repository configuration file (`.github/copilot/settings.json`) and takes precedence over it.
339
339
340
+
## Project initialization for {% data variables.product.prodname_copilot_short %}
341
+
342
+
When you use the command `copilot init`, or the slash command `/init` within an interactive session, {% data variables.product.prodname_copilot_short %} analyzes your codebase and writes or updates a `.github/copilot-instructions.md` file in the repository. This custom instructions file contains project-specific guidance that will improve future CLI sessions.
343
+
344
+
You will typically use `copilot init`, or `/init`, when you start a new project, or when you start using {% data variables.copilot.copilot_cli_short %} in an existing repository.
345
+
346
+
The `copilot-instructions.md` file that's created or updated typically documents:
347
+
348
+
* Build, test, and lint commands.
349
+
* High-level architecture.
350
+
* Codebase-specific conventions.
351
+
352
+
If the file already exists, {% data variables.product.prodname_copilot_short %} suggests improvements which you can choose to apply or reject.
353
+
354
+
The CLI looks for the `copilot-instructions.md` file on startup, and if it's missing, it displays the message:
355
+
356
+
> 💡 No copilot instructions found. Run /init to generate a copilot-instructions.md file for this project.
357
+
358
+
If you don't want to create this file, you can permanently hide this startup message by using the `/init suppress` slash command, which adds a `suppress_init_folders` setting for this repository to your {% data variables.product.prodname_copilot_short %} configuration file.
359
+
360
+
For more information, see [AUTOTITLE](/copilot/how-tos/configure-custom-instructions/add-repository-instructions).
361
+
340
362
## Hooks reference
341
363
342
364
Hooks are external commands that execute at specific lifecycle points during a session, enabling custom automation, security controls, and integrations. Hook configuration files are loaded automatically from `.github/hooks/*.json` in your repository.
0 commit comments