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

> ## Agent Instructions
> Read the Fensu Quickstart before onboarding a repository.
> Use fensu init --yes for an existing repository, or fensu init --yes --name NAME for an empty repository. Use --no-skills only when configuration-only initialization is explicitly required.
> For repository-wide Fensu onboarding, detect and configure every confidently supported target; a detected SvelteKit project belongs in that scope alongside Python targets.
> For narrowly scoped work, do not introduce unrelated analyzer targets. Existing configured targets always apply.
> Do not call Fensu onboarding complete until fensu skills --check succeeds.

# fensu target

> Safely add a SvelteKit analyzer target to an existing explicit-target configuration.

`fensu target add` appends a SvelteKit target to an existing `fensu.toml`:

```bash theme={null}
fensu target add NAME --preset sveltekit --path PATH
```

```bash theme={null}
fensu target add web --preset sveltekit --path frontend
```

The generated target uses the native Svelte analyzer, `framework = "sveltekit"`,
`roots = ["src"]`, a mirrored test layout, and `select = ["FW"]`.

## Requirements

* `fensu.toml` must already contain explicit `[targets.<name>]` blocks. The command
  does not convert a legacy flat configuration or edit `[tool.fensu]`.
* `NAME` must be new and contain only ASCII letters, digits, `-`, or `_`.
* `PATH` must be an existing repository-relative directory without symlinks or
  parent traversal, and it must contain a non-symlink `src/` directory.
* `--preset sveltekit` and `--path PATH` are both required.

Fensu validates the original and resulting documents and performs a guarded write.
An invalid target, concurrent edit, or unsafe path leaves the file unchanged.

## Related

<CardGroup cols={2}>
  <Card title="TypeScript and SvelteKit" icon="code" href="/concepts/analyzers/typescript-sveltekit">
    Decide when to detect, add, and gradually adopt a web analyzer target.
  </Card>

  <Card title="Configuration" icon="gear" href="/concepts/configuration#named-analyzer-targets">
    Configure Python and web projects under one repository policy.
  </Card>
</CardGroup>
