This is the main entry point for odh-cli development documentation. Use this guide to navigate to specific topics.
For architectural information and design decisions, see design.md.
New to the project? Start here:
- Setup and Build - Build commands, test commands, and development environment setup
- Coding Conventions - Core coding standards and practices
- Testing Guidelines - How to write and organize tests
- Quality Verification - Running linters, tests, and quality checks
- setup.md - Build commands, test commands, prohibited commands
The coding/ directory contains focused coding guidelines:
-
coding/conventions.md - Core coding conventions
- Error handling
- Function signatures
- Package organization
- Naming conventions
- Code comments (WHY not WHAT)
- Message constants
- Command interface pattern
-
coding/patterns.md - Architectural patterns and design practices
- Functional options pattern
- IOStreams wrapper
- JQ-based field access
- Centralized GVK/GVR definitions
- High-level resource operations
- Cluster-wide operations
-
coding/formatting.md - Code formatting rules
- Using
make fmt - Blank imports for auto-registration
- Import ordering
- Using
- testing.md - Testing practices and conventions
- Test framework (Gomega)
- Test data organization
- Mock organization
- Struct assertions
- Kubernetes sets for deduplication
- Generic type conversion
- extensibility.md - Adding features and extending the CLI
- Adding new commands
- Command-specific logic
- Adding output formats
- Using the table renderer
-
quality.md - Continuous quality verification
- Development workflow
- Lint-fix-first approach
- Quality gates
- When to run checks
-
code-review.md - Code review guidelines
- Linter rules and configuration
- Git commit conventions
- Task-based commits
- Pull request checklist
- Code style summary
- lint/architecture.md - Lint command architecture and design
- lint/writing-checks.md - Writing diagnostic checks for the lint command
See setup.md
See extensibility.md
See testing.md
See quality.md
See code-review.md
For broader architectural context:
- design.md - Overall CLI design and architecture
- lint/architecture.md - Lint command-specific architecture
Before contributing:
- Read coding/conventions.md and coding/patterns.md
- Understand testing.md practices
- Follow the quality.md workflow
- Review code-review.md guidelines