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

# Scripts and agents

> JSON output, jq filters, stdin, confirmations, raw API calls and the agent skill.

The CLI uses JSON mode when you pass `--json` or `--jq`, set `KANEO_JSON=true`, or pipe its output:

* A successful command prints exactly one JSON value on stdout.
* A failed command prints `{"error": "message"}` on stdout and exits with code 1.
* JSON mode never prints colors, spinners, progress lines or images.

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
kaneo task list -p KAN --json | jq '.[] | select(.priority == "urgent") | .ticketId'
```

Pass `--human` to force styled output. Styled output respects `NO_COLOR`, `FORCE_COLOR` and `TERM=dumb`, and uses plain ASCII when the terminal cannot show Unicode. Ticket IDs and project names are clickable links in terminals that support them.

## Filter with `--jq`

`--jq` filters the JSON output with a jq expression. The engine is built in, so you do not need `jq` installed. Each result goes on its own line, and strings print without quotes:

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
kaneo task list -p KAN --jq '.[].ticketId'
kaneo task list -p KAN --jq '.[] | select(.priority == "urgent") | .ticketId'
kaneo task view KAN-12 --jq '.url'
kaneo task mine --jq '.[] | {ticketId, dueDate}'
```

An invalid expression fails before any request is sent. Run the same command with `--json` to see the data the expression receives.

## Long text and stdin

Comments and descriptions can come from a file or from stdin. Pass `-F <file>` to read a file, or `-` to read stdin:

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
kaneo comment add KAN-12 -F notes.md
git log -1 --format=%B | kaneo comment add KAN-12 -
kaneo project edit KAN -F README.md
kaneo task create "Write release notes" -p KAN -F notes.md
kaneo task attach KAN-12 screenshot.png -m "Before and after"
```

`kaneo task create`, `task edit`, `comment add`, `comment edit`, `task attach`, `project create`, `project edit` and `workspace edit` accept `-F`. `kaneo comment add` and `kaneo task comment` also read stdin when you leave out the text.

## Confirmations

Commands that delete or remove data, such as `kaneo task delete` or `kaneo label delete`, ask for confirmation in a terminal. Deleting a project asks you to type its key, and deleting a workspace asks for its slug. In scripts, these commands stop with an error until you pass `--yes`:

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
kaneo task delete KAN-12 --yes
```

## Call the API directly

`kaneo api` sends an authenticated request to any Kaneo API endpoint, like `gh api` does for GitHub. It uses the same server, credentials and output modes as the other commands. The path is under `/api`, and the `/api` prefix is optional:

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
kaneo api GET /user/me
kaneo api GET /task/assigned --query workspaceId=your-workspace-id
kaneo api PUT /task/status/your-task-id -f status=done
kaneo api POST /time-entry --input entry.json
```

`-f key=value` builds a JSON body. Values that parse as JSON keep their type, and dotted keys such as `a.b=1` nest. `--input` reads the body from a file, or `-` for stdin. See the [API reference](/docs/api-reference/introduction) for the available endpoints.

## Agent skill

Coding agents such as Claude Code, Codex and Cursor can manage your Kaneo work through the CLI. The `kaneo-cli` skill shows them how: check the login and workspace first, read the JSON output, address tasks by ticket ID, and confirm with you before deleting anything.

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
npx skills add usekaneo/kaneo --skill kaneo-cli
```

Add `-g` to install it for every project. The skill is a single file in [`skills/kaneo-cli`](https://github.com/usekaneo/kaneo/tree/main/skills/kaneo-cli), so you can also copy it into your agent's skills folder by hand. Agents that should talk to Kaneo without a shell can use the [MCP server](/docs/core/integrations/mcp) instead.


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