Skip to main content
Lesson 9 of 16 · Mistral Vibe: AI Coding CLI

Explore a Codebase with Vibe

Lesson 9 of 16 Updated November 2, 2026 Developer
On this page
  1. Automatic Project Scanning
  2. Navigating the Code
  3. Git Context, Read in Real Time
  4. Digging Deeper Through Conversation
  5. Explore Safely with the ask Agent or a Read-Only Agent
  6. Key Takeaways

Lesson updated November 2, 2026: The built-in Plan mode no longer exists in Vibe Code; read-only exploration now happens via the ask agent or a custom agent. Source: Agents.

Automatic Project Scanning

As soon as you launch Vibe in a directory, the agent automatically scans your project. This work happens before you even type your first message. It maps the file tree—folder structure, key files, and configuration files—then checks the Git status, including the active branch, modified files, untracked files, and the latest commit. Next, it identifies the project type based on present configuration files (package.json, pyproject.toml, Cargo.toml, etc.) and reads these manifests to identify declared dependencies.

This context is injected into the conversation immediately upon opening. The practical result is clear: open Vibe in a repository you’ve never seen, ask “What is the architecture of this project?”, and the agent answers instantly because it doesn’t need to fetch anything—the file tree and manifests are already in front of it.

In an unfamiliar project, the first question is almost always about the overall structure. Ask it simply:

Give me an overview of this project. What are the main files and how are they organized?

Vibe traverses directories, opens key files—README, configuration, entry points—and gives you a summary. From there, you can search precisely. To find a function, variable, or pattern in the code, the agent relies on grep and ripgrep in the background; it chooses the most efficient tool itself, preferring ripgrep on large projects for speed. Ask questions in natural language:

Where is the handleAuthentication function defined?
Find all files that import the database module
Which endpoints use the rateLimiter middleware?

When you already know which file interests you, direct the agent’s attention using the @ prefix, supported by autocompletion:

Explain the code in @src/api/routes/auth.ts

Nothing limits you to a single reference per message, making direct comparisons very natural:

Compare @src/old/handler.py and @src/new/handler.py, what are the differences?

Git Context, Read in Real Time

Because Vibe tracks the repository state during the session, you can query it about your current work rather than static code. Ask which files have changed since the last commit, have it summarize changes on the feature/auth branch compared to main, or spot untracked files that should go into .gitignore. In each case, the agent runs the necessary commands itself—git status, git diff, git log—and presents the results in a readable format, so you don’t have to decode raw output.

The same logic applies to dependencies. A question like “What are the main dependencies of this project? Are any obsolete?” leads the agent to read package.json, pyproject.toml, or the equivalent for your ecosystem. And if an MCP fetch server is configured, it can even check actually available versions to answer “Is this project using a recent version of React?”.

Digging Deeper Through Conversation

The real value of Vibe for exploration lies in the conversational nature of the exchange: every answer opens the door to the next, more precise question.

> Explain the structure of the src/services/ folder
< The folder contains 5 services: auth, email, payment, storage, and notification...

> Detail the payment service, how does it handle webhooks?
< The payment service uses Stripe with a webhook handler in payment/webhooks.ts...

> Show me the webhook handler code
< [Displays file content]

This iterative approach is often faster than manual searching in an editor, precisely in the scenario where you are least equipped: when you don’t know the codebase yet and therefore don’t know what to look for.

Explore Safely with the ask Agent or a Read-Only Agent

Auditing third-party code or digging into a sensitive project raises a legitimate question: what if the agent modifies something? Vibe no longer has a built-in Plan mode. Two solutions exist: the ask agent, selected with Shift+Tab or vibe --agent ask, which asks you before using any tool; or, better yet, a custom read-only agent (disabled_tools = ["edit", "write_file"], bash set to ask), described in the Advanced Mistral Vibe course. The latter behaves as follows:

The agent canThe agent cannot
Read filesWrite or modify files
Search codeExecute shell commands
Analyze project structureCreate new files

Make it a habit to switch to a read-only agent before reviewing any code you didn’t write yourself: you keep all the exploration comfort described above, with zero risk of side effects.

Key Takeaways

  • Vibe automatically scans the file tree, Git status, and dependencies on launch
  • The @ prefix lets you reference specific files with autocompletion
  • Code searches use grep/ripgrep in the background
  • Conversational exploration lets you dig progressively into the code
  • A read-only agent (or the ask agent) guarantees side-effect-free exploration