AI prompts
base on Connect your local process and your cloud environment, and run local code in cloud conditions. <div align="center">
![mirrord logo](./images/logo.svg)
</div>
[![Discord](https://img.shields.io/discord/933706914808889356?color=5865F2&label=Discord&logo=discord&logoColor=white)](https://discord.gg/metalbear)
![License](https://img.shields.io/badge/license-MIT-green)
![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/metalbear-co/mirrord)
[![Twitter Follow](https://img.shields.io/twitter/follow/metalbearco?style=social)](https://twitter.com/metalbearco)
[mirrord lets developers run local processes in the context of their Kubernetes environment](https://mirrord.dev/).
It’s meant to provide the benefits of running your service on a cloud environment (e.g. staging) without actually
going through the hassle of deploying it there, and without disrupting the environment by deploying untested code.
It comes as a Visual Studio Code extension, an IntelliJ plugin and a CLI tool. You can read more about it [here](https://mirrord.dev/docs/overview/introduction/).
# Contents
- [Contents](#contents)
- [Getting Started](#getting-started)
- [VS Code Extension](#vs-code-extension)
- [Installation](#installation)
- [How To Use](#how-to-use)
- [IntelliJ Plugin](#intellij-plugin)
- [Installation](#installation-1)
- [How To Use](#how-to-use-1)
- [CLI Tool](#cli-tool)
- [Installation](#installation-2)
- [How To Use](#how-to-use-2)
- [How It Works](#how-it-works)
- [Additional capabilities](#additional-capabilities)
- [FAQ](#faq)
- [Contributing](#contributing)
- [Help and Community](#help-and-community)
- [Code of Conduct](#code-of-conduct)
- [License](#license)
---
## Getting Started
- [VS Code Extension](#vs-code-extension)
- [IntelliJ Plugin](#intellij-plugin)
- [CLI Tool](#cli-tool)
> mirrord uses your machine's default kubeconfig for access to the Kubernetes API.
---
## VS Code Extension
### Installation
Get the extension [here](https://marketplace.visualstudio.com/items?itemName=MetalBear.mirrord).
### How To Use
- Click "Enable mirrord" on the status bar
- Start debugging your project
- Choose pod to impersonate
- The debugged process will be plugged into the selected pod by mirrord
<p align="center">
<img src="./images/vscode.gif">
</p>
---
## IntelliJ Plugin
### Installation
Get the plugin [here](https://plugins.jetbrains.com/plugin/19772-mirrord).
### How To Use
- Click the mirrord icon in the Navigation Toolbar
- Start debugging your project
- Choose a namespace and pod to impersonate
- The debugged process will be plugged into the selected pod by mirrord
<p align="center">
<img src="./intellij-ext/src/main/resources/META-INF/usage.gif">
</p>
---
## CLI Tool
### Installation
You can use either
```sh
brew install metalbear-co/mirrord/mirrord
```
or
```sh
curl -fsSL https://raw.githubusercontent.com/metalbear-co/mirrord/main/scripts/install.sh | bash
```
- Windows isn't currently supported (you can use WSL)
### How To Use
```sh
mirrord exec <process command> --target <target-path>
```
e.g.
```sh
mirrord exec node app.js --target pod/my-pod
```
---
## How It Works
When you select a pod to impersonate, mirrord launches a pod on the same node as the pod you selected.
The new pod is then used to connect your local process and the impersonated pod: it mirrors incoming traffic from the pod to your process,
routes outgoing traffic from your process through the pod, and does the same for file reads, file writes, and environment variables.
You can read more about it [here](https://mirrord.dev/docs/overview/introduction/).
### Additional capabilities
Container run inside the pod launched by mirrord requires additional [Linux capabilities](https://man7.org/linux/man-pages/man7/capabilities.7.html):
- `CAP_NET_ADMIN` and `CAP_NET_RAW` - for modifying routing tables
- `CAP_SYS_PTRACE` - for reading target pod environment
- `CAP_SYS_ADMIN` - for joining target pod network namespace
However, you can disable any subset of those in the [configuration](https://mirrord.dev/docs/reference/configuration/).
This will possibly limit mirrord functionalities or even make it unusable in some setups.
```bash
MIRRORD_AGENT_DISABLED_CAPABILITIES=CAP_NET_RAW,CAP_SYS_PTRACE mirrord exec node app.js --target pod/my-pod
```
<p align="center">
<img src="./images/how_it_works.svg" alt="How It Works"/>
</p>
## FAQ
Our FAQ is available [here](https://mirrord.dev/docs/faq/general/).
If you have a question that's not on there, feel free to ask in our [Discussions](https://github.com/metalbear-co/mirrord/discussions)
or on [Discord](https://discord.gg/metalbear).
## Contributing
Contributions are very welcome. Start by checking out our [open issues](https://github.com/metalbear-co/mirrord/issues), and by going through our [contributing guide](CONTRIBUTING.md).
We're available on [Discord](https://discord.gg/metalbear) for any questions.
## Help and Community
Join our [Discord Server](https://discord.gg/metalbear) for questions, support and fun.
## Code of Conduct
We take our community seriously and we are dedicated to providing a safe and welcoming environment for everyone.
Please take a few minutes to review our [Code of Conduct](./CODE_OF_CONDUCT.md).
## License
[MIT](./LICENSE)
", Assign "at most 3 tags" to the expected json: {"id":"1980","tags":[]} "only from the tags list I provide: [{"id":77,"name":"3d"},{"id":89,"name":"agent"},{"id":17,"name":"ai"},{"id":54,"name":"algorithm"},{"id":24,"name":"api"},{"id":44,"name":"authentication"},{"id":3,"name":"aws"},{"id":27,"name":"backend"},{"id":60,"name":"benchmark"},{"id":72,"name":"best-practices"},{"id":39,"name":"bitcoin"},{"id":37,"name":"blockchain"},{"id":1,"name":"blog"},{"id":45,"name":"bundler"},{"id":58,"name":"cache"},{"id":21,"name":"chat"},{"id":49,"name":"cicd"},{"id":4,"name":"cli"},{"id":64,"name":"cloud-native"},{"id":48,"name":"cms"},{"id":61,"name":"compiler"},{"id":68,"name":"containerization"},{"id":92,"name":"crm"},{"id":34,"name":"data"},{"id":47,"name":"database"},{"id":8,"name":"declarative-gui "},{"id":9,"name":"deploy-tool"},{"id":53,"name":"desktop-app"},{"id":6,"name":"dev-exp-lib"},{"id":59,"name":"dev-tool"},{"id":13,"name":"ecommerce"},{"id":26,"name":"editor"},{"id":66,"name":"emulator"},{"id":62,"name":"filesystem"},{"id":80,"name":"finance"},{"id":15,"name":"firmware"},{"id":73,"name":"for-fun"},{"id":2,"name":"framework"},{"id":11,"name":"frontend"},{"id":22,"name":"game"},{"id":81,"name":"game-engine "},{"id":23,"name":"graphql"},{"id":84,"name":"gui"},{"id":91,"name":"http"},{"id":5,"name":"http-client"},{"id":51,"name":"iac"},{"id":30,"name":"ide"},{"id":78,"name":"iot"},{"id":40,"name":"json"},{"id":83,"name":"julian"},{"id":38,"name":"k8s"},{"id":31,"name":"language"},{"id":10,"name":"learning-resource"},{"id":33,"name":"lib"},{"id":41,"name":"linter"},{"id":28,"name":"lms"},{"id":16,"name":"logging"},{"id":76,"name":"low-code"},{"id":90,"name":"message-queue"},{"id":42,"name":"mobile-app"},{"id":18,"name":"monitoring"},{"id":36,"name":"networking"},{"id":7,"name":"node-version"},{"id":55,"name":"nosql"},{"id":57,"name":"observability"},{"id":46,"name":"orm"},{"id":52,"name":"os"},{"id":14,"name":"parser"},{"id":74,"name":"react"},{"id":82,"name":"real-time"},{"id":56,"name":"robot"},{"id":65,"name":"runtime"},{"id":32,"name":"sdk"},{"id":71,"name":"search"},{"id":63,"name":"secrets"},{"id":25,"name":"security"},{"id":85,"name":"server"},{"id":86,"name":"serverless"},{"id":70,"name":"storage"},{"id":75,"name":"system-design"},{"id":79,"name":"terminal"},{"id":29,"name":"testing"},{"id":12,"name":"ui"},{"id":50,"name":"ux"},{"id":88,"name":"video"},{"id":20,"name":"web-app"},{"id":35,"name":"web-server"},{"id":43,"name":"webassembly"},{"id":69,"name":"workflow"},{"id":87,"name":"yaml"}]" returns me the "expected json"