# Docs

> NoClick's docs as Markdown: the guides, skills (task playbooks), SDK reference, examples and API operations, searched and read with no key, as `noclick docs` and `noclick skill` print them.

## Docs

```typescript
class Docs
```

NoClick's docs, for code and coding agents: no key needed.

### Docs.search

```typescript
static search(
  query?: string,
  options?: { kind?: string; limit?: number; client?: NoClick },
): Promise<DocHit[]>
```

Search the docs, best first; with no `query`, list every guide page and skill (or `kind`'s: `guide`, `skill`,
`reference`, `example`, `event`, `api`).

    for (const hit of await Docs.search("send email from an agent", { limit: 5 })) console.log(hit.id, hit.title);

Parameters:

- `query` (`string`)
- `options.kind` (`string`)
- `options.limit` (`number`, default `20`): Return at most this many.
- `options.client` (`NoClick`)

Returns: Up to `limit` hits (at most 50 with a query).

### Docs.read

```typescript
static read(id: string, options?: { client?: NoClick }): Promise<Doc>
```

Read one doc whole: a hit's `id`, or a bare name (`apps`), which reads the guide, else the skill, so named. One
nobody has rejects with `NotFound`.

    console.log((await Docs.read("skill:ship-an-app")).text);

Parameters:

- `id` (`string`, required)
- `options.client` (`NoClick`)

Returns: The doc, its `text` as Markdown.

## Doc

```typescript
interface Doc
```

One guide page or section, skill, reference entry, example or API operation, whole: `text` is Markdown.

| Attribute | Type | Description |
| --- | --- | --- |
| `id` | `string` |  |
| `kind` | `string` |  |
| `title` | `string` |  |
| `summary` | `string` |  |
| `url` | `string | null` |  |
| `status` | `string` |  |
| `text` | `string` |  |
| `sections` | `string[]` | A page's sections, by id. |
| `raw` | `JsonObject` | The response JSON exactly as the API sent it. |

Types:

```typescript
type JsonObject = { [key: string]: unknown };
```

## DocHit

```typescript
interface DocHit
```

A doc a search found, or one a listing names: its `id` (`guide:apps`, `skill:ship-an-app`) reads it whole.

| Attribute | Type | Description |
| --- | --- | --- |
| `id` | `string` |  |
| `kind` | `string` |  |
| `title` | `string` |  |
| `url` | `string | null` |  |
| `snippet` | `string` |  |
| `status` | `string` | `built`, or `designed` for an API call that doesn't work yet. |
| `raw` | `JsonObject` | The response JSON exactly as the API sent it. |

Types:

```typescript
type JsonObject = { [key: string]: unknown };
```
