Repository navigation
Add setting-up-local-cluster skill for local development setup #7
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,175 @@ | ||||||||||||||||||||||||||||||||||||||
| --- | ||||||||||||||||||||||||||||||||||||||
| name: setting-up-local-cluster | ||||||||||||||||||||||||||||||||||||||
| description: Downloads and starts a local CockroachDB cluster for development using the official binary. Use when a developer needs a local CockroachDB instance, when no cluster is available, or when setting up a new development environment. | ||||||||||||||||||||||||||||||||||||||
| --- | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| # Setting Up a Local CockroachDB Cluster | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| Guides you through downloading, installing, and starting a local CockroachDB cluster for development. Uses the official binary -- no Docker or external runtime dependencies required. | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| ## When to Use This Skill | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| - Developer asks to "set up CockroachDB" or "start a local database" | ||||||||||||||||||||||||||||||||||||||
| - No CockroachDB cluster is reachable | ||||||||||||||||||||||||||||||||||||||
| - Developer wants to build an app with CockroachDB from scratch | ||||||||||||||||||||||||||||||||||||||
| - Setting up a new development environment | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| ## Prerequisites | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| - macOS (Intel or Apple Silicon), Linux (Intel or ARM), or Windows (Intel) | ||||||||||||||||||||||||||||||||||||||
| - `curl` or `wget` available for downloading the binary | ||||||||||||||||||||||||||||||||||||||
| - ~500 MB disk space per node | ||||||||||||||||||||||||||||||||||||||
| - Ports 26257-26259 (SQL), 26357-26359 (RPC), and 8080-8082 (DB Console) available for a 3-node cluster | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| ## Step 1: Detect Platform and Download | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| Detect the OS and architecture, then download the appropriate binary. | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+24
to
+27
|
||||||||||||||||||||||||||||||||||||||
| ### Download URLs | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| Base URL: `https://binaries.cockroachdb.com/` | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| | OS | Architecture | Filename Pattern | | ||||||||||||||||||||||||||||||||||||||
| |----|-------------|-----------------| | ||||||||||||||||||||||||||||||||||||||
| | Linux | Intel (amd64) | `cockroach-v{VERSION}.linux-amd64.tgz` | | ||||||||||||||||||||||||||||||||||||||
| | Linux | ARM (arm64) | `cockroach-v{VERSION}.linux-arm64.tgz` | | ||||||||||||||||||||||||||||||||||||||
| | macOS | Intel (amd64) | `cockroach-v{VERSION}.darwin-10.9-amd64.tgz` | | ||||||||||||||||||||||||||||||||||||||
| | macOS | Apple Silicon (arm64) | `cockroach-v{VERSION}.darwin-11.0-arm64.tgz` | | ||||||||||||||||||||||||||||||||||||||
| | Windows | Intel (amd64) | `cockroach-v{VERSION}.windows-6.2-amd64.zip` | | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| Replace `{VERSION}` with the desired release (e.g., `25.4.9`). See [CockroachDB Releases](https://www.cockroachlabs.com/docs/releases/) for the latest GA version. | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| ### Installation | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| ```bash | ||||||||||||||||||||||||||||||||||||||
| # Example: macOS Apple Silicon, v25.4.9 | ||||||||||||||||||||||||||||||||||||||
| curl -fsSL https://binaries.cockroachdb.com/cockroach-v25.4.9.darwin-11.0-arm64.tgz | tar xz | ||||||||||||||||||||||||||||||||||||||
| mkdir -p ~/.cockroachdb/bin | ||||||||||||||||||||||||||||||||||||||
| cp cockroach-v25.4.9.darwin-11.0-arm64/cockroach ~/.cockroachdb/bin/ | ||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+40
to
+48
|
||||||||||||||||||||||||||||||||||||||
| Replace `{VERSION}` with the desired release (e.g., `25.4.9`). See [CockroachDB Releases](https://www.cockroachlabs.com/docs/releases/) for the latest GA version. | |
| ### Installation | |
| ```bash | |
| # Example: macOS Apple Silicon, v25.4.9 | |
| curl -fsSL https://binaries.cockroachdb.com/cockroach-v25.4.9.darwin-11.0-arm64.tgz | tar xz | |
| mkdir -p ~/.cockroachdb/bin | |
| cp cockroach-v25.4.9.darwin-11.0-arm64/cockroach ~/.cockroachdb/bin/ | |
| Replace `{VERSION}` with the desired CockroachDB release. See [CockroachDB Releases](https://www.cockroachlabs.com/docs/releases/) to choose a release. | |
| ### Installation | |
| ```bash | |
| # Example: macOS Apple Silicon | |
| curl -fsSL https://binaries.cockroachdb.com/cockroach-v{VERSION}.darwin-11.0-arm64.tgz | tar xz | |
| mkdir -p ~/.cockroachdb/bin | |
| cp cockroach-v{VERSION}.darwin-11.0-arm64/cockroach ~/.cockroachdb/bin/ |
Copilot
AI
Apr 24, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The prerequisites and download table mention Windows, but the Installation section only shows a macOS curl | tar example and doesn’t include Windows (PowerShell) download/extract steps or PATH guidance. Add a Windows-specific snippet (or explicitly scope the skill to WSL/macOS/Linux) so the Windows claim is actionable.
Copilot
AI
Apr 24, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The stop commands will still emit errors from cat if a PID file doesn’t exist (stderr redirection only applies to kill). Consider guarding with a file existence check or redirecting cat stderr as well, so “stop” is quiet/idempotent when nodes aren’t running.
| kill $(cat ~/.cockroachdb/data/node1/cockroach.pid) 2>/dev/null | |
| kill $(cat ~/.cockroachdb/data/node2/cockroach.pid) 2>/dev/null | |
| kill $(cat ~/.cockroachdb/data/node3/cockroach.pid) 2>/dev/null | |
| [ -f ~/.cockroachdb/data/node1/cockroach.pid ] && kill "$(cat ~/.cockroachdb/data/node1/cockroach.pid)" 2>/dev/null | |
| [ -f ~/.cockroachdb/data/node2/cockroach.pid ] && kill "$(cat ~/.cockroachdb/data/node2/cockroach.pid)" 2>/dev/null | |
| [ -f ~/.cockroachdb/data/node3/cockroach.pid ] && kill "$(cat ~/.cockroachdb/data/node3/cockroach.pid)" 2>/dev/null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
scripts/validate-spec.pyemits a naming warning when the skill name doesn’t end withing(and doesn’t match one of its allowed gerund prefixes).setting-up-local-clusterwill trigger that warning; consider renaming to an*-ingform (and matching the directory name) if you want validation to be clean even under--strict.