feat(cli): add ork idp command for IDP inspection and validation - #242
Merged
Conversation
Adds a new Inspect and validate Internal Developer Platform (IDP) configurations.
The IDP is the contract between platform teams and developers. It defines
what fields developers can submit, what the gateway builds, and what
callers see.
Subcommands:
validate Validate IDP configuration in a Katalog
schema Show the flat schema for an IDP target
fields List all IDP fields with their paths and types
tokens Show token permissions for a CRD
targets List all IDP targets in a Katalog
can-i Check if a token can perform an operation
response Show the IDP response configuration
Usage:
ork idp [command]
Available Commands:
can-i Check if a token can perform an operation
fields List IDP fields with their paths and types
response Show the IDP response configuration
schema Show the flat schema for an IDP target
targets List all IDP targets in a Katalog
tokens Show token permissions for a CRD
validate Validate IDP configuration
Flags:
-h, --help help for idp
Global Flags:
--debug Enable debug logging
-f, --file strings Path(s) or URL(s) to katalog.yaml (repeatable)
--kubeconfig string Path to kubeconfig file
-v, --verbose Show full context
Use "ork idp [command] --help" for more information about a command. CLI command with subcommands for inspecting and
validating Internal Developer Platform (IDP) configurations.
Subcommands:
validate - Validate IDP configuration (--full for detailed breakdown)
schema - Show flat schema for a target (--target, --kind, --name)
fields - List IDP fields with paths and types (--target, --kind, --name)
tokens - Show token permissions for a CRD (--target, --kind, --name)
targets - List all IDP targets in a Katalog
can-i - Check if a token can perform an operation
response - Show IDP response configuration (--preview)
All subcommands support the same --file global flag as ork validate.
Introduce a helper function to shadow global flags (debug, kubeconfig, verbose and optional flags like file) across all CLI commands, replacing repeated manual shadowing in each command's init().
iAlexeze
force-pushed
the
feat/ork-idp-cli
branch
from
August 5, 2026 02:52
5405fcf to
e494337
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a new
ork idpCLI command for inspecting and validating Internal Developer Platform (IDP) configurations, and consolidates global flag shadowing across all CLI commands with a reusable helper.ork idpCommandSubcommands for inspecting and debugging IDP configurations without needing to run the gateway or access a cluster:
ork idp validate--fullfor detailed breakdown)ork idp schema--target,--kind,--name)ork idp fields--target,--kind,--name)ork idp tokens--target,--kind,--name)ork idp targetsork idp can-iork idp response--preview)Flag Shadowing Consolidation
Introduces
shadowGlobalCommandFlags(cmd, flags ...string)helper that recursively shadows global flags (debug,kubeconfig,verbose) on all subcommands, with optional support for command-specific flags like--file.init()functionsLookup()checksshadowGlobalCommandFlags(cmd, "file"))Implementation Details
ork idpsubcommands usebuildKatalog()helper respecting--fileresolveCRD()handles lookups by--target,--kind, or--nameresponse --previewcan-ivalidates namespace against CRD allowed namespacesExample
Test Plan
ork idp validatepasses on valid Katalogork idp validate --fullshows detailed breakdownork idp schema -t <target>shows fieldsork idp fieldslists all fieldsork idp tokens -t <target>shows permissionsork idp targetslists targetsork idp can-icorrectly evaluates permissionsork idp response -t <target> --previewshows colorized JSONgo build ./...cleango test ./...clean