Thoughts on splitting the openhands-cli into its o...
# proj-sdk
q
Thoughts on splitting the openhands-cli into its own repo? Its complicating our lint configuration CIs, test coverage CI, and release notes
a
this sounds like an objectively good idea.. but are there any pros/cons for either approach?
what benefit (if any) are we getting with openhands-cli being in its current repo / monorepo?
q
i think the reason its in the same repo is because 1. we want one repo as the entrypoint for end users to run openhands in all the different ways (gui, cli, etc) 2. the CLI project's pypi package name is
openhands
which is the same name as the repo (good to have naming consistency) 3. the current openhands repo has a ton of stars and can prevent splitting stars across repos
w
Yeah main concern is splitting our visibility
but it is technically the right move
@quiet-night-61895 was investigating monorepo best practices at some point
q
👆for release procedure/notes specifically might be worth evaluating release-please 🙏
q
Yeah I have some reading on that, we can talk
👍 1
c
release-please assumes we are using conventional commit messages thinky spin We are totally not doing that
If we want that, I think we'd need some automatic rename / reminder / something
q
Sorry what was the through-line from talking about if cli should be its own repo and talking about release notes procedure? (Edit, oh I see it at the end of the initial comment now)
nod 1
Thinking through this, Agent-SDK "the core" is it's own repo now, "the big OpenHands" is the GUI, which itself runs in at least 3 forms depending on how you count. The ability to make independent apps that use the SDK seems like it would be reflected in breaking out the CLI. But that is an argument of what's logical. I'm ambivalent about that. I care about what effect it has on our development. The CI complexity is not nothing, but I think of other benefits. I'm suspecting that it will become easier to keep track of changes both for OpenHands and CLI repos to not have them intermingled, for instance. Basically if something will make development less failure-prone, that becomes a very big plus for it, if there's an argument it does the opposite, I also weigh that highly. To other objections: As far as being discoverable, a promenant readme link could be fine. On splitting visibility, over time our reach will be helped by being an easier codebase to contribute to. If we have something that's hard to manage, this will not be good for our place in the ecosystem. An independent historical musing: The GUI is what was OpenDevin, that one slick packaging that started all this. If it was a CLI at that point it would have been OpenAider (which was just Aider).
🔥 1
c
Yeah main concern is splitting our visibility
I just saw we splitting evaluation. Which makes sense to me, since technically, it's on
agent-sdk
going forward. It seems to me that visibility has two aspects: • towards users/contributors, that is, for them to find it • for contributors. The first could have solutions, with links to make it easy, maybe setup script, maybe submodule. The second seems more difficult in the general case, but is it a concern for v1 CLI since it just restarted?
a
if we continue to put out an awesome product experience and add a link to the readme I promise you people will have no trouble finding a seperated out cli repo
👍 1
q
If I was to be more succinct: Current visibility ✅ 🥳 Current quality (we’d love to improve) We have so many options to continue our already successful visibility, so until I hear from one of the people whose job that is, I'm going to assume it's not really on the same playing field with fixing our dev process, if it's an actual improvement. Not just some bikeshedding, and I don't think this is that
🤣 1
So this isn't so much an appeal that cli splitout is fully understood to be a good idea, but that's where I think the criteria should be
q
Just an additional data point worth considering, is that eventually we want the entire OH ecosystem to be super cohesive. We have a user story around connecting local CLI to OH cloud, which reduces how standalone we consider the CLI
(technically the code will still be a separate project, the only hard requirement is strong contracts between services)
c
Re: quality It seems to me that separating repos may help with quality, at least because, well, it may be less likely to end up with dependencies where they don't belong, aka coupling things too tightly unintently maybe. (Although there's no guarantee.) I also see it as a test of sorts, since it's a possible interface to agent-sdk, does it have all the time all it needs and works; and/or maybe what it needs can show us what other uses of agent-sdk need etc.; when things break for it, we can see why
a
I’m not fully understanding why the CLI can’t be standalone/split out and still super cohesive with OH cloud via the network
but also totally agree with Ray that we should prioritize whatever is best for our own development quality + speed over anything else
q
^ Great question Alona. Indeed http services can have stable communication of independently managed components over a defined interface. That’s the point of them, even. However I think Rohit’s concern has some precedent in our context because we have a history of managing these interfaces in an unstable way. So it can be done right but there is a sense that we would have to change some habits to do that. That’s also a factor we’re taking on with the server API in the SDK I think
a
hmm.. habits are indeed stronger than engineering best practices
q
> dependencies where they don't belong It's true that it enforces/encourages that. We also have other options wherever we have a clear idea of what connections there shouldn't be. The java library ArchUnit is an example of the pattern, but it doesn't need a library it's just a matter of putting your expectations into a test.
a test of sorts, since it's a possible interface to agent-sdk, does it have all the time all it needs and works
That's somewhat convincing, it's a continual validation that the SDK is the thing we think it is for people.
c
This point reminds me of the open source resolver. Graham and Rohit developed it in a separate repo, and at some point we integrated it into the main OH repo. While I was happy to see the PR integrating it (for multiple reasons), the one thought I had that cut the other way around a bit was exactly this: - it was maybe the best and largest (to my knowledge) application built on OH, at that time, and I felt we are maybe losing information about what goes wrong for such client applications, when we integrated it. e.g. There was a change to logging at some point, because the Saas needed to avoid PII I think, that cut out a lot of logs from default behavior of OH. We took care to re-set it as expected for users of the default use-case, docker run, okay, but the resolver got it immediately too - it lost most logs, visibility into what happened. And had to think about how to fix it, so that all use cases are covered. It's a very small example, to be sure, but I'm rather happy if we have such canaries close by. 😊 This is actually a point of view I had while playing with a vscode prototype built to work with the OH server, because it was an alternative client that helped me see a bit where the Web FE and server were maybe assuming a little too much between each other. 😅
Cases like this cut the other way around, too, because it's also perfectly possible that if it's too hard to maintain such client applications built on OH, well then, that, on one hand, is saying something about OH codebase/extensibility, and on the other hand, it has consequences on developing other client applications.
q
> @quiet-night-61895 was investigating monorepo best practices at some point Found the most fleshed out thing I said at the time, enclosed below. In context of current convo I think "TLDR: GitHub Actions fights this, there are tools but it's probably too complicated to be a clear improvement if we can avoid it." If someone does look at some of this and makes a more specific case for it being a win, I'm open to hearing. There are other repo structure questions too like docker images, but saying that right now I am thinking of CLI. > Nx did look like an interesting new choice. My spidey sense was that it might bait me into some proprietary lock-in, but I didn't have solid info there. With the breach now it does feel "put it back in the oven". > > This site has helpful tool comparisons and as you can see there are many dimensions to compare, it's unfortunately not a simple as what's the best monorepo tool right now. > https://monorepo.tools > > So I think we might have to try out a few and dig deeper on criteria. But for Python I'd look into Pants. If we wanted the same monorepo tool to support Python and Typescript I think it becomes harder, not many options. > > I'm also intrigued by this blog on setting up a UV monorepo using Dagger. As we're going to need to do some pretty advanced deploy automation there could be other reasons to explore Dagger.
c
Perhaps we need a monorepo tool anyway, for • FE • openhands-ui • OH-app-server • enterprise server • (?) CLI • (?) vscode extension e.g. I look at "detecting affected projects/packages" as I read monorepo.tools 🤔 Another monorepo advantage seems to be consistent tooling. I already see in agent-sdk and docs actually, that we setup things anew, and they seem inconsistent. Maybe that's ok for those two, but here maybe we'd repeat ourselves if we make CLI separate...