Skip to content
This repository was archived by the owner on Feb 25, 2026. It is now read-only.

feat: add optional cwd path argument to serve command#129

Closed
pschiel wants to merge 2 commits intoKilo-Org:devfrom
pschiel:serve-project-argument
Closed

feat: add optional cwd path argument to serve command#129
pschiel wants to merge 2 commits intoKilo-Org:devfrom
pschiel:serve-project-argument

Conversation

@pschiel
Copy link
Copy Markdown
Contributor

@pschiel pschiel commented Feb 5, 2026

Fixes Kilo-Org/kilocode#6330

Summary

  • for debugging, bun needs to start in the development build directory
  • makes it currently impossible to debug different scenarios/projects

This patch adds positional argument for cwd folder opencode serve [cwd]

Usage:

bun run --cwd /path/to/packages/opencode --inspect-wait=ws://localhost:6499/ ./src/index.ts \
  serve --port 4096 /my/project/path

Add project directory parameter to serve command.

Conflict resolution:
- packages/opencode/src/cli/cmd/serve.ts: Merge cwd positional argument with kilo branding
@pschiel pschiel force-pushed the serve-project-argument branch from 2524219 to 9950a7b Compare February 20, 2026 19:16
Comment thread packages/opencode/src/cli/cmd/serve.ts Outdated
@kilo-code-bot
Copy link
Copy Markdown
Contributor

kilo-code-bot Bot commented Feb 20, 2026

Code Review Summary

Status: No Issues Found | Recommendation: Merge

The PR adds an optional [cwd] positional argument to the serve command, allowing users to specify a working directory. The implementation is clean and follows existing patterns in the codebase. The previous review feedback (wrapping process.chdir() in try/catch) has been addressed in the latest commit.

Files Reviewed (1 files)
  • packages/opencode/src/cli/cmd/serve.ts - No issues

Co-authored-by: kiloconnect[bot] <240665456+kiloconnect[bot]@users.noreply.github.com>
@markijbema
Copy link
Copy Markdown
Contributor

Hi! Thank you for taking the time to contribute to this project—we really appreciate it. 🙏

We are currently working on re-platforming the core of our VS Code and JetBrains extensions to be based on our new Kilo CLI, with a complete rebuild based on OpenCode as our new foundation, and the moment has come to promote this repository to become the main repository. To do that, we moved the code from this repository to the kilocode repository.

This unfortunately means we cannot merge this branch here anymore. Please add https://github.com/Kilo-Org/kilocode.git as a remote, and push your branch there and create a new PR in https://github.com/Kilo-Org/kilocode . We unfortunately cannot do this for you as then the PR would not be in your name anymore. If you need any help, feel free to ask on our Discord in #kilo-dev-contributors

Sorry for the inconvenience and thank you for contributing to Kilo!

@markijbema markijbema closed this Feb 22, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE]: add optional cwd path argument to serve command

2 participants