# User Guide

URL: https://docs.hanzo.ai/docs/contributing/authoring-cli

> The CLI tool that automates setups and installs components.

## Installation

Initialize a config for CLI:

**npm**

```bash
npx @hanzo/docs-cli
```

**pnpm**

```bash
pnpm dlx @hanzo/docs-cli
```

**yarn**

```bash
yarn dlx @hanzo/docs-cli
```

**bun**

```bash
bun x @hanzo/docs-cli
```

You can change the output paths of components in the config.

### Components

Select and install components.

**npm**

```bash
npx @hanzo/docs-cli add
```

**pnpm**

```bash
pnpm dlx @hanzo/docs-cli add
```

**yarn**

```bash
yarn dlx @hanzo/docs-cli add
```

**bun**

```bash
bun x @hanzo/docs-cli add
```

You can pass component names directly.

**npm**

```bash
npx @hanzo/docs-cli add banner files
```

**pnpm**

```bash
pnpm dlx @hanzo/docs-cli add banner files
```

**yarn**

```bash
yarn dlx @hanzo/docs-cli add banner files
```

**bun**

```bash
bun x @hanzo/docs-cli add banner files
```

#### How the magic works?

The CLI fetches the latest version of component from the GitHub repository of Hanzo Docs.
When you install a component, it is guaranteed to be up-to-date.

In addition, it also transforms import paths.
Make sure to use the latest version of CLI

> This is highly inspired by Shadcn UI.

### Customize

A simple way to customize Hanzo Docs layouts.

**npm**

```bash
npx @hanzo/docs-cli customize
```

**pnpm**

```bash
pnpm dlx @hanzo/docs-cli customize
```

**yarn**

```bash
yarn dlx @hanzo/docs-cli customize
```

**bun**

```bash
bun x @hanzo/docs-cli customize
```

### Tree

Generate files tree for Hanzo Docs UI `Files` component, using the `tree` command from your terminal.

**npm**

```bash
npx @hanzo/docs-cli tree ./my-dir ./output.tsx
```

**pnpm**

```bash
pnpm dlx @hanzo/docs-cli tree ./my-dir ./output.tsx
```

**yarn**

```bash
yarn dlx @hanzo/docs-cli tree ./my-dir ./output.tsx
```

**bun**

```bash
bun x @hanzo/docs-cli tree ./my-dir ./output.tsx
```

You can output MDX files too:

**npm**

```bash
npx @hanzo/docs-cli tree ./my-dir ./output.mdx
```

**pnpm**

```bash
pnpm dlx @hanzo/docs-cli tree ./my-dir ./output.mdx
```

**yarn**

```bash
yarn dlx @hanzo/docs-cli tree ./my-dir ./output.mdx
```

**bun**

```bash
bun x @hanzo/docs-cli tree ./my-dir ./output.mdx
```

See help for further details:

**npm**

```bash
npx @hanzo/docs-cli tree -h
```

**pnpm**

```bash
pnpm dlx @hanzo/docs-cli tree -h
```

**yarn**

```bash
yarn dlx @hanzo/docs-cli tree -h
```

**bun**

```bash
bun x @hanzo/docs-cli tree -h
```

#### Example Output

```tsx title="output.tsx"

export default (
  <Files>
    <Folder name="app">
      <File name="layout.tsx" />
      <File name="page.tsx" />
      <File name="global.css" />
    </Folder>
    <Folder name="components">
      <File name="button.tsx" />
      <File name="tabs.tsx" />
      <File name="dialog.tsx" />
    </Folder>
    <File name="package.json" />
  </Files>
);
```

## In this section

- [SDKs](https://docs.hanzo.ai/docs/sdks): Official Hanzo SDKs for every language — Python, TypeScript, Go, Rust, C++, Swift, Kotlin. Two lines per…
- [ZAP Protocol](https://docs.hanzo.ai/docs/zap): Zero-Copy App Proto — High-performance Cap'n Proto RPC for AI agent communication. 10-100x faster than MCP…
- [Hanzo Skills Reference](https://docs.hanzo.ai/docs/openapi/skills): Comprehensive reference documentation for all 49 Hanzo skills — deep-dive guides for AI agents and developers.
- [Usage](https://docs.hanzo.ai/docs/usage): One usage plane for every AI account you have — rate limits, credits, and spend across Codex, Claude, Hanzo…
- [Organizations](https://docs.hanzo.ai/docs/openapi/iam): Multi-org setup, resource scoping, team management, and white-label login for Hanzo organizations.
