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

# Create and link a wiki

> Create a hosted wiki and give a project durable wiki context.

Almanac identifies a wiki with a human handle such as `acme/company-handbook`.

## Create the wiki

List the workspaces available to your account, then create the wiki in one:

```bash theme={"theme":{"light":"github-light","dark":"vesper"}}
almanac workspaces
almanac wikis create "Company Handbook" --workspace acme
```

```text theme={"theme":{"light":"github-light","dark":"vesper"}}
wiki_123  acme/company-handbook  Company Handbook
```

Creating a wiki does not select it for the current directory.

## Link the project

```bash theme={"theme":{"light":"github-light","dark":"vesper"}}
almanac link acme/company-handbook
```

Almanac writes:

```yaml .almanac.yaml theme={"theme":{"light":"github-light","dark":"vesper"}}
wiki: acme/company-handbook
```

Commit `.almanac.yaml` when the project and wiki belong together. `almanac
unlink` removes only this local file; it never deletes the hosted wiki.

## Override the link

Wiki commands use the first value available:

<div className="almanac-diagram" tabIndex="0">
  <img src="https://mintcdn.com/almanac-e141534d/PSPQxvCsHo2cfSd-/images/diagrams/wiki-context.svg?fit=max&auto=format&n=PSPQxvCsHo2cfSd-&q=85&s=a588e950f8e35b18a131941f04cf66bf" alt="Wiki context precedence: an explicit flag wins over the environment variable, which wins over the nearest project link." width="1440" height="430" data-path="images/diagrams/wiki-context.svg" />
</div>

```bash theme={"theme":{"light":"github-light","dark":"vesper"}}
almanac search "onboarding" --wiki acme/handbook
ALMANAC_WIKI=acme/handbook almanac sources tree
```

There is no global selected wiki. Run `almanac whoami` to see the current
identity, workspaces, and directory link. See [Wiki context and environment
variables](/reference/configuration) for the complete reference.

<Card title="Next: upload source files" icon="upload" href="/guides/upload-sources">
  Add original evidence to the linked wiki.
</Card>
