id, firstName, lastName, and email.
Start by asking Copilot Chat to scaffold a new project (for example, use /new and request a “Node application API”). Copilot often generates files such as index.js, app.js, and basic tests to get you started.

index.js— starts the HTTP server.app.js— defines the Express application and routes.- optional test files — e.g., using Jest + Supertest.
CLI flow (typical)
- Install dependencies:
- Start the application:
- EJSONPARSE from npm (malformed package.json):
package.json is invalid JSON. Paste the contents into Copilot Chat and ask /fix or validate the JSON before running npm install.
How Copilot Chat helps in practice
- Scaffold project files (
/new), generate routes, tests, and README. - Scope fixes with
/fixfor a file, selection, or working set. - Use
/terminal last commandto share terminal output with the chat so Copilot can analyze errors and propose patches.
Working set / context matters. Copilot Chat uses your project files (open editors, the full codebase, selected files, and terminal output) to provide focused suggestions. Narrowing the context — a specific file, selection, or terminal output — yields more relevant edits. This behavior is important when using Copilot Chat effectively.
/new— scaffold a project or file./fix— ask Copilot Chat to fix the selected code or the current working set./clear— clear the conversation./help— get command usage and interaction info./terminal last command— send the last terminal command and output into Copilot Chat.
#changes— include change history context#codebase— include the full codebase#editor— include currently open editors#file— include a specific file#selection— include just the current selection#terminalLastCommandand#terminalSelection— include terminal details
- Accept Copilot edits (e.g., Accept All Edits) to write files into your workspace quickly.
- If you change the API shape (for example, remove
lastName), update tests, docs, and other references; Copilot can locate inconsistencies when you provide the working set and run/fix. - If Copilot’s response isn’t what you expected, switch models in the UI (e.g., GPT-4o, Claude, Gemini) to compare outputs.
- produce full starter files packaged in a zip,
- add a README and detailed API documentation,
- walk through a live debugging session demonstrating
/terminal last commandand/fix.