Getting Started with Mira Code

Mira Code is an AI-powered coding assistant that lives in your terminal. It understands your entire codebase, can edit files, run commands, search code, and help with git — all through natural language.

What is Mira Code?

Mira Code is a CLI tool that brings AI capabilities directly into your development workflow. Unlike web-based chatbots, Mira Code runs locally in your project and has full context of your codebase.

  • Codebase understandingAutomatically analyzes project structure, dependencies, and code patterns
  • Multi-file editingCreates, modifies, and deletes files across multiple locations simultaneously
  • Terminal commandsRuns build, test, lint, and any other shell commands on your behalf
  • Git integrationCreates commits, reviews changes, manages branches

System Requirements

  • Node.jsVersion 18.0 or higher
  • npmComes bundled with Node.js
  • TerminalAny modern terminal emulator (iTerm2, Windows Terminal, Hyper, VS Code integrated terminal)
  • Mira accountA free account on platform.vmira.ai

Installation

Install Mira Code globally via npm:

Install
npm install -g mira-code

Verify the installation was successful:

Check version
mira --version

First Run

Navigate to your project directory and run the mira command:

Launch Mira Code
cd your-project
mira

On the first launch, you will see a security notice and terms of service. After accepting, the device code authentication flow begins:

Authentication flow
$ mira

  Mira Code v0.1.0

  Security Notice:
  Mira Code can read and modify files in this directory.
  It can also execute terminal commands on your behalf.
  Always review suggested changes before approving.

  Do you accept the Terms of Service? (y/n): y

  To authenticate, open this URL in your browser:
  https://platform.vmira.ai/authorize

  Enter the code: ABCD-1234

  Waiting for approval...
  ✓ Authenticated successfully!

  Welcome to Mira Code. How can I help?
  >
Your API key is stored locally in ~/.mira.json. You will not need to re-authenticate until the key expires.

Basic Usage

Once running, simply describe what you need in natural language:

Example: creating a component
> Create a React button component with primary, secondary, and ghost variants using Tailwind CSS

  I'll create a new Button component for you.

  Created: src/components/ui/Button.tsx
  ✓ Button component with 3 variants (primary, secondary, ghost)
  ✓ TypeScript props interface
  ✓ Tailwind CSS styling
  ✓ Forwarded ref support
Example: fixing a bug
> The login form is not validating email addresses properly

  Let me search for the login form implementation...

  Found: src/components/LoginForm.tsx
  The issue is on line 42 — the regex pattern is missing
  the TLD validation.

  Modified: src/components/LoginForm.tsx
  ✓ Updated email regex to properly validate TLDs
  ✓ Added test case for edge cases

You can also run Mira Code in one-shot mode for quick tasks:

One-shot mode
mira "add a loading spinner to the Dashboard component"

Next Steps