Skip to content

Commit 5bdbd2c

Browse files
authored
Merge pull request #43765 from github/repo-sync
Repo sync
2 parents 55a8151 + 2cd3b72 commit 5bdbd2c

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

content/copilot/reference/copilot-cli-reference/cli-command-reference.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,28 @@ Create `.github/copilot/settings.local.json` in the repository, for personal ove
337337

338338
The local configuration file uses the same schema as the repository configuration file (`.github/copilot/settings.json`) and takes precedence over it.
339339

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+
340362
## Hooks reference
341363

342364
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

Comments
 (0)