Skip to content

feat: unify page-type and custom-type into single type command#104

Merged
angeloashmore merged 2 commits intoaa/remote-modelingfrom
aa/unify-type-command
Apr 10, 2026
Merged

feat: unify page-type and custom-type into single type command#104
angeloashmore merged 2 commits intoaa/remote-modelingfrom
aa/unify-type-command

Conversation

@angeloashmore
Copy link
Copy Markdown
Member

@angeloashmore angeloashmore commented Apr 9, 2026

Resolves: #96

Description

Unifies the separate page-type and custom-type top-level commands into a single type command. This avoids agents misusing custom-type for pages by providing a --format flag on create.

  • prismic type create <name> creates a custom format content type (default)
  • prismic type create <name> --format page creates a page format content type
  • prismic type list shows all content types with format in output
  • prismic type view/remove work regardless of format
  • Field targeting simplified to --to-type/--from-type

Checklist

  • A comprehensive Linear ticket, providing sufficient context and details to facilitate the review of the PR, is linked to the PR.
  • If my changes require tests, I added them.
  • If my changes affect backward compatibility, it has been discussed.
  • If my changes require an update to the CONTRIBUTING.md guide, I updated it.

Preview

$ prismic type create --help

Create a new content type.

USAGE
  prismic type create <name> [options]

ARGUMENTS
  <name>   Name of the content type (required)

OPTIONS
  -f, --format string   Type format: "custom" (default) or "page"
  -s, --single          Allow only one document of this type
      --id string       Custom ID for the content type
  -r, --repo string     Repository domain
  -h, --help            Show help for command

FORMATS
  custom   A non-page type (e.g. settings, navigation, author, blog
           category). This is the default.
  page     A page type with a URL (e.g. homepage, blog post, landing
           page). Includes a slice zone and SEO & Metadata tab by
           default, and configures a route in prismic.config.json.

How to QA 1

  • prismic type --help shows create/list/view/remove subcommands
  • prismic type create MyPage --format page creates a page content type with slices and SEO tab
  • prismic type create MySettings creates a custom content type with empty Main tab
  • prismic type list shows all content types with format column
  • prismic field add text title --to-type MyPage adds a field to a content type

Footnotes

  1. Please use these labels when submitting a review:
    ❓ #ask: Ask a question.
    💡 #idea: Suggest an idea.
    ⚠️ #issue: Strongly suggest a change.
    🎉 #nice: Share a compliment.

angeloashmore and others added 2 commits April 9, 2026 13:24
Consolidates the separate `page-type` and `custom-type` top-level
commands into a single `type` command with a `--format` flag on create.

- `prismic type create <name> --format page` for page types
- `prismic type create <name>` defaults to custom format
- `prismic type list` shows all types with format in output
- `prismic type view/remove` work regardless of format
- Field targeting simplified: `--to-type`/`--from-type` replace
  `--to-page-type`/`--to-custom-type`/`--from-page-type`/`--from-custom-type`

Closes #96

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@angeloashmore angeloashmore merged commit cf1f0d6 into aa/remote-modeling Apr 10, 2026
22 of 23 checks passed
@angeloashmore angeloashmore deleted the aa/unify-type-command branch April 10, 2026 00:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant