Skip to content

Add --user option to openspec schema init for user-level schemas #756

@askpatrickw

Description

@askpatrickw

Open Issues

This request makes sense on its own, but I'm curious why these files don't live in
~/.config/openspec/ instead.

Summary

Add a --user option to openspec schema init so developers can create a user-level schema directly (stored in ~/.local/share/openspec/schemas/) for reuse across multiple projects.

Problem / use case

OpenSpec already documents that schemas can be resolved from a user directory (~/.local/share/openspec/schemas/) to enable sharing across projects. However, the CLI currently positions schema init as project-local only (“Create a new project-local schema”), which creates friction for the “share across projects” workflow.

A common scenario:

  • A developer or platform team maintains a personal (or internal) workflow schema they want to use in many repos (e.g., org-standard, security-review, rapid, etc.).
  • They don’t want to copy/paste or “init then move” schemas manually for each project.
  • They want a quick way to create and iterate on a schema once, then immediately use it from any repo on their machine.

Why this matters

A --user flag would:

  • Make the documented user-level schema capability discoverable and easy to use from the CLI.
  • Support “power users” and teams who work across many repos and want consistent workflows without duplicating schema definitions.
  • Reduce manual filesystem steps and mistakes (wrong directory, inconsistent schema copies, forgetting to move templates, etc.).
  • Encourage experimentation: users can prototype schemas globally before deciding to vendor a stable copy into a specific repo for version control.

Desired UX (from a user perspective)

  • By default, openspec schema init <name> continues to create a project-local schema.
  • With --user, openspec schema init --user <name> creates the schema in the user-level location, so it’s immediately available across projects via normal schema resolution.

Documentation alignment

This request directly supports the documented note:

OpenSpec also supports user-level schemas at ~/.local/share/openspec/schemas/ for sharing across projects…

Right now, the CLI help text and init behavior don’t reflect an easy path to that workflow.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions