# Platform CLI commands

Every origin id, origin admin and origin config command with its flags: log in, manage organizations and projects, and set CLI profile values.

This page lists every `origin id`, `origin admin` and `origin config` command, and the options every `origin` command accepts. For installing and configuring the CLI, see [Use the CLI](/docs/platform/access/cli).

## Global options [#global-options]

Every `origin` command accepts these options before the command group.

| Option | Description |
| --- | --- |
| `--config <FILE>` | Accepted, but doesn’t change which profile the CLI reads. |
| `--api <URL>` | GraphQL API endpoint to send requests to. Defaults to `https://api.origincloud.eu/graphql`. |
| `--debug` | Accepted, but doesn’t change the output. |

The CLI’s own help text still describes `--config` as choosing a configuration file and `--debug` as printing debugging information. Neither has that effect in v1.9.15. See [Global options](/docs/platform/access/cli#global-options).

## login [#login]

Log in through your browser, or with a code on another device. Opens the Origin Cloud login page in your browser and waits for you to log in there. With `--device`, prints an address and a code to approve on any other device instead, for machines without a browser such as an SSH session. The CLI never asks for your password.

```sh
origin id login [OPTIONS]
```

| Option | Required | Description |
| --- | --- | --- |
| `--device` | no | Log in by approving a code on another device, instead of opening a browser on this machine. |

## token [#token]

Print the access token of the current login session, for calling the GraphQL API directly.

```sh
origin id token [OPTIONS]
```

| Option | Required | Description |
| --- | --- | --- |
| `--as-header` | no | Print the token as an HTTP Authorization header (`Authorization: Bearer <token>`). |
| `--raw` | no | Print plain text with no JSON envelope, for direct use in shell one-liners (e.g. `curl -H "$(origin id token --as-header --raw)"`) |

## create-organisation [#create-organisation]

Create organisation from its name alone; its billing details are added afterwards on its default billing account. [`register-organisation`](#register-organisation) does both in one step.

```sh
origin admin create-organisation --name <NAME>
```

| Option | Required | Description |
| --- | --- | --- |
| `--name <NAME>` | yes | Name of the organization. |

## register-organisation [#register-organisation]

Register organisation. The billing details become its default billing account, so the organisation is billable from the start.

```sh
origin admin register-organisation [OPTIONS] --name <NAME> --street <STREET> --city <CITY> --postal-code <POSTAL_CODE> --country <COUNTRY> --invoice-email <INVOICE_EMAIL> --contact-person <CONTACT_PERSON>
```

| Option | Required | Description |
| --- | --- | --- |
| `--name <NAME>` | yes | Name of the organization. |
| `--street <STREET>` | yes | Street and number of the billing address. |
| `--city <CITY>` | yes | City of the billing address. |
| `--postal-code <POSTAL_CODE>` | yes | Postal code of the billing address. |
| `--country <COUNTRY>` | yes | Country of the billing address. |
| `--invoice-email <INVOICE_EMAIL>` | yes | Email address invoices are sent to. |
| `--contact-person <CONTACT_PERSON>` | yes | Person invoices are addressed to. |
| `--vat-id <VAT_ID>` | no | VAT identification number, if any. |

## list-organisations [#list-organisations]

List accessible organisations.

```sh
origin admin list-organisations
```

This command takes no options.

## get-organisation [#get-organisation]

Get an organization by its id or URN.

```sh
origin admin get-organisation --id <ID>
```

| Option | Required | Description |
| --- | --- | --- |
| `--id <ID>` | yes | Id of the organisation. |

## create-project [#create-project]

Create a project in an organization.

```sh
origin admin create-project [OPTIONS] --name <NAME> --org-id <ORG_ID>
```

| Option | Required | Description |
| --- | --- | --- |
| `--name <NAME>` | yes | Name of the project. |
| `--id-prefix <ID_PREFIX>` | no | Prefix of the project id. |
| `--org-id <ORG_ID>` | yes | ID of the organisation. |

## list-projects [#list-projects]

List accessible projects.

```sh
origin admin list-projects --org-id <ORG_ID>
```

| Option | Required | Description |
| --- | --- | --- |
| `--org-id <ORG_ID>` | yes | ID of the organisation. |

## get-project [#get-project]

Get a project by its id or URN.

```sh
origin admin get-project --org-id <ORG_ID> --id <ID>
```

| Option | Required | Description |
| --- | --- | --- |
| `--org-id <ORG_ID>` | yes | ID of the organisation. |
| `--id <ID>` | yes | Id of the project. Use with org-id. |

## update-organisation [#update-organisation]

Rename an organisation.

```sh
origin admin update-organisation --org-id <ORG_ID> --name <NAME>
```

| Option | Required | Description |
| --- | --- | --- |
| `--org-id <ORG_ID>` | yes | ID of the organisation. |
| `--name <NAME>` | yes | New name. |

## delete-organisation [#delete-organisation]

Delete an organisation. Refuses unless it has zero projects.

```sh
origin admin delete-organisation --org-id <ORG_ID>
```

| Option | Required | Description |
| --- | --- | --- |
| `--org-id <ORG_ID>` | yes | ID of the organisation. |

## update-project [#update-project]

Rename a project.

```sh
origin admin update-project --org-id <ORG_ID> --id <ID> --name <NAME>
```

| Option | Required | Description |
| --- | --- | --- |
| `--org-id <ORG_ID>` | yes | ID of the organisation. |
| `--id <ID>` | yes | Id of the project. |
| `--name <NAME>` | yes | New name. |

## delete-project [#delete-project]

Delete a project. Refuses while it still owns any resource (instance, image, key pair, volume, snapshot, NAT gateway, Floating IP, VPC) and names each kind left

```sh
origin admin delete-project --org-id <ORG_ID> --id <ID>
```

| Option | Required | Description |
| --- | --- | --- |
| `--org-id <ORG_ID>` | yes | ID of the organisation. |
| `--id <ID>` | yes | Id of the project. |

## profile [#profile]

Show the values stored in the local CLI profile.

```sh
origin config profile
```

This command takes no options.

## profile-set [#profile-set]

Set a value in the local CLI profile.

```sh
origin config profile-set <KEY> <VALUE>
```

This command takes no options.

