> For the complete documentation index, see [llms.txt](https://metalbear.com/mirrord/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://metalbear.com/mirrord/docs/getting-started/installing-mirrord/cli.md). # CLI How to install the mirrord CLI on your machine and run your first session from the terminal. 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 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 ``` 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). For a user-wide Operator preference or default Kubernetes context, see [Global Configuration](/mirrord/docs/getting-started/installing-mirrord/cli/global-configuration.md). Other settings in the global file are not yet applied. ## 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](/mirrord/docs/getting-started/quick-start/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](/mirrord/docs/getting-started/installing-mirrord/operator.md)): ```bash mirrord operator status ``` {% hint style="info" %} **Got it working? Stuck?** Either way, [come say hi in Slack](https://metalbear.com/slack) {% endhint %} --- # Agent Instructions This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com. ## Querying This Documentation If you need additional information that is not directly available in this page, you can query the documentation by asking a question. Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters: ``` GET https://metalbear.com/mirrord/docs/getting-started/installing-mirrord/cli.md?ask=&goal= ``` `ask` is the immediate question: it should be specific, self-contained, and written in natural language. `goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.