# Set up VAL

VAL is a control plane for business data. Any agent that can run a shell command can control VAL with the `val` CLI.

Follow these steps in order. Do not skip a step.

1. Run `command -v val`. If it prints a path, go to step 2. If it prints nothing, install the CLI:
   ```
   curl -fsSL https://install.thinkval.net/installers/val/install.sh | bash
   ```
2. Ask the user for three values: the VAL domain (example: `mycompany`), the endpoint URL (example: `https://mycompany.thinkval.io`), and the login email.
3. Run these commands. Replace the values with the answers from the user:
   ```
   val configure set domain mycompany --profile prod
   val configure set endpoint_url https://mycompany.thinkval.io --profile prod
   val --profile prod login -e you@example.com
   ```
4. The login command asks for a password. Let the user type it in the terminal. Never ask for the password in chat. Never store it.
5. Run `val --profile prod whoami`. If it shows the user, setup is complete. If it fails, show the error to the user and stop.
6. Use `--output json` on every `val` command. It is the best format for agents.
7. To learn the commands, run `val --help`. Then run `val <command> --help` for each command you need. The CLI has 35 root commands.
8. Try these sample commands:
   ```
   val --profile prod table list --output json --limit 10
   val --profile prod sql execute "SELECT * FROM custom_tbl_1_19 LIMIT 5"
   val table --help
   ```

## Agent notes

- **VAL Agent**: The VAL Agent runs the `val` CLI as its tool layer. It calls the same commands you can type in a terminal.
- **Claude Code**: Claude Code runs shell commands. It runs `val` the same way.
- **ChatGPT**: ChatGPT (Codex) runs shell commands. It runs `val` the same way.
- **Duet**: Duet runs `val` as a shell command.
- **GrokBot**: GrokBot runs `val` as a shell command.
- **Gemini**: Gemini (Gemini CLI) runs shell commands. It runs `val` the same way.
- **Dots**: Dots runs `val` as a shell command.
- **Muse**: Muse runs `val` as a shell command.
- **your agent**: Your agent runs `val` as a shell command. The CLI has 35 root commands. They cover the whole VAL API.
