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

> ## Agent Instructions
> Choose User guide for browser tasks, Developers for CLI, SDK and external agents, and Administration for organization management.
> Confirm identity and organization/project context before operations. Documentation access does not grant ThinkPlatform permissions.
> Review side effects, verify changes with a read, and do not blindly retry an operation with an uncertain outcome.
> Use documented UI steps for the web app and documented public CLI or SDK interfaces for automation. Follow each page’s prerequisites and authentication requirements.

# Choose an organization and project

> Save your organization and project once, then use short commands.

Complete [installation](https://docs.thinkplatform.ai/cli/get-started/installation.md) and [authentication](https://docs.thinkplatform.ai/cli/get-started/authentication.md) first.

## Choose a project interactively

At a terminal, run:

```bash theme={"system"}
tp profile setup
```

Enter a profile name, review the connection settings, and complete sign-in. Choose an organization and project from the numbered lists of names, then confirm the summary. Setup saves and activates the profile after confirmation; IDs are displayed only to distinguish entries.

Cancelling, empty results, or an authentication/API error leaves the saved configuration unchanged. Setup makes service reads only. It requires an interactive terminal and rejects JSON output and root `--query` before sign-in or network access. For agents or scripts, use the manual commands below.

## Use your saved context

```bash theme={"system"}
tp context show
```

Check the profile, organization and project shown here. Once they are saved, everyday commands use that context automatically:

```bash theme={"system"}
tp canvas pages list
tp flows list
```

You do not need to repeat `--profile`, `--org-id`, `--project-id`, or `--json` on these commands. Normal output uses the default `auto` renderer. Environment overrides still take precedence over saved settings, so check the effective context before making changes.

## Manual selection for scripts

For non-wizard setup, first prepare authentication using your deployment settings. Discover the choices:

```bash theme={"system"}
tp context orgs
tp context projects --org-id ORG_ID
```

Replace `ORG_ID` with an organization ID from the first result. Choose a project from the second result, then save both IDs:

```bash theme={"system"}
tp context use --org-id ORG_ID --project-id PROJECT_ID
tp context show
```

`context use` checks access to the organization and project before saving them to the selected local profile. The options after `context use` are required for this one-time selection; they are not needed on each later command. `context show` also reports the service URL, audience, authentication mode and config path. A saved project does not imply current permission: service authorization still applies to every request.

## Switch between saved profiles

To create or update a named profile interactively, run `tp profile setup` and enter its name. The wizard resolves connection defaults for that target profile, rather than copying the previously active profile. For offline connection settings, use `tp --profile work configure`, then select context with the manual commands above.

For unattended configuration after discovery, save explicit IDs without prompts:

```bash theme={"system"}
tp --org-id ORG_ID --project-id PROJECT_ID configure --no-prompt
```

Use the intended prepared profile and connection settings. This saves local defaults without authenticating or checking service access. Later, switch to an existing saved profile such as `work` with:

```bash theme={"system"}
tp profile use work
tp context show
```

Use `tp profile list` to see saved names and `tp profile show` to inspect the selected profile. Selecting a profile does not switch the signed-in Azure account.

> [accordion] Override the profile or destination for one command
>
> Global options go **before** the command path. Use an override only when this invocation should differ from the active profile:
>
> ```bash theme={"system"}
> tp --profile staging canvas pages list
> tp --org-id ORG_ID --project-id PROJECT_ID canvas pages list
> ```
>
> These overrides do not change the active profile or its saved context. `context projects --org-id` is a command-local discovery option, while the identically named root option overrides the invocation's default context.
>
> Profile selection uses `--profile`, then `THINKPLATFORM_PROFILE`, then the active saved profile (or `default`). Individual settings use explicit flags, then environment settings, then the selected profile. See [authentication](https://docs.thinkplatform.ai/cli/get-started/authentication.md#work-with-profiles) for the full precedence table.

> [accordion] Read context as JSON for a script
>
> ```bash theme={"system"}
> tp --json context show
> ```
>
> An abbreviated result is `{"profile":"work","org_id":4,"project_id":18}`. Use IDs from your own environment. This JSON flag is optional for normal terminal use; scripts that parse JSON should request it explicitly. See [scripting and output](https://docs.thinkplatform.ai/cli/guides/automation.md).

If discovery fails, confirm the active profile and identity, then check access with your administrator. Do not guess IDs. See the [command reference](https://docs.thinkplatform.ai/cli/reference/commands.md) for all profile and context options.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.