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

# CLI

> Install and use the Genseo command-line client.

The Genseo CLI is distributed as the public npm package `@genseo/cli`. It uses the same project-bound access model as the Public API.

## Install

Install globally when you want the `genseo` command available everywhere:

```bash theme={null}
npm install -g @genseo/cli
```

Or run without a global install:

```bash theme={null}
npx -y --package @genseo/cli genseo login
```

Use `npx` for quick tests, CI jobs, or machines where you do not want a global package. Use global install for everyday local use.

## Login

Browser-based login uses OAuth Device Flow:

```bash theme={null}
genseo login
```

The CLI prints a URL like this:

```text theme={null}
https://app.genseo.co/developer/device?user_code=ABCD-1234
```

Open it, choose the project, and approve access. The CLI stores the returned project-bound key in:

```text theme={null}
~/.genseo/config.json
```

Manual API-key login is also supported:

```bash theme={null}
genseo login --api-key gs_live_...
```

You can also use environment variables:

```bash theme={null}
export GENSEO_API_BASE=https://api.genseo.co/v1
export GENSEO_API_KEY=gs_live_...
```

## Logout

```bash theme={null}
genseo logout
```

## Identity

```bash theme={null}
genseo me
```

Use this after login to confirm which project the CLI can access.

## Project

```bash theme={null}
genseo project get
```

The CLI intentionally works with one authorized project at a time. It does not list all projects and it does not create projects.

## Keywords

```bash theme={null}
genseo keywords list
```

```bash theme={null}
genseo keywords add "seo automation software"
```

```bash theme={null}
genseo keywords add "seo automation software" --volume 1200 --kd 34 --intent commercial
```

```bash theme={null}
genseo keywords generate
```

```bash theme={null}
genseo keywords metrics "seo automation software"
```

## Posts

```bash theme={null}
genseo posts list
```

```bash theme={null}
genseo posts create --title "SEO Automation Workflow"
```

```bash theme={null}
genseo posts create --title "SEO Automation Workflow" --keyword-id keyword_123
```

```bash theme={null}
genseo posts get post_123
```

```bash theme={null}
genseo posts update post_123 --title "Updated title" --status draft
```

```bash theme={null}
genseo posts generate post_123
```

```bash theme={null}
genseo posts publish post_123
```

Publishing requires a configured integration. Ask the user before publishing unless autonomous publishing is explicitly enabled.

## Integrations

```bash theme={null}
genseo integrations list
```

```bash theme={null}
genseo integrations fields webflow
```

```bash theme={null}
genseo integrations connect-url webflow
```

```bash theme={null}
genseo integrations mapping webflow   --connection-id connection_123   --site-id site_123   --collection-id collection_123   --field-map-json '{"title":"name","content":"body"}'
```

## Webhooks

```bash theme={null}
genseo webhooks list
```

```bash theme={null}
genseo webhooks create --target-url https://example.com/hook --event post.published
```

```bash theme={null}
genseo webhooks delete webhook_123
```

## Output

Most commands return JSON. Async generation commands may return accepted responses while work continues in Genseo.
