# Code viewer The code viewer is a read-only interface in Code Workspaces for browsing, comparing, and sharing the committed state of a repository. Use it as a consistent reference for code developed in Foundry editors, local development environments, or AI-assisted workflows. The code viewer shows the committed state stored in the repository. Editor changes appear only after they are committed and synchronized. It is available alongside VS Code, JupyterLab®, and RStudio® Workbench. You can use the code viewer without creating or starting an editor workspace. ## Browse code To open the code viewer: 1. Open **Code Workspaces**. 2. Open a repository. 3. Select the **Code viewer** tab in the page header. Use the code viewer to: * Browse files on a branch, tag, or commit. * Search by file name or across file contents. * View supported files, including Markdown files and Jupyter® notebooks, as rendered documents or source code. * Preview published functions in function repositories. ![Browse files and view committed code in the code viewer.](../../../assets/595807c31b9a9cdc0c4e24d16d50edfcb270b4ef35acad635ff795b167a384ed.webp) ## Compare changes To compare two points in repository history: 1. Select **Compare changes**. 2. Choose a branch for each side of the comparison, then select a commit or tag. 3. Select a changed file to view a side-by-side diff. ![Compare two repository references in a side-by-side diff.](../../../assets/09f8debd7ca6dbe8489cbe90d56249aead7ff7c258db8ff1a0131c1e309e8cf4.webp) ## Share code Links to branches change as the branch advances. To share a stable reference to an exact commit and line range: 1. Select a line number. To select a range, drag across the line numbers or hold **Shift** while selecting another line. 2. Open the **Line actions** menu next to the selection. 3. Select **Copy permalink**. ![Copy a permalink to selected lines.](../../../assets/d50d7dc4b3837fe7b36fba69f4c5ce9e1050d158c0a84af6428850274e6e52d9.webp) ## Continue in an editor To make changes, select the tab for an editor such as **VS Code**, **Jupyter**, or **RStudio**. By default, when you open a [stopped VS Code workspace](../getting-started/index.md#code-workspace-lifecycle), the code viewer opens while its workspace session starts in the background. The **VS Code** tab icon shows the workspace status. The code viewer remains open when the workspace is ready, so select **VS Code** to continue editing. To disable this behavior, select **Settings > Preferences**, then clear **Open code viewer while workspace is loading**.