# CLI Example Workflows

These examples are starting points. Replace workspace ids, entity ids, dates, and filters with the client context you are reviewing.

### Find the right client context

```
kick workspaces list
kick --workspace <workspace-id> whoami
```

Use this when you are switching between clients or checking whether a token is workspace-bound.

### Review transactions that need attention

```
kick --workspace <workspace-id> transactions find --since 2026-01-01 --until 2026-01-31 --limit 25
kick --workspace <workspace-id> transactions find --since 2026-01-01 --until 2026-01-31 --fields id,date,amount,counterparty,bank_description --output json
```

Use `--fields` to keep output focused when another tool or agent needs to read the result.

### Pull reports for review

```
kick reports profit-loss --entity 123 --start-date 2026-01-01 --end-date 2026-01-31 --basis cash --cycle month
kick reports balance-sheet --entity 123 --start-date 2026-01-01 --end-date 2026-01-31 --basis cash --output json
kick reports trial-balance --entity 123 --start-date 2026-01-01 --end-date 2026-01-31 --basis cash --output json
```

Use JSON output when another tool or script needs to read the result.

### Inspect activity before changing anything

```
kick --workspace <workspace-id> activity list --resource-type transaction --changed-fields categoryId --limit 10
kick --workspace <workspace-id> activity logs --resource-type transaction --limit 10 --output json
```

For deeper review:

```
kick --workspace <workspace-id> activity details --date 2026-04-01T00:00:00.000Z --source-type transaction_bulk_update --grouped --output json
```

### Pipe output to another tool

The CLI writes data to stdout and diagnostics to stderr, so stdout can be piped safely:

```
kick --workspace <workspace-id> transactions find --limit 10 --output json | jq '.[0].id'
```

For agent workflows, prefer compact structured output:

```
kick --workspace <workspace-id> transactions find --limit 25 --output json-compact
```

### Start local MCP

If your AI assistant uses local stdio MCP, run:

```
kick --workspace <workspace-id> mcp serve
```

This starts a local MCP server using the same CLI credential and workspace context.

### Preview supported write actions

Preview-first commands return a confirmation token. Review the preview, then pass the token or use the documented confirmation flag only when you are ready.

Do not automate confirmation unless the workflow has been reviewed and approved by your firm.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.kick.co/developers/mcp/cli/cli-example-workflows.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
