> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mirage.strukto.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Read VFS.md

> Read VFS.md as Markdown for the selected session.

```markdown 200
---
name: workspace-filesystem
description: The virtual filesystem layout of this workspace.
---

# Virtual Filesystem

You work in a terminal over a virtual filesystem. Read files with shell commands; access is checked for each operation.

| Path | Description |
| --- | --- |
| `/` | `ram`, write |
| `/dev` | `ram`, write |

## Supported Unix Commands for VFS

Unix commands work on each path as on a local filesystem, as far as the path supports them:

| Path | Supported |
| --- | --- |
| `/` | Almost all Unix commands. |
| `/dev` | Almost all Unix commands. |

## Limitations of Unix Commands for VFS

Where a path differs from a local filesystem:

| Path | Limitations |
| --- | --- |
| `/` | `grep -r`, `find` and `du` stop after 10000 files; a glob matching more, `tar -c`, `cp -r` and `rm -r` are refused. |
| `/dev` | `grep -r`, `find` and `du` stop after 10000 files; a glob matching more, `tar -c`, `cp -r` and `rm -r` are refused. |

Run `man <cmd>` or `<cmd> --help` for one command's usage.

```

> [accordion] Errors
>
> | Status | Meaning |
> | - | - |
> | `401` | The token is missing or wrong |
> | `404` | The workspace, session, job or file does not exist |
> | `422` | Validation Error |
> | `429` | Past a rate limit, or a new session past max\_sessions |
>
> See [error examples and recovery steps](https://docs.mirage.strukto.ai/api/errors.md). The [complete OpenAPI contract](https://github.com/strukto-ai/mirage/blob/main/docs/openapi.yaml) includes every response schema.


## OpenAPI

````yaml /openapi.yaml get /v1/workspaces/{workspace_id}/vfs-md
openapi: 3.2.0
info:
  title: Mirage API
  version: '0.1'
servers:
  - url: http://127.0.0.1:8765
    description: A local server on its default port
security:
  - bearerAuth: []
tags:
  - name: Workspace operations
    x-group: Workspaces
  - name: Workspaces
    x-group: Lifecycle
    parent: Workspace operations
  - name: Sessions
  - name: Shell
    parent: Workspace operations
  - name: VFS
    parent: Workspace operations
  - name: Tools
  - name: Documents
    x-group: Agent Instructions
    parent: Workspace operations
  - name: Snapshots
  - name: Templates
    parent: Configuration
  - name: Saved VFS
    x-group: VFS
    parent: Configuration
  - name: Saved CLIs
    x-group: CLI
    parent: Configuration
  - name: Saved runtimes
    x-group: Runtime
    parent: Configuration
  - name: Saved machines
    x-group: Machine
    parent: Configuration
  - name: Configuration
  - name: Policies
    parent: Configuration
  - name: Asks
    parent: Workspace operations
    x-group: Approval requests
  - name: Lines
    parent: Workspace operations
    x-group: Commands
  - name: Jobs
    parent: Workspace operations
  - name: Processes
    parent: Workspace operations
  - name: Machines
    parent: Workspace operations
  - name: Server
  - name: Service
    parent: Server
  - name: Daemon
    parent: Server
  - name: Auth
paths:
  /v1/workspaces/{workspace_id}/vfs-md:
    get:
      tags:
        - Documents
      summary: Read VFS.md
      description: Read VFS.md as Markdown for the selected session.
      operationId: get_v1_workspaces__workspace_id__vfs_md_get
      parameters:
        - $ref: '#/components/parameters/workspaceId'
        - $ref: '#/components/parameters/sessionId'
        - name: profile
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
      responses:
        '200':
          $ref: '#/components/responses/VfsDocument'
components:
  parameters:
    workspaceId:
      name: workspace_id
      in: path
      required: true
      description: Workspace ID.
      schema:
        type: string
      example: demo
    sessionId:
      name: session_id
      in: query
      required: false
      description: Session ID to use. If omitted, the default session is used.
      schema:
        type: string
      example: analysis
  responses:
    VfsDocument:
      description: Generated VFS.md document.
      content:
        text/markdown:
          schema:
            type: string
          example: >
            ---

            name: workspace-filesystem

            description: The virtual filesystem layout of this workspace.

            ---


            # Virtual Filesystem


            You work in a terminal over a virtual filesystem. Read files with
            shell commands; access is checked for each operation.


            | Path | Description |

            | --- | --- |

            | `/` | `ram`, write |

            | `/dev` | `ram`, write |


            ## Supported Unix Commands for VFS


            Unix commands work on each path as on a local filesystem, as far as
            the path supports them:


            | Path | Supported |

            | --- | --- |

            | `/` | Almost all Unix commands. |

            | `/dev` | Almost all Unix commands. |


            ## Limitations of Unix Commands for VFS


            Where a path differs from a local filesystem:


            | Path | Limitations |

            | --- | --- |

            | `/` | `grep -r`, `find` and `du` stop after 10000 files; a glob
            matching more, `tar -c`, `cp -r` and `rm -r` are refused. |

            | `/dev` | `grep -r`, `find` and `du` stop after 10000 files; a glob
            matching more, `tar -c`, `cp -r` and `rm -r` are refused. |


            Run `man <cmd>` or `<cmd> --help` for one command's usage.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        The server's token (MIRAGE_AUTH_TOKEN) or a JWT. A daemon in the default
        local mode with no token accepts requests without one.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.