# General Translation Integrations: paraglide-context install
URL: https://generaltranslation.com/en-GB/docs/integrations/paraglide/reference/install.mdx
Docs index: https://generaltranslation.com/llms.txt
Description: Install the framework packages a component format needs before collecting Paraglide JS source context. API reference for the paraglide-context install command.

Run it from the app when a collect run warns that a format&#39;s tool is missing. It does not analyse source files or write metadata.

## Overview [#overview]

```bash
npx paraglide-context install <language...> [options]
```

[`paraglide-context`](/docs/integrations/paraglide/reference/paraglide-context) writes the metadata. This subcommand installs the tools that command loads for the languages you name.

## How it works [#how-it-works]

* It installs dev dependencies with the package manager it detects for the project. A project with no detected manager uses npm.
* A package the project can already load is skipped. When every package is already available, the command lists them and does not run the package manager.
* A package that several languages need is installed once.
* Packages are added to the project whose `package.json` is nearest at or above [`--root`](#flags).
* TypeScript is installed as `typescript@^6`. Other packages are installed without a version range. TypeScript 7 has no JavaScript API, so `vue`, `svelte`, `markdown` and `mdx` stop the command when that TypeScript is already installed, and nothing is installed on that run.

| Language   | Packages                                    |
| ---------- | ------------------------------------------- |
| `vue`      | `@vue/language-core`, `typescript@^6`       |
| `svelte`   | `svelte2tsx`, `svelte`, `typescript@^6`     |
| `astro`    | `@astrojs/astro2tsx`                        |
| `mdx`      | `@mdx-js/language-service`, `typescript@^6` |
| `markdown` | `@vue/language-core`, `typescript@^6`       |
| `angular`  | `@angular/compiler`                         |
| `analog`   | `@angular/compiler`                         |
| `marko`    | `@marko/language-tools`, `@marko/compiler`  |
| `ember`    | `@glint/ember-tsc`                          |

`angular` covers inline Angular component templates and Angular HTML templates. `analog` uses the same `@angular/compiler` package. `markdown` is VitePress Markdown and uses the same packages as `vue`. The Pug plugin is separate: install `@vue/language-plugin-pug` when a template uses `lang="pug"`.

The warning from a collect run may name a package that brings these tools into the app, such as `vue-tsc` or `svelte-check`. Either that package or this command satisfies the format. (See [Supported file formats](/docs/integrations/paraglide/reference/file-formats).)

## Flags [#flags]

| Parameter       | Description                                                                   | Type       | Optional | Default           |
| --------------- | ----------------------------------------------------------------------------- | ---------- | -------- | ----------------- |
| `<language...>` | Language names from the table above. Pass at least one.                       | `string[]` | No       | —                 |
| `--root <dir>`  | A directory in the project. Packages are added to its nearest `package.json`. | `string`   | Yes      | Working directory |
| `-h, --help`    | Show the usage text.                                                          | `boolean`  | Yes      | `false`           |

## Example [#example]

```bash
# Vue and Svelte tools for the app in the working directory
npx paraglide-context install vue svelte

# MDX tools for one app in a monorepo
npx paraglide-context install mdx --root apps/web
```

## Other notes [#notes]

| Exit code | Meaning                                                                                                                                                                    |
| --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `0`       | The packages were installed, or each one was already available.                                                                                                            |
| `1`       | The package manager could not be started, or the project&#39;s TypeScript has no JavaScript API.                                                                           |
| `2`       | No language, an unknown language, an unknown flag, or a missing flag value. The usage text is printed, except for an unknown language, which lists the accepted languages. |

* When the package manager starts and then fails, the command exits with the package manager&#39;s exit code.
* The command&#39;s own errors go to standard error and start with `paraglide-context Error:`. Package manager output is shown unchanged.

## Sitemap

See the full [sitemap](https://generaltranslation.com/sitemap.md) for all pages.
