# docs – dokumentationsvy

> Visar inbyggd, offline dokumentation för alla AccordionShell-kommandon — index eller detaljer per kommando.

_Källa: E-Sharp (esharp.se) · Accordion Shell (CLI)_


## Description

The `docs` command displays comprehensive documentation for AccordionShell commands. It provides a formatted view of command syntax, options, examples, and detailed explanations. You can view either an index of all available commands or detailed documentation for a specific command.

## Syntax

```bash
docs [command] [options]
```

## Parameters & Options

| Name | Short | Description | Default |
| --- | --- | --- | --- |
| `command` | — | Specific command to document. Omit for the index. | (index) |
| `--pager` | `-p` | Pager mode for long documentation (press a key per page, `q` to quit) | `false` |

## Examples

```bash
docs                 # documentation index
docs init            # documentation for a specific command
docs pmbus --pager   # long documentation, paged
```

## Behavior

1. Checks for the `docs` directory in the application folder
2. With no command, displays the index (`as-index.md`)
3. With a command, opens `as-<command>.md`
4. Renders the markdown with colour and formatting
5. In pager mode, pauses after each screen

The documentation viewer works offline — no internet connection required.

## Quick Help vs. Comprehensive Documentation

| Method | Command | Content |
| --- | --- | --- |
| Quick help | `<command> --help` | Brief syntax and options |
| Comprehensive docs | `docs <command>` | Detailed explanations, examples, use cases |

## Error Messages

- *Documentation directory not found* — the `docs` folder is missing from the application directory
- *Documentation not found for command 'X'* — no documentation file exists for the specified command
