Skip to content

feat(cmd): add templates apply/publish/metadata/generate-docs commands#220

Merged
skevetter merged 4 commits into
mainfrom
feat-devsy-043-templates-commands
May 5, 2026
Merged

feat(cmd): add templates apply/publish/metadata/generate-docs commands#220
skevetter merged 4 commits into
mainfrom
feat-devsy-043-templates-commands

Conversation

@skevetter

Copy link
Copy Markdown
Contributor

Summary

Adds a new templates command group with four subcommands for devcontainer template management via OCI registries:

  • templates apply — fetches a template from an OCI registry and scaffolds devcontainer configuration into a workspace folder, with support for template variable substitution, feature injection, and path omission
  • templates publish — packages a local template directory and pushes it to an OCI registry
  • templates metadata — pulls and displays the devcontainer-template.json metadata for a published template
  • templates generate-docs — discovers local template metadata files and generates markdown documentation

Follows existing cobra command patterns (mirrors cmd/pro/pro.go). Reuses OCI pull infrastructure from pkg/devcontainer/feature/. Includes E2E tests for apply and metadata against ghcr.io/devcontainers/templates.

@netlify

netlify Bot commented May 4, 2026

Copy link
Copy Markdown

Deploy Preview for devsydev canceled.

Name Link
🔨 Latest commit b3ffe7b
🔍 Latest deploy log https://app.netlify.com/projects/devsydev/deploys/69f92fa779716f0008471f24

@coderabbitai

coderabbitai Bot commented May 4, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@skevetter has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 58 minutes and 39 seconds before requesting another review.

To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: c6a9c541-2e1a-4b7c-bfb0-0b8bee1c7632

📥 Commits

Reviewing files that changed from the base of the PR and between be8aeac and b3ffe7b.

📒 Files selected for processing (8)
  • cmd/root.go
  • cmd/templates/apply.go
  • cmd/templates/generate_docs.go
  • cmd/templates/metadata.go
  • cmd/templates/publish.go
  • cmd/templates/templates.go
  • e2e/e2e_suite_test.go
  • e2e/tests/templates/templates.go

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@skevetter skevetter changed the title feat(cmd): add templates apply/publish/metadata/generate-docs commands (DEVSY-043) feat(cmd): add templates apply/publish/metadata/generate-docs commands May 4, 2026
@skevetter
skevetter marked this pull request as ready for review May 4, 2026 23:44
skevetter added 4 commits May 4, 2026 18:45
Implement a new `templates` command group with four subcommands for
devcontainer template management via OCI registries:

- apply: fetch template from OCI registry and scaffold devcontainer config
- publish: package and push templates to OCI registry
- metadata: fetch and display published template metadata
- generate-docs: generate markdown documentation from template metadata

Includes E2E tests for apply and metadata against ghcr.io/devcontainers/templates.
- Return error from json.MarshalIndent in publish instead of swallowing
- Warn user when --features specified but no devcontainer.json found
- Sort option keys for deterministic markdown output in generate-docs
…test

Fixes goconst lint failures: --template-id (5x), --workspace-folder (3x), apply (3x).
Fixes goconst violations for "templates" (5x) and "ghcr.io/devcontainers/templates/go:latest" (3x).
@skevetter
skevetter force-pushed the feat-devsy-043-templates-commands branch from a183449 to b3ffe7b Compare May 4, 2026 23:45
@skevetter
skevetter merged commit 84d21c6 into main May 5, 2026
53 of 54 checks passed
@skevetter
skevetter deleted the feat-devsy-043-templates-commands branch May 5, 2026 00:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant