Skip to main content

Scope

This repository contains only the Rancher UI extension. Backend, corpus, and model code live in separate repositories and are not accepted here.

Prerequisites

  • Node.js 22+ (use nvm to manage versions)
  • Yarn 1.x (classic)
  • Rancher 2.8+ (local or remote instance for testing)

Workflow

1

Fork and clone

Fork the repository on GitHub, then clone your fork locally.
git clone https://github.com/<your-user>/pastures-rancher.git
cd pastures-rancher
2

Install dependencies

yarn install --ignore-engines
3

Build the extension

yarn build-pkg pastures
4

Developer Load into Rancher

Start the package server with yarn serve-pkgs, then load the extension in Rancher via Extensions → Developer Load using http://127.0.0.1:4500.
5

Open a Pull Request

Push your branch and open a PR against main.

Pull Request Requirements

  • The build must pass (yarn build-pkg pastures).
  • Use conventional commits:
    • feat: — new feature
    • fix: — bug fix
    • docs: — documentation only
    • chore: — maintenance, dependencies
  • Keep PRs focused on a single change.

Code Style

ConventionDetail
ComponentsVue 3 <script setup lang="ts"> with Composition API
StylingRancher CSS variables (--body-text, --border, --primary, --box-bg, etc.) — no hardcoded colors
API callsengineFetch() from lib/pasturesApi.ts
Demo modeGuard with isGlobalDemoMode(); load DEMO_* constants when true
TypesTypeScript interfaces for all API responses and component props

Security Vulnerabilities

If you discover a security issue, do not open a public issue. Email security@pastures.farm with a description and reproduction steps. We will respond within 48 hours.

License

By contributing you agree that your contributions are licensed under the Apache 2.0 License.