Skip to content

feat: make kopium usable as a library #347

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

the-wondersmith
Copy link

@the-wondersmith the-wondersmith commented Aug 5, 2025

PR makes kopium usable as a library in addition to its current standalone tool status.

Addresses #335

Copy link
Member

@clux clux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hey, thanks for the showcase for this. it's a decent start.

i'm not keen on just exposing most of main as a library interface though. arg parsing / stdin reading / auto complete / crd detection etc is not really a lib concern.

i am open to refactors that lifts stuff from main into the output module (or some similar formatter moduler) because then the already published library (e.g. the one with docs here) would be more useful.

also, file renames and large shifting around like this is also not great because this means i have a very hard github diff to review. kind of github problem and not yours, but i work with what's here 😢

@the-wondersmith
Copy link
Author

@clux Would it be uhh.. keener to extract everything that isn't parsing / stdin reading / auto complete / crd detection to the lib level then? Happy to take a second pass at it.

@the-wondersmith the-wondersmith force-pushed the feat/kopium-as-library branch from c35e0d3 to cfac1bd Compare August 7, 2025 17:00
@the-wondersmith
Copy link
Author

@clux took that second pass and separated all the "clearly CLI" from "probably library" code. Hopefully it's closer to spec?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants