Repository navigation
Conversation
haarchri
requested review from
a team,
jcogilvie and
tampakrap
as code owners
November 18, 2026 13:58
Contributor
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 17 minutes. View limit details
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. |
Codecov Report❌ Patch coverage is 🚀 New features to boost your workflow:
|
Rename initCmd/buildCmd/pushCmd/runCmd/simulateCmd/stopCmd to exported names so other CLIs can compose individual project subcommands into their own Kong command trees instead of reimplementing them.
other CLIs can embed the exported command structs from cmd/crossplane in their own Kong trees, but those commands' Run methods take types from internal packages (terminal.SpinnerPrinter, config.Config) and reference kong.Vars set up by crossplane's main. pkg/cli exposes exactly that contract: type aliases, constructors, Vars/Options/BindRuntime helpers, and a Build/ParseProject/SortImages facade so hosts can build projects in-process and consume the resulting image map directly. Also expose a keychain option on the xpkg client so hosts can authenticate dependency fetches from private registries. Signed-off-by: Christopher Haar <chhaar30@googlemail.com>
Host CLIs have their own meta APIs whose models must merge into the same generated models module as the project's dependencies and APIs, so language tests can import both. Expose the schema manager's Add through the facade. Signed-off-by: Christopher Haar <christopher.haar@upbound.io>
pkg/cli keeps the terminal, configuration, and Kong binding helpers for embedding crossplane commands; the project-specific surface (parse, build, schema generation) moves to pkg/project. Also export the schema runner so host CLIs can execute language tooling (e.g. language-based tests) with the same container machinery used for schema generation. Signed-off-by: Christopher Haar <christopher.haar@upbound.io>
The runner only forwarded CROSSPLANE_-prefixed environment variables to the language tooling containers. Host CLIs need their own variables visible there too - e.g. up's e2e test manifests read cloud credentials from UP_-prefixed variables - so make the prefixes extensible. Signed-off-by: Christopher Haar <christopher.haar@upbound.io>
Embedded commands can return a silent ExitError to report a result such as simulate finding changes; hosts need SilentExit to exit with its code without printing an empty error line. Signed-off-by: Christopher Haar <christopher.haar@upbound.io>
Host CLIs can carry package metadata and build exclusions outside the project file (e.g. up's upbound-project.yaml extensions). Add build options to apply extra annotations to the configuration and function package metadata - before function dependency digests are computed - and to exclude gitignore-style patterns from resource collection. Signed-off-by: Christopher Haar <christopher.haar@upbound.io>
Expose the raw schema resources (CRD manifests, OpenAPI documents) of a project's crd and k8s dependencies, fetched from the same sources the dependency manager generates language schemas from. Hosts use them to validate rendered resources against those dependencies' types. Signed-off-by: Christopher Haar <christopher.haar@upbound.io>
haarchri
force-pushed
the
feat/project-library-api
branch
from
November 18, 2026 14:12
e25e1e7 to
55d532c
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.
Description of your changes
This PR adds a small, supported surface for other CLIs and tools to embed the crossplane CLI's project-related commands and machinery instead of reimplementing them:
The pkg/cli / pkg/project split follows the suggestion from earlier discussion: terminal/config/kong glue in one package, project machinery in the other.
Downstream CLIs that support crossplane projects currently either shell out or fork the implementation, which drifts. Exposing a narrow facade keeps one implementation of project parsing, building, and schema generation, while hosts keep their own UX.
the git proxy options from #543 will be exposed through BuildOptions in a follow-up once both merge
Fixes #
I have:
./nix.sh flake checkto ensure this PR is ready for review.backport release-x.ylabels to auto-backport this PR.Need help with this checklist? See the cheat sheet.
Validation
Existing unit tests pass; the exports are exercised end-to-end by the downstream consumer (project init/build/push/test flows, schema generation for host CRDs, dependency schema validation).