Instructions Templates

Sidecar can generate a project-level instructions.md during sidecar init. You can do this from a reusable template or from a specific file path.

This is useful when you start many projects with a similar agent policy and want consistent instructions from day one without copy/paste.


Template location

Put reusable templates in your user config directory: ~/.sidecar-cli/instructions/<template-name>.md

Create a template

Example setup shell
$ mkdir -p ~/.sidecar-cli/instructions
# create ~/.sidecar-cli/instructions/web-app.md

The template name in the filename (web-app.md) becomes the value you pass to --instructions-template.

Use a template during init

$ sidecar init --instructions-template web-app

Sidecar reads ~/.sidecar-cli/instructions/web-app.md and writes it to instructions.md in your project.

Use a direct file instead

If you already have an instructions file somewhere else, pass its absolute path:

$ sidecar init --instructions-file /absolute/path/to/instructions.md

Constraints and safety rules

  • Use either --instructions-template or --instructions-file, not both.
  • Sidecar will not overwrite an existing instructions.md unless you also pass --force.

Quick start

Copy/paste flow for first-time setup:

Quick start shell
$ mkdir -p ~/.sidecar-cli/instructions
# create ~/.sidecar-cli/instructions/web-app.md
$ cd my-project
$ sidecar init --instructions-template web-app

Troubleshooting

Template not found

Make sure the file exists at ~/.sidecar-cli/instructions/<template-name>.md and that the template name in your command matches the filename exactly.

$ ls ~/.sidecar-cli/instructions
$ sidecar init --instructions-template web-app

instructions.md already exists

Sidecar protects existing files by default. Re-run with --force if you want to replace the current instructions.md.

$ sidecar init --instructions-template web-app --force

Related docs