← 返回命令列表

Linux command

tkst 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Example

tkst -t "[Issue-243]" -b [5]

Example

tkst claude

List all tasks

tkst -l

Update

tkst -u "[Issue-243]" -b [10]

Delete

tkst -d "[Issue-243]"

Reallocate spend

tkst -ra "[old-task]" "[new-task]"

Example

tkst --enable``` or ```tkst --disable

说明

tkst (Tokenyst) is a small CLI that wraps the claude command and keeps a running ledger of token usage, computed dollar cost, and budget consumption per task. After each prompt during a session it prints a per-turn delta and the cumulative spend against the active budget, so you can stop before exceeding a cap. Tasks are user-defined buckets — typically one per ticket, feature, or experiment — that hold a budget, a list of recorded sessions, and an aggregated total. All state is stored locally under ~/.tokenyst with no cloud sync. Pricing for the supported Claude model variants is bundled with the binary and applied to the token counts reported by the claude CLI.

参数

claude _args_
Launch the Claude CLI under tracking. Arguments after claude are forwarded verbatim.
-t _name_, --task _name_
Create a new task with the given name.
-b _amount_, --budget _amount_
Set the budget cap (USD) for the task, used with -t or -u.
-l, --list
List every task with its budget, total spend, and recent sessions.
-u _name_, --update _name_
Update an existing task; combine with -b to change the budget or --rename to change the name.
-d _name_, --delete _name_
Delete the named task.
-a, --allocations
Show per-session and per-task spend allocations.
-ra _from_ _to_, --reallocate _from_ _to_
Move recorded spend from one task to another (useful after misattributed sessions).
--enable
Re-enable tracking after it was disabled.
--disable
Suspend tracking; the claude wrapper still passes calls through.

FAQ

What is the tkst command used for?

tkst (Tokenyst) is a small CLI that wraps the claude command and keeps a running ledger of token usage, computed dollar cost, and budget consumption per task. After each prompt during a session it prints a per-turn delta and the cumulative spend against the active budget, so you can stop before exceeding a cap. Tasks are user-defined buckets — typically one per ticket, feature, or experiment — that hold a budget, a list of recorded sessions, and an aggregated total. All state is stored locally under ~/.tokenyst with no cloud sync. Pricing for the supported Claude model variants is bundled with the binary and applied to the token counts reported by the claude CLI.

How do I run a basic tkst example?

Run `tkst -t "[Issue-243]" -b [5]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does claude _args_ do in tkst?

Launch the Claude CLI under tracking. Arguments after claude are forwarded verbatim.