# Choose a company

Every command runs for one company, and you choose it once per project or once for the machine.

The CLI is not released yet; see [Install the CLI](https://cadyworks.com/docs/install.md).

```sh
cd /path/to/project
cady local company set COMPANY_UUID
cady local company show
```

`set` saves the company for this project and its subfolders in `.cady/config.json`. `show` prints the company in use and where it came from, as JSON.

- `cady local company set COMPANY_UUID --global` sets the default for the whole machine.
- `cady local company unset` removes a setting (add `--global` for the machine default).
- `cady --company COMPANY_UUID <command>` chooses for one command.

## Which one wins

In order: `--company`, the `CADY_COMPANY` environment variable, the nearest project config, the machine default, then the default you chose at sign-in.

## Finding the id

`cady setup` lists your companies with their ids when you have several. The id is also the long code after `/c/` in the web app’s address.

## What can go wrong

- `project_company_unconfirmed` (exit 2): the project config came with a cloned repository, so reads go ahead but writes are refused until you have checked it. Read the file, then run `cady local company use --project` once.
- The wrong company: `cady local company show` says which setting chose it. The scheduled sync uses only the company pinned when it was installed.

Next: [Call Cady from the shell](https://cadyworks.com/docs/commands.md)
