The backstage template CLI is a powerful tool designed to manage and automate the creation, validation, and deployment of Backstage component YAML files. With a user-friendly interface and reusable modules, this CLI simplifies your workflow for Backstage projects.
- Generate YAML Files: Prompt users for input and generate Backstage component YAML files.
- Validate YAML Files: Validate the structure and fields of Backstage YAML files.
- Reusable Modules: Shared structures and logic for extensibility.
- Modular Commands: Easily add or extend commands to fit your Backstage needs.
Generates a Backstage component YAML file based on user inputs.
./backstage-template generateExample:
Enter component name: backend
Enter description: Backend service for Pomodoro Cloud-Native project
Enter GitHub project slug (e.g., user/repo): NineKama/pomodoro-cloud-native
Enter type (e.g., service): service
Enter owner: team-backend
Enter lifecycle (e.g., production): production
Output:
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
name: backend
description: Backend service for Pomodoro Cloud-Native project
annotations:
github.com/project-slug: NineKama/pomodoro-cloud-native
spec:
type: service
owner: team-backend
lifecycle: productionValidates a Backstage component YAML file.
./backstage-template validate component.yamlOutput:
Validation successful! The YAML file is valid.
-
Clone the repository:
git clone https://github.com/NineKama/backstage-template-cli.git cd backstage-template -
Build the CLI:
go build -o backstage-template
-
Run the CLI:
./backstage-template
Contributions are welcome! Please submit issues or pull requests for any improvements or new features.
This project is licensed under the MIT License. See the LICENSE file for details.