# Contributing to OpenShell ## Prerequisites Install [mise](https://mise.jdx.dev/). This is used to set up the development environment. ```bash # Install mise (macOS/Linux) curl https://mise.run | sh ``` After installing `mise`, activate it with `mise activate` or [add it to your shell](https://mise.jdx.dev/getting-started.html). Shell setup examples: ```bash # Fish echo '~/.local/bin/mise activate fish | source' >> ~/.config/fish/config.fish # Zsh echo 'eval "$(~/.local/bin/mise activate zsh)"' >> ~/.zshrc ``` Project requirements: - Rust 1.88+ - Python 3.12+ - Docker (running) ## Getting Started ```bash # One-time trust mise trust # Launch a sandbox (deploys a cluster if one isn't running) mise run sandbox ``` ## Building the `openshell` CLI Inside this repository, `openshell` is a local shortcut script at `scripts/bin/openshell`. The script will 1. Build `navigator-cli` if needed. 2. Run the local debug CLI binary under `target/debug/openshell`. Because `mise` adds `scripts/bin` to `PATH` for this project, you can run `openshell` directly from the repo. ```bash openshell --help openshell sandbox create -- codex ``` ### Cluster debugging helpers Two additional scripts in `scripts/bin/` provide gateway-aware wrappers for cluster debugging: | Script | What it does | |--------|-------------| | `kubectl` | Runs `kubectl` inside the active gateway's k3s container via `openshell doctor exec` | | `k9s` | Runs `k9s` inside the active gateway's k3s container via `openshell doctor exec` | These work for both local and remote gateways (SSH is handled automatically). Examples: ```bash kubectl get pods -A kubectl logs -n navigator statefulset/navigator k9s k9s -n navigator ``` ## Main Tasks These are the primary `mise` tasks for day-to-day development: | Task | Purpose | | ------------------ | ------------------------------------------------------- | | `mise run cluster` | Bootstrap or incremental deploy | | `mise run sandbox` | Create a sandbox on the running cluster | | `mise run test` | Default test suite | | `mise run e2e` | Default end-to-end test lane | | `mise run ci` | Full local CI checks (lint, compile/type checks, tests) | | `mise run docs` | Build and serve documentation locally | | `mise run clean` | Clean build artifacts | ## Project Structure | Path | Purpose | | --------------- | --------------------------------------------- | | `crates/` | Rust crates | | `python/` | Python SDK and bindings | | `proto/` | Protocol buffer definitions | | `tasks/` | `mise` task definitions and build scripts | | `deploy/` | Dockerfiles, Helm chart, Kubernetes manifests | | `architecture/` | Architecture docs and plans | ## Pull Requests 1. Create a feature branch from `main` 2. Make your changes with tests 3. Run `mise run ci` to verify 4. Open a PR with a clear description ### Commit Messages This project uses [Conventional Commits](https://www.conventionalcommits.org/). All commit messages must follow the format: ``` (): [optional body] [optional footer(s)] ``` **Types:** - `feat` - New feature - `fix` - Bug fix - `docs` - Documentation only - `chore` - Maintenance tasks (dependencies, build config) - `refactor` - Code change that neither fixes a bug nor adds a feature - `test` - Adding or updating tests - `ci` - CI/CD changes - `perf` - Performance improvements **Examples:** ``` feat(cli): add --verbose flag to openshell run fix(sandbox): handle timeout errors gracefully docs: update installation instructions chore(deps): bump tokio to 1.40 ``` ### DCO All contributions must include a `Signed-off-by` line in each commit message. This certifies you have the right to submit the work under the project license. See the [Developer Certificate of Origin](https://developercertificate.org/). ```bash git commit -s -m "feat(sandbox): add new capability" ``` Use the `create-github-pr` skill to help with opening your pull request.