# chat and agent

noduma chat and noduma agent, Noduma's own terminal clients.

Source: https://docs.noduma.dev/cli/chat/

Both use the public API with your API key, from `NODUMA_API_KEY` or `--key-file`. Each answer shows its cost and your balance. Conversations stay in memory, or in a `--save` file readable only by you.

```sh
export NODUMA_API_KEY=ndm_k_...
noduma chat
```

## `noduma chat`

Chat with Noduma's models in the terminal.

| Option | Meaning |
|---|---|
| `--model NAME` | The model; the first ready one when empty |
| `--my-pcs` | Only your own PCs answer, free; it fails when none of your PCs serving the model is sharing now |
| `--save FILE` | Keep the conversation in this file on this PC; continued when it exists |
| `--key-file FILE` | A file holding the API key, instead of `NODUMA_API_KEY` |
| `--url URL` | The API address (default `https://app.noduma.dev/v1`, or `NODUMA_API_URL`) |
| `--ca-file FILE` | A PEM certificate authority to trust, for a coordinator with a private one |

```sh
noduma chat --model qwen3-8b-q4_k_m --save notes.chat
noduma chat --my-pcs
```

## `noduma agent`

The chat, with tools the model may use in the folder you start it in: `read_file`, `list_dir`, `write_file` and `run_command`.

- It reads inside that folder freely. Paths with `..` or links that lead out of it are refused before anything is asked.
- Every write and every command is shown in full and runs only after you type yes. Without a terminal, the answer is always no.
- It takes the same options as `noduma chat`.

```sh
cd my-project
noduma agent --model qwen3-coder-30b-a3b-instruct-q4_k_m
```

The model's tool calls are text written on someone's PC: read each one before you say yes. On the Community plan the owner of the PC that answers can read what the agent sends, including the files it reads; prefer `--my-pcs` for private code.
