Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .gitbook.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
root: ./docs/

structure:
summary: ./SUMMARY.md
summary: ./SUMMARY.md
Comment thread
liron-sel marked this conversation as resolved.

redirects:
using-mirrord/vscode-extension: installing-mirrord/vscode
using-mirrord/intellij-plugin: installing-mirrord/intellij
using-mirrord/wsl: installing-mirrord/wsl
10 changes: 6 additions & 4 deletions docs/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,18 @@
* [Onboarding Wizard](overview/onboarding-wizard.md)
* [mirrord for Teams](overview/teams.md)
* [Contributing](overview/contributing.md)
* [Installing mirrord](installing-mirrord/README.md)
* [CLI](installing-mirrord/cli.md)
* [VS Code](installing-mirrord/vscode.md)
* [JetBrains IDEs](installing-mirrord/intellij.md)
* [WSL](installing-mirrord/wsl.md)
* [Using mirrord](using-mirrord/README.md)
* [Traffic Filtering](using-mirrord/traffic-filtering.md)
* [Filtering by JSON body](using-mirrord/filtering-by-json-body.md)
* [Outgoing Filter](using-mirrord/outgoing-filter.md)
* [Targetless](using-mirrord/targetless.md)
* [Local Container](using-mirrord/local-container.md)
* [Browser Extension](using-mirrord/browser-extension.md)
* [Port Forwarding](using-mirrord/port-forwarding.md)
* [WSL](using-mirrord/wsl.md)
* [IntelliJ Plugin](using-mirrord/intellij-plugin.md)
* [VSCode Extension](using-mirrord/vscode-extension.md)
* [HTTPS Stealing](using-mirrord/steal-https.md)
* [Queue Splitting](using-mirrord/queue-splitting.md)
* [Sessions](using-mirrord/sessions.md)
Expand All @@ -27,6 +28,7 @@
* [Branch Management](using-mirrord/db-branch-management.md)
* [Advanced Configuration](using-mirrord/db-branching-advanced-config.md)
* [mirrord for CI](using-mirrord/mirrord-for-ci.md)
* [Working with Local Containers](using-mirrord/local-container.md)
* [Connecting External Tools](using-mirrord/connecting-external-tools.md)
* [Web Browsing](using-mirrord/web-browsing.md)
* [Postman](using-mirrord/postman.md)
Expand Down
27 changes: 27 additions & 0 deletions docs/installing-mirrord/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
title: Installing mirrord

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this section duplicative with Quick Start? Why do we need both?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is duplicated content, but its relevant to both the quickstart and this section too. If someone is looking for more complete instructions than what you would typically find in a quick start, I would expect to find it here.

description: How to install mirrord on your local machine
---

# Installing mirrord

mirrord can be installed and used in several ways depending on your development workflow:

- **[CLI](cli.md)** - Install the mirrord command-line tool directly
- **[VS Code](vscode.md)** - Install the mirrord extension for Visual Studio Code and compatible editors (Cursor, Windsurf, etc.)
- **[JetBrains IDEs](intellij.md)** - Install the mirrord plugin for JetBrains IDEs (IntelliJ, PyCharm, GoLand, etc.)
- **[WSL](wsl.md)** - Set up mirrord on Windows using the Windows Subsystem for Linux

## Local Requirements

For your local machine, you may use any of:
- MacOS (Intel, Apple Silicon)
- Linux (x86_64)
- Windows (x86_64), WSL (x86_64)
- IDE plugins support for native mirrord for Windows is currently not supported

kubectl needs to be configured on the local machine.

## mirrord for Teams

If you're planning to use [mirrord for Teams](https://app.metalbear.com), you'll also need to install the mirrord Operator. See the [mirrord for Teams](../overview/teams.md) page for installation instructions.
93 changes: 93 additions & 0 deletions docs/installing-mirrord/cli.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
---
title: CLI
description: Installing and using the mirrord CLI
---

# CLI

The mirrord CLI is the core tool for running mirrord from the command line.

## Installation

{% tabs %}
{% tab title="MacOS/Linux" %}

To install the CLI, run:

```bash
brew install metalbear-co/mirrord/mirrord
```

or

```bash
curl -fsSL https://raw.githubusercontent.com/metalbear-co/mirrord/main/scripts/install.sh | bash
```
{% endtab %}

{% tab title="Windows" %}
To install the CLI, run:

```powershell
choco install --pre mirrord
```
{% endtab %}
{% endtabs %}

## Usage

To use mirrord to plug a local process into a pod/deployment in the cluster configured with kubectl, run:

```bash
mirrord exec --target <target-path> <command used to run the local process>
```

For example:

```bash
mirrord exec --target pod/app-pod-01 python main.py
```

Use `mirrord --help` to see all available commands.

## Configuration

mirrord is configured using a JSON or YAML configuration file. The CLI reads its configuration from this file — by default, it looks for `.mirrord/mirrord.json` in the current directory. You can specify a different configuration file with the `-f` flag:

```bash
mirrord exec -f my-config.json --target pod/app-pod python main.py
```

