---
metadata:
  - name: generator
    content: Diplodoc Platform v5.71.0
alternate:
  - https://vibe.sourcecraft.dev/portal/docs/en/cli-ref/src-ycodex-install.md
  - https://vibe.sourcecraft.dev/portal/docs/ru/cli-ref/src-ycodex-install.md
  - https://vibe.sourcecraft.dev/portal/docs/ru/cli-ref/src-ycodex-install.md
  - href: https://vibe.sourcecraft.dev/portal/docs/ru/cli-ref/src-ycodex-install.md
    type: text/markdown
    title: Markdown version
  - href: https://vibe.sourcecraft.dev/portal/docs/ru/llms.txt?revision=r22245536
    rel: describedby
---
> **Documentation Index:** Fetch the complete configuration index at https://vibe.sourcecraft.dev/portal/docs/ru/llms.txt?revision=r22245536

# src ycodex install

Install Codex if it is not already installed.

Downloads the appropriate Codex binary for your platform and installs it
to the local app directory (~/.config/sourcecraft/bin/). Linux installations also
include the matching codex-resources/bwrap sandbox helper.

With src ycodex install, installs separately into the aistudio subdirectory. Linux/WSL
AI Studio 1.1.0+ installs preserve the vendor package: bin/ycodex (ycodex.exe on Windows),
code-mode host, ripgrep and platform sandbox helpers. Linux/WSL includes bwrap.
Earlier releases retain their flat binary layout. Plain src codex selects upstream.

Existing installations are updated through shared startup prompts or
"src update --auto". This install command repairs missing or damaged license documents without replacing the binary.

## Usage

`src ycodex install [flags]`

### Examples

**Install the latest version**

`src codex install`

**Install AI Studio alongside upstream**

`src ycodex install`

### Inherited flags

| Flag | Description |
| --- | --- |
| `--aistudio` | Use native AI Studio authentication and backend instead of SourceCraft |
| `--env string` | Override Sourcecraft environment (use 'src envs' to list available) |
| `--json string` | Output JSON, optionally filtered (--json or --json=field1,field2) |
| `--json-compact string` | Output compact JSON, optionally filtered |
| `-R, --repo string` | Select another repository using OWNER/REPO format |
| `-V, --verbose` | Enable debug logging output |

### Learn more

Use `src ycodex install <subcommand> --help` for more information about a command.
