Developer CLI
The Taskgert repository includes a small command-line client for the MCP server, for scripts and debugging. It calls one tool, the way an agent would, and prints the answer.
export TASKGERT_MCP_URL=https://mcp.taskgert.com/mcp # default: http://localhost:4100/mcp
export TASKGERT_MCP_TOKEN=tgt_live_…
pnpm --filter @taskgert/mcp call --list # the tools
pnpm --filter @taskgert/mcp call get_board '{"project":"TGT"}'
Arguments
Arguments are a JSON object, given inline, from a file with @, or from standard input with - — the last two
for content too large for a command line, such as a file to upload. The CLI says it is a terminal
(X-Taskgert-Client: terminal), so its contentBase64 is not held to the 512 KB an agent may write in a call
(inside taskgert-agent, tg-agent attach <file> is simpler):
pnpm --filter @taskgert/mcp call add_comment @comment.json
node -e 'const fs=require("fs");process.stdout.write(JSON.stringify({task:"TGT-12",fileName:"shot.png",mimeType:"image/png",contentBase64:fs.readFileSync("shot.png").toString("base64")}))' \
| pnpm --filter @taskgert/mcp call upload_attachment -
# The evidence of a Taskgert's target: a recording of the finished work.
node -e 'const fs=require("fs");process.stdout.write(JSON.stringify({taskgert:"TGT-G1",fileName:"target.webm",mimeType:"video/webm",contentBase64:fs.readFileSync("target.webm").toString("base64")}))' \
| pnpm --filter @taskgert/mcp call attach_taskgert_evidence -
Results
Text is printed as it is. Images, audio and other non-text results are listed one line each, such as
[image image/png, 11938 bytes]; add --save <dir> to write them to files:
pnpm --filter @taskgert/mcp call read_attachment '{"task":"TGT-12","attachment":"shot.png"}' --save out
The exit code is 1 when the tool reports an error.
Session usage: tg usage
The kit's tg usage reports and shows what agent sessions used on a task, through the same MCP server
(Session usage). The kit's Claude Code hooks and OpenCode plugin call it; by hand:
tg usage mark '{"task":"TGT-12","kind":"start","sessionId":"my-session","model":"claude-opus-5-5","inputTokens":0,"outputTokens":0}'
echo '{"task":"TGT-12","kind":"end","sessionId":"my-session","inputTokens":310000,"outputTokens":9000}' | tg usage mark -
tg usage show TGT-12 # tokens, cost, context peak, compactions, restarts, per model, subagents
tg usage show # this machine's sessions, as the status line last saw them
It uses the server and bot token the taskgert MCP is registered with (~/.claude.json or .mcp.json), or
TASKGERT_MCP_URL and TASKGERT_MCP_TOKEN, and never prints the token.
Bring existing memory in: tg memory import
tg memory import copies the agent memory a repository already has into the project's Taskgert memory
(Use the project's memory), through save_memory of the same MCP server. It is idempotent: each
memory gets a stable topicKey, so running it again creates nothing new, updates what changed and reports the rest as
unchanged (an unchanged save writes nothing and leaves no audit row).
tg memory import engram --project TGT [--engram-project NAME] [--file export.json] [--allow-env] [--prune] [--dry-run] [--json]
tg memory import claude --project TGT [--dir PATH] [--allow-env] [--prune] [--dry-run] [--json]
tg memory import file --file memories.json --project TGT [--prune] [--dry-run] [--json]
- engram runs
engram exportfor the project NAME (default: the repository folder) or reads--file. Session summaries and deleted observations are skipped. Types: decision and architecture becomedecision, discoverydiscovery, bugfixsolution, patternconvention, config and anything elsefact; pinned stays pinned. Tags:imported,from-engramand the original type. - claude reads Claude Code's memory files (default
~/.claude/projects/<this repository as a slug>/memory/*.md, withoutMEMORY.md). It importsprojectandreferenceones asfact(tagsimported,from-claude) and skipsuserandfeedbackones, which are personal. - file imports a reviewed list, the way to bring in a curated set: a JSON array of
{"type","title","content","tags"?,"topicKey","pinned"?}.typeis one of discovery, decision, fact, solution, convention, gotcha;topicKeyis required (dev/contract-reload: lower-case letters, digits and. _ / -) and unique in the file. An invalid file is listed entry by entry and nothing is imported. Every memory gets the tagimported. - The topicKey of a raw entry (engram, claude) is meaningful, not a source path: the slug of its title (up to 60
characters) and a short stable hash of its source id, such as
contracts-first-3fa9c1; the provenance is in the tag.
What is kept: the privacy and durability filter
A project memory holds durable, project-level knowledge. For the raw sources the filter is on and prints the reason of
every skipped entry: secrets (Taskgert tokens, private keys, AWS, GitHub and Slack tokens, bearer and JSON web
tokens, password=-style assignments), environment details (private or LAN IP addresses, localhost: URLs,
absolute home paths such as /Users/…, /home/… and C:\Users\…, e-mail addresses) and session logs (a title
or first line with a date and "verified / deployed / merged / done", or a version with "deployed / verified /
production"). --allow-env keeps the environment entries on purpose; secrets and session logs are never kept. In a
file, secrets are refused (the line says refused and the exit code is 1) and the other findings are only
warnings: the file is curated, so it is kept. The API refuses secrets too (422 sensitive-content).
The content of a raw entry is cut to 1,500 characters (at a paragraph boundary when it can) with "(trimmed on import)"; in a file, a longer content is kept with a warning.
Keeping the memory in sync: --prune
With --prune, after a clean import the command deletes the project's memories tagged imported whose topicKey is no
longer in the source, so a re-run mirrors the file. A raw source only looks under its own provenance tag
(from-engram, from-claude); a file looks under imported. A memory a person wrote has no imported tag and is
never touched. Nothing is pruned when a save failed. --dry-run --prune lists what would go (it needs the token to
read the list).
One line per memory (created, updated, unchanged, skipped and why, warning, pruned), then a summary; --dry-run
writes nothing. If the project's memory is off for agents the import stops with that message.
Server and token as for tg usage.
Check results: tg <check> --report --task
tg lint|test|int|build|e2e --report --task TGT-12 runs the check with its output kept in
.taskgert/out/<kind>-<time>/run.log, records it on the task through the same MCP server (report_quality_run,
with the machine's short host name, and, only to help fix a failure, the excerpt of an opaque failure and the failure
screenshots as the task's files), and prints a compact answer
with the run's id and attempt (Quality reports):
tg test --report --task TGT-12
pnpm --filter @taskgert/mcp call get_quality_run '{"id":"0199…"}'
pnpm --filter @taskgert/mcp call list_quality_runs '{"task":"TGT-12","status":"FAILED"}'
On a runner instead, for the pushed HEAD (the fastest free runner, unless --runner names one), and waiting for a
run already queued:
tg e2e --remote --suite quick --task TGT-12
tg quality wait 0199…
pnpm --filter @taskgert/mcp call get_quality_settings '{"task":"TGT-12"}'
Evidence
pnpm evidence <TASKGERT-KEY> scenario.json records the proof of a Taskgert's target — a screenshot or a video —
in a dockerised browser (or, with --local-browser and always inside taskgert-agent, the bundled one) and
attaches it through the MCP. It takes the same TASKGERT_MCP_URL and
TASKGERT_MCP_TOKEN. The scenario format is described on the Taskgerts page.