Configuration options are documented in the [configuration reference](https://metalbear.com/mirrord/docs/config/options).

## Interactive Setup

You can use `mirrord wizard` to generate a `mirrord.json` configuration file interactively. This walks you through common use cases and helps you create a configuration tailored to your needs. See the [Onboarding Wizard](../overview/onboarding-wizard.md) for more information.

## Listing Targets

To see available targets in your cluster:

```bash
mirrord ls
```

This will list all pods, deployments, and other resources that mirrord can target.

## Verifying Installation

To verify mirrord is installed correctly:

```bash
mirrord --version
```

To check connectivity to your cluster and the mirrord Operator (if using [mirrord for Teams](../overview/teams.md)):

```bash
mirrord operator status
```

{% hint style="info" %}
**Got it working? Stuck?** Either way, [come say hi in Slack](https://metalbear.com/slack)
{% endhint %}
Original file line number Diff line number Diff line change
@@ -1,26 +1,14 @@
---
title: IntelliJ Plugin
date: 2025-01-07T00:00:00.000Z
lastmod: 2025-01-07T00:00:00.000Z
draft: false
menu:
docs:
parent: using-mirrord
weight: 160
toc: true
tags:
- open source
- team
- enterprise
description: Using the mirrord plugin in JetBrains' IDEs
title: JetBrains IDEs
description: Installing and using the mirrord plugin in JetBrains IDEs
---

# IntelliJ Plugin
# JetBrains IDEs

If you develop your application in one of the JetBrains' IDEs (e.g PyCharm, IntelliJ or GoLand), you can debug it with mirrord using our JetBrains Marketplace [plugin](https://plugins.jetbrains.com/plugin/19772-mirrord). Simply:

1. Download the plugin
2. Enable mirrord using the toolbar button (next to "mirrord" popup menu) ![Select Active Config action](intellij-plugin/images/enabler.png)
2. Enable mirrord using the toolbar button (next to "mirrord" popup menu) ![Select Active Config action](intellij/images/enabler.png)
3. Run or debug your application as you usually do

When you start a debugging session with mirrord enabled, you'll be prompted with a target selection dialog. This dialog will allow you to select the target in your Kubernetes cluster that you want to impersonate.
Expand Down Expand Up @@ -49,21 +37,21 @@ mirrord's target can be specified in two ways:

1. with the target selection dialog
* The dialog will only appear if the mirrord config does not specify the target.
* The dialog will initially show targets in the namespace specified in the mirrord config ([`.target.namespace`](https://app.gitbook.com/s/Z7vBpFMZTH8vUGJBGRZ4/options#target.namespace)). If the namespace is not specified, your Kubernetes user's default namespace will be used.
* The dialog will initially show targets in the namespace specified in the mirrord config ([`.target.namespace`](https://metalbear.com/mirrord/docs/config/options#target.namespace)). If the namespace is not specified, your Kubernetes user's default namespace will be used.
* If you want to see targets in a different namespace, there is a dropdown to choose between namespaces.
2. in the mirrord config's [target section](https://app.gitbook.com/s/Z7vBpFMZTH8vUGJBGRZ4/options#target)
2. in the mirrord config's [target section](https://metalbear.com/mirrord/docs/config/options#target)

### Using the mirrord config

The plugin allows for using the [mirrord config](https://app.gitbook.com/s/Z7vBpFMZTH8vUGJBGRZ4/). For any run/debug session, the mirrord config to be used can be specified in multiple ways:
The plugin allows for using the [mirrord config](https://metalbear.com/mirrord/docs/config/options). For any run/debug session, the mirrord config to be used can be specified in multiple ways:

#### Active config

The toolbar dropdown menu allows for specifying a temporary mirrord config override. This config will be used for all run/debug sessions.

To specify the override, use `Select Active Config` action.

![Select Active Config action](intellij-plugin/images/select-active-config.png)
![Select Active Config action](intellij/images/select-active-config.png)

You will be prompted with a dialog where you can select a mirrord config from your project files. For the file to be present in the dialog, its path must contain `mirrord` and end with either `.json`, `.yaml` or `.toml`.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,9 @@
---
title: VSCode Extension
date: 2025-01-07T00:00:00.000Z
lastmod: 2025-01-07T00:00:00.000Z
draft: false
menu:
docs:
parent: using-mirrord
weight: 165
toc: true
tags:
- open source
- team
- enterprise
description: Using the mirrord extension in Visual Studio Code
title: VS Code
description: Installing and using the mirrord extension in Visual Studio Code
---

# VSCode Extension
# VS Code

If you develop your application in Visual Studio Code, you can debug it with mirrord using our Visual Studio Marketplace [extension](https://marketplace.visualstudio.com/items?itemName=MetalBear.mirrord). Simply:

Expand All @@ -27,7 +15,7 @@ The mirrord extension is also available for all VS Code forks like Cursor, Winds

2. Enable mirrord using the "mirrord" button on the bottom toolbar

![mirrord button](vscode-extension/images/enabler.png)
![mirrord button](vscode/images/enabler.png)

3. Run or debug your application as you usually do

Expand Down Expand Up @@ -79,7 +67,7 @@ The toolbar dropdown menu allows for specifying a temporary mirrord config overr

To specify the override, use `Select active config` action.

![select active config action](vscode-extension/images/select-active-config.png)
![select active config action](vscode/images/select-active-config.png)

You will be prompted with a quick pick where you can select a mirrord config from your project files. For the file to be present in the dialog, it must either be located in a directory which name ends with `.mirrord`, or have a name that ends with `mirrord`. Accepted config file extensions are: `json`, `toml`, `yml` and `yaml`.

Expand Down
Loading