Skip to content
Back to search

kurtosis

A platform for packaging and launching blockchain infra. Think docker compose for blockchain

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

It has changed since its scan on 11 Nov 2026.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/kurtosis-tech/kurtosis with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/kurtosis-tech/kurtosis'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/kurtosis-tech--kurtosis/badge.svg)](/listings/kurtosis-tech--kurtosis)

HTML

<a href="/listings/kurtosis-tech--kurtosis"><img src="/api/listings/kurtosis-tech--kurtosis/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

Skills are auto-discovered by Claude Code when present in a project's `skills/` directory. There are several ways to install them:

Option 1: Clone the repository (contributors)

If you're contributing to Kurtosis, skills are already included:

git clone https://github.com/kurtosis-tech/kurtosis.git
cd kurtosis

Claude Code will automatically discover the skills when you open a conversation in this directory.

Option 2: Copy skills into your project

Copy the `skills/` directory into any project where you want Claude to have Kurtosis knowledge:

# From the kurtosis repo, copy skills into your project
cp -r /path/to/kurtosis/skills /path/to/your-project/skills

Option 3: Symlink from another project

If you want to keep skills in sync with the Kurtosis repo without copying:

# Symlink the entire skills directory
ln -s /path/to/kurtosis/skills /path/to/your-project/skills

# Or symlink individual skills
mkdir -p /path/to/your-project/skills
ln -s /path/to/kurtosis/skills/run-package /path/to/your-project/skills/run-package

Option 4: Install globally for all projects

To make Kurtosis skills available across all your Claude Code projects, add them to your global Claude configuration:

