> For the complete documentation index, see [llms.txt](https://docs.onepub.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.onepub.dev/guides/cli-integration/export.md).

# export

The `onepub export` command works in concert with the `onepub import` command to log in to devices where the standard OnePub OAuth mechanism won't work as you don't have access to a browser.

See the [CI/CD](/guides/ci-cd.md) and [SSH](/guides/ssh.md) section for further details on using the onepub export/import commands in these scenarios.

{% hint style="danger" %}
The OnePub Token should always be managed and stored securely, as any person with access to the Token will have all the permissions of the Member the token is attached to.
{% endhint %}

### To export your own OnePub Token run:

```bash
onepub export
```

### To export another user's OnePub Token run:

```bash
onepub export --user <user email address>
```

You must be an Administrator or a Team Leader to export another Member's OnePub&#x20;

token. An Administrator can export anyone's token. A Team Leader can export the token of any Member of their team.

### Export to a file

The above export commands will display the OnePub Token to the console. You can combine the `--file` option with either of the above commands to output the token to a file.  If no file name is provided then we export the token to onepub.token.yaml.

```bash
onepub export --file
```

Alternatively, you can pass the name of the file to export the token to:

```bash
onepub export --file token.yaml
```