# Copy skills to your global Claude config
cp -r /path/to/kurtosis/skills ~/.claude/skills

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 635 lines · 2 findings marked

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. <img src="./readme-static-files/logo.png" width="1200">
  2. [![Follow us on X, formerly Twitter](https://img.shields.io/twitter/follow/KurtosisTech?style=social)](https://twitter.com/Kurtosistech)
  3. [![Number of GitHub stars](https://img.shields.io/github/stars/kurtosis-tech/kurtosis)](https://github.com/kurtosis-tech/kurtosis/stargazers)
  4. ----
  5. What is Kurtosis?
  6. =================
  7. Have you ever tried to build on top of a colleague's work, or contribute to an open source project, just to get stuck on the first steps of spinning up a stack to play with? [Kurtosis](https://www.kurtosis.com) handles the complexity of spinning up ephemeral dev or test stacks so you can focus on developing, not configuring.
  8. Kurtosis is formed of:
  9. - A packaging system for distributing backend stack definitions, which can run on docker or on kubernetes
  10. - A runtime with a per-stack file management system for reproducibly initializing the state of your stack
  11. - A set of tools to enable devs to interact with their stacks, like they do on docker or k8s
  12. Why use Kurtosis?
  13. =========================
  14. Kurtosis is best for:
  15. - Reusing the logic in your stack definitions for all of: local dev, scheduled testing in CI, and ad-hoc larger-scale testing on k8s clusters
  16. - Giving other devs a way to spin up your application, and commonly used variations of it, with one-liners, via Kurtosis' packaging and parameterization systems
  17. - Handling complex setup logic in your backend stack, like passing arbitrary data between services as they start up, and enforcing arbitrary wait conditions
  18. How is Kurtosis different than Docker Compose or Helm?
  19. ==========================
  20. Kurtosis operates at a level higher than Docker Compose or Helm, and produces stacks running on either of the underlying engines (the Docker engine, or Kubernetes).
  21. Because of this additional layer of abstraction, we are able to introduce several features to improve the experience of spinning up ephemeral stacks:
  22. - A per-stack file management system that enables portable state initialization for dev or test stacks
  23. - Stack-level parameterizability; users have a powerful and flexible way (beyond messing with env vars) to affect modifications in their stacks
  24. - First-class plug-and-play composability; it's expected for users to import stack definitions into larger stacks, and this experience is optimized
  25. - The ability to get all of the above, but running over _either_ the docker engine or k8s, at your election
  26. `NOTE: we do NOT recommend using Kurtosis to deploy long term production environments at this moment. Any issues/Discords related to production usage will be closed.`
  27. How do I get going?
  28. ===================
  29. To see Kurtosis in action, first install it using the instructions [here](https://docs.kurtosis.com/install).
  30. Then, run the [Redis voting app Kurtosis package](https://github.com/kurtosis-tech/awesome-kurtosis/tree/main/redis-voting-app):
  31. ```bash
  32. kurtosis run github.com/kurtosis-tech/awesome-kurtosis/redis-voting-app
  33. ```
  34. <img src="./readme-static-files/redis-voting-app-run-output.png">
  35. Finally, open the `http` link printed in the last line in your browser.
  36. If you have an issue or feature request, we'd love to hear about it through one of the following:
  37. - Post your question on our [Github Discussions Forum](https://github.com/kurtosis-tech/kurtosis/discussions/new?category=q-a)
  38. - [Asking for help on our Discord server][discord]
  39. - Filing an issue on our [Github](https://github.com/kurtosis-tech/kurtosis/issues/new/choose) (which can also be done via `kurtosis feedback --bug` or `kurtosis feedback --feature`)
  40. - [Messaging us on Twitter][twitter]
  41. ### Going further
  42. To try more Kurtosis packages just like this one, check out the [`awesome-kurtosis` repo][awesome-kurtosis]!
  43. To learn about how to write Kurtosis packages, check out our [quickstart][quickstart-reference].
  44. To read about how Kurtosis works, see [our documentation][docs].
  45. To see where we're going with the product, check out the roadmap [here](https://github.com/kurtosis-tech/kurtosis/wiki/Short%E2%80%90term-Roadmap).
  46. Got more questions? Drop them in our [Github Discussions](https://github.com/kurtosis-tech/kurtosis/discussions/new?category=q-a) where we, or other community members, can help answer.
  47. Claude Code Skills
  48. ========================
  49. This repository includes [Claude Code](https://claude.ai/download) skills that teach Claude how to work with Kurtosis. Skills are structured prompts in the `skills/` directory that give Claude operational knowledge about building, debugging, deploying, and managing Kurtosis enclaves.
  50. ### Available Skills
  51. | Skill | Description |
  52. |-------|-------------|
  53. | `clean` | Clean up enclaves and artifacts |
  54. | `cli-local-build` | Build the CLI from source |
  55. | `cluster-manage` | Manage Kurtosis clusters |
  56. | `context-manage` | Manage Kurtosis contexts |
  57. | `docker-debug` | Debug Docker-based enclaves |
  58. | `docker-local-build` | Build and load Docker images locally |
  59. | `dump` | Dump enclave state for debugging |
  60. | `enclave-inspect` | Inspect running enclaves |
  61. | `engine-manage` | Start, stop, and restart the engine |
  62. | `files-inspect` | Inspect files artifacts |
  63. | `gateway` | Manage the Kurtosis gateway |
  64. | `grafloki` | Query Grafana and Loki observability |
  65. | `import-compose` | Import Docker Compose files |
  66. | `k8s-clean-cluster` | Clean Kurtosis resources from K8s |
  67. | `k8s-debug-pods` | Debug pods on Kubernetes |
  68. | `k8s-dev-deploy` | Build and deploy dev images to K8s |
  69. | `lint` | Lint the codebase |
  70. | `port-forward` | Forward ports from enclaves |
  71. | `portal` | Manage the Kurtosis portal |
  72. | `run-package` | Run Starlark packages |
  73. | `service-manage` | Manage services within enclaves |
  74. | `starlark-dev` | Develop Starlark packages |
  75. ### Installing Skills
  76. Skills are auto-discovered by Claude Code when present in a project's `skills/` directory. There are several ways to install them:
  77. #### Option 1: Clone the repository (contributors)
  78. If you're contributing to Kurtosis, skills are already included:
  79. ```bash
  80. git clone https://github.com/kurtosis-tech/kurtosis.git
  81. cd kurtosis
  82. ```
  83. Claude Code will automatically discover the skills when you open a conversation in this directory.
  84. #### Option 2: Copy skills into your project
  85. Copy the `skills/` directory into any project where you want Claude to have Kurtosis knowledge:
  86. ```bash
  87. # From the kurtosis repo, copy skills into your project
  88. cp -r /path/to/kurtosis/skills /path/to/your-project/skills
  89. ```
  90. #### Option 3: Symlink from another project
  91. If you want to keep skills in sync with the Kurtosis repo without copying:
  92. ```bash
  93. # Symlink the entire skills directory
  94. ln -s /path/to/kurtosis/skills /path/to/your-project/skills
  95. # Or symlink individual skills
  96. mkdir -p /path/to/your-project/skills
  97. ln -s /path/to/kurtosis/skills/run-package /path/to/your-project/skills/run-package
  98. ```
  99. #### Option 4: Install globally for all projects
  100. To make Kurtosis skills available across all your Claude Code projects, add them to your global Claude configuration:
  101. ```bash
  102. # Copy skills to your global Claude config
  103. cp -r /path/to/kurtosis/skills ~/.claude/skills
  104. ```
  105. ### Using Skills
  106. Once installed, skills are invoked as slash commands in Claude Code:
  107. ```
  108. /clean # Clean up enclaves
  109. /run-package # Run a Starlark package
  110. /docker-debug # Debug Docker containers
  111. /k8s-debug-pods # Debug Kubernetes pods
  112. ```
  113. You can also reference skills naturally in conversation — Claude will use the relevant skill context automatically when discussing Kurtosis topics.
  114. Contributing to Kurtosis
  115. ========================
  116. <details>
  117. <summary>Expand to see contribution info</summary>
  118. See our [CONTRIBUTING](./CONTRIBUTING.md) file.
  119. Repository Structure
  120. --------------------
  121. This repository is structured as a monorepo, containing the following projects:
  122. - `container-engine-lib`: Library used to abstract away container engine being used by the [enclave][enclave].
  123. - `core`: Container launched inside an [enclave][enclave] to coordinate its state
  124. - `engine`: Container launched to coordinate [enclaves][enclave]
  125. - `api`: Defines the API of the Kurtosis platform (`engine` and `core`)
  126. - `cli`: Produces CLI binary, allowing interaction with the Kurtosis system
  127. - `docs`: Documentation that is published to [docs.kurtosis.com](docs)
  128. - `internal_testsuites`: End to end tests
  129. Dev Dependencies (Nix)
  130. ----------------
  131. Install the [Nix package manager](https://nixos.org/download).
  132. ```bash
  133. sh <(curl -L https://nixos.org/nix/install)
    • Note: Runs a downloaded script through process substitution (bash <(curl …))
    • Line 189 on GitHub
  134. ```
  135. And enable some Nix flags (alternatively you can add `--extra-experimental-features 'nix-command flakes'` every time calling the `nix` command):
  136. ```bash
  137. mkdir -p ~/.config/nix
  138. echo "experimental-features = nix-command flakes" >> ~/.config/nix/nix.conf
  139. ```
  140. And to bring the environment up, just open a new shell terminal, go to the root folder of the repo and run:
  141. ```bash
  142. nix develop
  143. ```
  144. This will download all dev deps and setup the environment accordingly.
  145. You can also use the [`direnv`](https://direnv.net/) to automatically load the environment when entering the main folder or using a plugin in your preferred IDE:
  146. - `vscode`: [mkhl.direnv](https://github.com/direnv/direnv-vscode)
  147. - `jet brains`: [Direnv integration](https://plugins.jetbrains.com/plugin/15285-direnv-integration)
  148. Direnv can also be easily installed with Nix (or [HomeBrew](https://formulae.brew.sh/formula/direnv) if you prefer):
  149. ```bash
  150. nix-env -f '<nixpkgs>' -iA direnv
  151. ```
  152. Now you just to add the direnv hook to your shell:
  153. ```bash
  154. echo 'eval "$(direnv hook bash)"' >> ~/.bashrc
  155. # or for ZSH
  156. echo 'eval "$(direnv hook zsh)"' >> ~/.zshrc
  157. ```
  158. Now next time you open a new shell terminal and go to repo's folder you environment will update and load automatically.
  159. Dev Dependencies (Manual install)
  160. ----------------
  161. The commands below assume that the env variable BREW_PREFIX contains the brew prefix.
  162. ```bash
  163. BREW_PREFIX="$(brew --prefix)"
  164. ```
  165. #### Bash (5 or above)
  166. On MacOS:
  167. ```bash
  168. # Install modern version of bash, the one that ships on MacOS is too old
  169. brew install bash
  170. # Allow bash as shell
  171. echo "${BREW_PREFIX}/bin/bash" | sudo tee -a /etc/shells
  172. # Optional: make bash your default shell
  173. chsh -s "${BREW_PREFIX}/bin/bash"
  174. ```
  175. #### Git
  176. On MacOS:
  177. ```bash
  178. # Install modern version of git, the one that ships on MacOS can be too old
  179. brew install git
  180. ```
  181. #### Docker
  182. On MacOS:
  183. ```bash
  184. brew install docker
  185. ```
  186. #### Go (1.23 or above)
  187. On MacOS:
  188. ```bash
  189. brew install go@1.23
  190. # Add the Go binary dir to your PATH
  191. PATH="${BREW_PREFIX}/opt/go@1.23/bin:$PATH"
  192. # Add the GOPATH bin dir to your PATH
  193. PATH="${HOME}/go/bin:$PATH"
  194. ```
  195. On Ubuntu:
  196. ```bash
  197. wget https://go.dev/dl/go1.23.7.linux-amd64.tar.gz
  198. tar -C /usr/local -zxf go1.23.7.linux-amd64.tar.gz
  199. # Add the following to your bashrc or equivalent.
  200. export PATH=$PATH:/usr/local/go/bin
  201. ```
  202. #### Goreleaser
  203. On MacOS:
  204. ```bash
  205. brew install goreleaser/tap/goreleaser
  206. ```
  207. On Ubuntu:
  208. ```bash
  209. echo 'deb [trusted=yes] https://repo.goreleaser.com/apt/ /' | sudo tee /etc/apt/sources.list.d/goreleaser.list
  210. sudo apt update
  211. sudo apt install goreleaser
  212. ```
  213. #### Node (20.* or above) and Yarn
  214. On MacOS, using `NVM`:
  215. ```bash
  216. brew install nvm
  217. mkdir ~/.nvm
  218. nvm install 20.11.0
  219. npm install -g yarn
  220. ```
  221. On Ubuntu, using `NVM`:
  222. ```bash
  223. curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash
    • Note: Pipes a downloaded script directly into a shell (curl | sh / wget | bash)
    • Line 303 on GitHub
  224. source ~/.bashrc
  225. nvm install 20.11.0
  226. npm install -g yarn
  227. ```
  228. #### Rust
  229. On MacOS, Ubuntu:
  230. ```bash
  231. curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
  232. ```
  233. #### Go and Typescript protobuf compiler binaries
  234. On MacOS:
  235. ```bash
  236. brew install protoc-gen-go
  237. brew install protoc-gen-go-grpc
  238. go install connectrpc.com/connect/cmd/protoc-gen-connect-go@latest
  239. yarn global add ts-protoc-gen
  240. yarn global add grpc-tools
  241. ```
  242. On Ubuntu:
  243. ```bash
  244. go install google.golang.org/grpc/cmd/protoc-gen-go@latest
  245. go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
  246. go install connectrpc.com/connect/cmd/protoc-gen-connect-go@latest
  247. yarn global add ts-protoc-gen
  248. yarn global add grpc-tools
  249. ```
  250. #### OpenAPI generators for Go and Typescript
  251. On MacOS:
  252. ```bash
  253. go install github.com/deepmap/oapi-codegen/cmd/oapi-codegen@v1.16.2
  254. yarn global add openapi-typescript@7.0.0-next.5
  255. ```
  256. On Ubuntu:
  257. ```bash
  258. go install github.com/deepmap/oapi-codegen/cmd/oapi-codegen@v1.16.2
  259. yarn global add openapi-typescript@7.0.0-next.5
  260. ```
  261. Build Instructions
  262. ------------------
  263. To build the entire project, run:
  264. ```bash
  265. ./scripts/build.sh
  266. ```
  267. **Note:** If you encounter module import errors related to `github.com/kurtosis-tech/kurtosis/kurtosis_version`, you may need to generate the version constants first:
  268. ```bash
  269. ./scripts/generate-kurtosis-version.sh
  270. ```
  271. This script generates the required `kurtosis_version.go` file that contains version constants used throughout the codebase. The file is automatically generated during the build process, but may need to be run manually in some development scenarios.
  272. To only build a specific project, run the script on `./PROJECT/PATH/script/build.sh`, for example:
  273. ```bash
  274. ./container-engine-lib/scripts/build.sh
  275. ./core/scripts/build.sh
  276. ./api/scripts/build.sh
  277. ./engine/scripts/build.sh
  278. ./cli/scripts/build.sh
  279. ```
  280. If there are any changes to the Protobuf files in the `api` subdirectory, the Protobuf bindings must be regenerated:
  281. ```bash
  282. ./api/scripts/regenerate-protobuf-bindings.sh
  283. ```
  284. If you are developing Kurtosis over a Podman cluster, run:
  285. ```bash
  286. ./scripts/build.sh false true # no debug image, use podman
  287. ```
  288. This will use the Podman image builder for building images. See documentation in scripts for more details on build options.
  289. Running Dev Version
  290. ----------------------
  291. After building the project, run `./cli/cli/scripts/launch-cli.sh` just like you would the kurtosis command. This will launch the latest locally built version of the CLI, which will also start the engine and core containers using their latest built images.
  292. You can verify this by running `./cli/cli/launch-cli.sh engine status` and
  293. ```
  294. A Kurtosis engine is running with the following info:
  295. Version: 53d823 <-- or `-dirty` depending on the commit
  296. ```
  297. The version will be identical to the version on the latest dev versions of the engine image created - (can verify with `docker images`). Enclaves started by the engine will be started with the same version as the engine.
  298. If you'd like to specify a different core image version than that of the engine, you can do so with the `--api-container-version` flag on `enclave add` (e.g. `./cli/cli/scripts/build.sh enclave add --api-container-version <image tag>`).
  299. If you are working on multiple dev versions of the engine at a time, you can use `engine restart --version <image tag>` to specify exactly what version of the engine to use.
  300. For frequent contributors, we recommend attaching an alias to `kurtosis` and `./cli/cli/scripts/launch-cli.sh`.
  301. ```bash
  302. alias kt="kurtosis"
  303. alias dkt="$(pwd)/cli/cli/scripts/launch-cli.sh"
  304. ```
  305. If you want tab completion on the recently built CLI, you can alias it to `kurtosis`:
  306. ```bash
  307. alias kurtosis="$(pwd)/cli/cli/scripts/launch-cli.sh"
  308. kurtosis enclave add
  309. ```
  310. Unit Test Instructions
  311. ----------------------
  312. Build scripts also run unit tests as part of the build process.
  313. For all Go modules, run `go test ./...` on the module folder. For example:
  314. ```bash
  315. cd cli/cli/
  316. go test ./...
  317. ```
  318. E2E Test Instructions
  319. ---------------------
  320. Each project's build script also runs the unit tests inside the project. Running `./script/build.sh` will guarantee that all unit tests in the monorepo pass.
  321. To run the end-to-end tests:
  322. 1. Make sure Docker is running
  323. ```console
  324. $ docker --version
  325. Docker version X.Y.Z
  326. ```
  327. 2. Make sure Kurtosis Engine is running
  328. ```console
  329. $ kurtosis engine status
  330. A Kurtosis engine is running with the following info:
  331. Version: 0.X.Y
  332. ```
  333. 3. Run `test.sh` script
  334. ```console
  335. $ ./internal_testsuites/scripts/test.sh
  336. ```
  337. If you are developing the Typescript test, make sure that you have first built `api/typescript`. Any
  338. changes made to the Typescript package within `api/typescript` aren't hot loaded as of 2022-09-29.
  339. Run Debug Instructions (for Golang code so far)
  340. ----------------------------------------------
  341. For running CLI with Golang remote debug:
  342. 1. Build the CLI dev binary and run the command you want to debug (kurtosis version in this example), this will start the debug server and will wait for a client connection
  343. ```bash
  344. cli/cli/scripts/build.sh
  345. source ./scripts/set_kt_alias.sh
  346. ktdebug version
  347. ```
  348. 2. Open the command's file you want to debug
  349. 3. Add the breakpoint in the line where you want to stop the cursor
  350. <img src="./readme-static-files/goland-breakpoint.png" />
  351. 4. Then choose the "CLI-remote-debug" run configuration in the "run panel"
  352. 5. Press the "debug" button
  353. <img src="./readme-static-files/goland-debug-button.png" />
  354. 6. Use the debug panel to inspect the variables value and continue with the debug flow
  355. <img src="./readme-static-files/goland-debug-panel.png" />
  356. For running CLI with Delve debug client:
  357. 1. Build the CLI dev binary and run the command you want to debug (kurtosis version in this example), but first pass "dlv-terminal" as the first argument (this will start the Delve client in the terminal)
  358. ```bash
  359. cli/cli/scripts/build.sh
  360. source ./scripts/set_kt_alias.sh
  361. ktdebug dlv-terminal version
  362. ```
  363. 2. You can add a new breakpoint using the terminal client and the `break` command
  364. ```bash
  365. (dlv) break version.run:1
  366. ```
  367. 3. You can move the cursor to the breakpoint created in the previous step with the `continue` command
  368. ```bash
  369. (dlv) continue
  370. ```
  371. <img src="./readme-static-files/dlv-terminal.png" />
  372. 4. You can see [more Delve commands here][delve-docs]
  373. For running Kurtosis engine with Golang remote debug:
  374. 1. Run the main build script with the first argument `debug_mode` as true. This will generate a new Kurtosis engine container image which will contain the `debug` suffix in the name.
  375. ```bash
  376. scripts/build.sh true
  377. ```
  378. 2. Add the breakpoint in the line where you want to stop the cursor
  379. <img src="./readme-static-files/goland-engine-breakpoint.png" />
  380. 3. Run the engine in debug mode with the `ktdev engine start --debug-mode` or the `ktdev engine restart --debug-mode` commands
  381. ```bash
  382. source ./scripts/set_kt_alias.sh
  383. ktdev engine start --debug-mode
  384. ```
  385. 4. Then choose the "Engine-remote-debug" run configuration in the "run panel"
  386. 5. Press the "debug" button
  387. <img src="./readme-static-files/goland-engine-debug-button.png" />
  388. 6. Make a call to the engine's server (you can use the Kurtosis CLI or Postman) in order to reach out the breakpoint in the code
  389. 7. Use the debug panel to inspect the variables value and continue with the debug flow
  390. <img src="./readme-static-files/goland-debug-panel.png" />
  391. 8. You can debug the CLI and the Kurtosis engine's server at the same time by running it with `ktdebug` instead of `ktdev` mentioned in a previous step, remember to run both remote debug configurations in the Goland IDE.
  392. ```bash
  393. source ./scripts/set_kt_alias.sh
  394. ktdebug engine start
  395. ```
  396. Additional steps if you are debugging Kurtosis engine in K8s:
  397. 1. Upload the engine's image for debug to the K8s cluster
  398. ```bash
  399. # for example:
  400. k3d image load kurtosistech/engine:5ec6eb-dirty-debug
  401. ```
  402. 2. Run the port-forward script before pressing the debug button in Golang (in another terminal instance) to bind the host's port to the container's debug server port
  403. ```bash
  404. scripts/port-forward-engine-debug.sh
  405. ```
  406. 3. Do not forget to run the Kurtosis gateway after calling the engine's server (in another terminal instance also)
  407. ```bash
  408. ktdev gateway
  409. ```
  410. For running Kurtosis APIC with Golang remote debug:
  411. 1. Run the main build script with the first argument `debug_mode` as true. This will generate a new Kurtosis APIC container image which will contain the `debug` suffix in the name.
  412. ```bash
  413. scripts/build.sh true
  414. ```
  415. 2. Add the breakpoint in the line where you want to stop the cursor.
  416. <img src="./readme-static-files/goland-apic-breakpoint.png" />
  417. 3. Run the Kurtosis engine in debug more or not depending on if you want to also debug the engine.
  418. ```bash
  419. source ./scripts/set_kt_alias.sh
  420. ktdev engine start --debug-mode
  421. OR
  422. ktdev engine start # you will have to build the engine in the regular way `engine/scripts/build.sh` if you choose this version
  423. ```
  424. 4. Add a new enclave in debug mode with the `enclave add` command and passing the `debug-mode` flag. This will create a new APIC container with the debug server port bounded and waiting for a connection.
  425. IMPORTANT: You can only run one enclave in debug mode so far, if you want to run another one it will fail due the debug port is already in use,
  426. ```bash
  427. ktdev enclave add --debug-mode
  428. ```
  429. 5. Then choose the "APIC-remote-debug" run configuration in the "run panel"
  430. 6. Press the "debug" button
  431. <img src="./readme-static-files/goland-apic-debug-button.png" />
  432. 7. Find the APIC's GRPC server port in the host machine (you can check it in Docker Desktop or using the Docker CLI, it's the one bounded with the container's 7443 port)
  433. 8. Make a call to the APIC's server (you can use the Kurtosis CLI or Postman) in order to reach out the breakpoint in the code
  434. 9. Use the debug panel to inspect the variables value and continue with the debug flow
  435. <img src="./readme-static-files/goland-debug-panel.png" />
  436. 10. You can debug the CLI, the Kurtosis engine's server and the Kurtosis APIC's server at the same time by running it with `ktdebug` instead of `ktdev` mentioned in a previous step, remember to run the three remote debug configurations in the Goland IDE.
  437. ```bash
  438. source ./scripts/set_kt_alias.sh
  439. ktdev engine start --debug-mode
  440. ktdebug enclave add
  441. ```
  442. Additional steps if you are debugging Kurtosis engine in K8s:
  443. 1. Upload the APIC's image for debug to the K8s cluster
  444. ```bash
  445. # for example:
  446. k3d image load kurtosistech/core:5ec6eb-dirty-debug
  447. ```
  448. 2. Run the port-forward script before pressing the debug button in Golang (in another terminal instance) to bind the host's port to the container's debug server port
  449. ```bash
  450. scripts/port-forward-apic-debug.sh enclave-name
  451. ```
  452. 3. Do not forget to run the Kurtosis gateway after calling the APIC's server (in another terminal instance also)
  453. ```bash
  454. ktdev gateway
  455. ```
  456. </details>
  457. Sponsoring Kurtosis
  458. ========================
  459. Kurtosis is an open source tool maintained by [MAINTAINERS](./MAINTAINERS.md). If you find Kurtosis useful or use it for work, please consider [supporting the continued development of Kurtosis](https://github.com/sponsors/tedim52). Thank you 🙏
  460. <p>
  461. <a href="https://www.bloctopus.io/">
  462. <picture>
  463. <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/tedim52/.github/refs/heads/main/content/sponsors/bloctopus-dark.png">
  464. <img alt="bloctopus logo" src="https://raw.githubusercontent.com/tedim52/.github/refs/heads/main/content/sponsors/bloctopus-light.png" width="auto" height="70">
  465. </picture>
  466. </a>
  467. <a href="https://antithesis.com/">
  468. <picture>
  469. <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/tedim52/.github/refs/heads/main/content/sponsors/antithesis-dark.svg">
  470. <img alt="antithesis logo" src="https://raw.githubusercontent.com/tedim52/.github/refs/heads/main/content/sponsors/antithesis-light.svg" width="auto" height="70">
  471. </picture>
  472. </a>
  473. <a href="https://ethereum.foundation/">
  474. <picture>
  475. <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/tedim52/.github/refs/heads/main/content/sponsors/ethereum.png"></source>
  476. <img alt="ethereum logo" src="https://raw.githubusercontent.com/tedim52/.github/refs/heads/main/content/sponsors/ethereum.png" width="auto" height="70"></img>
  477. </picture>
  478. </a>
  479. </p>
  480. <!-------- ONLY LINKS BELOW THIS POINT -------->
  481. [enclave]: https://docs.kurtosis.com/advanced-concepts/enclaves
  482. [awesome-kurtosis]: https://github.com/kurtosis-tech/awesome-kurtosis#readme
  483. [quickstart-reference]: https://docs.kurtosis.com/quickstart
  484. [discord]: https://discord.gg/6Jjp9c89z9
  485. [kurtosis-tech]: https://github.com/kurtosis-tech
  486. [docs]: https://docs.kurtosis.com
  487. [twitter]: https://x.com/KurtosisTech
  488. [starlark-explanation]: https://docs.kurtosis.com/explanations/starlark
  489. [stackoverflow-2022-developer-survey--other-tools]: https://survey.stackoverflow.co/2022/#most-popular-technologies-tools-tech-prof
  490. [delve-docs]: https://github.com/go-delve/delve/blob/master/Documentation/cli/README.md

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.