@togglhq/cli 1.5.20 → 1.5.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/build/index.js +1 -1
- package/build/{program-DT3aOJKn.js → program-Bz9wasNE.js} +4 -4
- package/build/program.js +1 -1
- package/package.json +2 -2
- package/skills/toggl-cli/SKILL.md +7 -7
- package/skills/toggl-cli/reference/focus-concepts.md +5 -5
- package/skills/toggl-cli/reference/projects.md +1 -1
- package/skills/toggl-cli/reference/rates-and-billables.md +4 -4
- package/skills/toggl-cli/reference/tasks.md +1 -1
- package/skills/toggl-cli/reference/time-blocks.md +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @toggl/cli
|
|
2
2
|
|
|
3
|
-
Command-line interface for [Toggl
|
|
3
|
+
Command-line interface for [Toggl 2.0](https://focus.toggl.com).
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
@@ -70,7 +70,7 @@ toggl skill setup --agent cursor codex --copy --yes
|
|
|
70
70
|
|
|
71
71
|
## Command shape
|
|
72
72
|
|
|
73
|
-
Generated
|
|
73
|
+
Generated Toggl 2.0 commands look like:
|
|
74
74
|
|
|
75
75
|
```
|
|
76
76
|
toggl [global flags] <group> … <subcommand> [flags]
|
package/build/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { n as CommanderError, t as createProgram } from "./program-
|
|
2
|
+
import { n as CommanderError, t as createProgram } from "./program-Bz9wasNE.js";
|
|
3
3
|
//#region src/index.ts
|
|
4
4
|
try {
|
|
5
5
|
await createProgram({ enableUpdateNotification: true }).parseAsync(process.argv);
|
|
@@ -12136,7 +12136,7 @@ async function fetchAccessibleWorkspaces(accountsApiUrl, token) {
|
|
|
12136
12136
|
}));
|
|
12137
12137
|
}
|
|
12138
12138
|
async function resolveAuthenticatedWorkspace(workspaces, options) {
|
|
12139
|
-
if (workspaces.length === 0) throw new Error("No
|
|
12139
|
+
if (workspaces.length === 0) throw new Error("No Toggl 2.0 workspaces found for this account.");
|
|
12140
12140
|
if (options.explicitWorkspaceId !== void 0) {
|
|
12141
12141
|
const match = workspaces.find((w) => w.workspace_id === options.explicitWorkspaceId);
|
|
12142
12142
|
if (!match) throw new Error(`Workspace ${options.explicitWorkspaceId} not found. Available: ${workspaces.map((w) => `${w.workspace_id} (${w.workspace_name})`).join(", ")}`);
|
|
@@ -23888,7 +23888,7 @@ const schedulerOverrides = {
|
|
|
23888
23888
|
"focus.scheduler.validate-instructions": { hidden: true }
|
|
23889
23889
|
};
|
|
23890
23890
|
const searchOverrides = { "focus.search.search": {
|
|
23891
|
-
description: "Search across
|
|
23891
|
+
description: "Search across Toggl 2.0 entities.",
|
|
23892
23892
|
cli: {
|
|
23893
23893
|
group: [],
|
|
23894
23894
|
command: "search",
|
|
@@ -25936,7 +25936,7 @@ function createProgram(programOptions = {}) {
|
|
|
25936
25936
|
process.exitCode = 1;
|
|
25937
25937
|
}
|
|
25938
25938
|
});
|
|
25939
|
-
workspaceCommand.command("switch").description("Set the active workspace ID used for
|
|
25939
|
+
workspaceCommand.command("switch").description("Set the active workspace ID used for Toggl 2.0 API calls").argument("[workspace-id]", "Workspace ID to activate (omit to choose interactively)").action(async (workspaceIdArg) => {
|
|
25940
25940
|
try {
|
|
25941
25941
|
const globalOptions = program.opts();
|
|
25942
25942
|
const target = switchCliWorkspace(await resolveWorkspaceIdOptional(workspaceIdArg, globalOptions, globalOptions.profile, {
|
|
@@ -26082,4 +26082,4 @@ Common commands:
|
|
|
26082
26082
|
//#endregion
|
|
26083
26083
|
export { CommanderError as n, createProgram as t };
|
|
26084
26084
|
|
|
26085
|
-
//# sourceMappingURL=program-
|
|
26085
|
+
//# sourceMappingURL=program-Bz9wasNE.js.map
|
package/build/program.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as createProgram } from "./program-
|
|
1
|
+
import { t as createProgram } from "./program-Bz9wasNE.js";
|
|
2
2
|
export { createProgram };
|
package/package.json
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: toggl-cli
|
|
3
|
-
description: Use the Toggl CLI to work with Toggl
|
|
3
|
+
description: Use the Toggl CLI to work with Toggl 2.0 tasks, projects, time entries, time blocks, workspaces, authentication, and CLI maintenance from an agent-friendly terminal workflow. Trigger when the user asks to inspect or modify Toggl 2.0 data through the terminal, authenticate Toggl, switch workspaces, install or refresh the Toggl agent skill, update the CLI, or automate Toggl 2.0 workflows.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Toggl CLI
|
|
7
7
|
|
|
8
|
-
Use the `toggl` command when the user wants to inspect or modify Toggl
|
|
8
|
+
Use the `toggl` command when the user wants to inspect or modify Toggl 2.0 data from the terminal. The CLI is designed for agents: commands are non-interactive when flags are supplied, `--json` gives compact machine-readable responses, validation errors are explicit, and destructive operations require confirmation flags.
|
|
9
9
|
|
|
10
10
|
## When to Use
|
|
11
11
|
|
|
12
12
|
Use this skill when the task involves:
|
|
13
13
|
|
|
14
|
-
- Listing, reading, creating, updating, or deleting Toggl
|
|
14
|
+
- Listing, reading, creating, updating, or deleting Toggl 2.0 tasks, projects, time blocks, or time entries.
|
|
15
15
|
- Managing saved views, custom fields (admin), and task/project attachments (including file upload and download).
|
|
16
16
|
- Finding workspace metadata such as statuses, users, and workspace IDs.
|
|
17
17
|
- Authenticating the Toggl CLI, switching saved profiles, or switching the active workspace.
|
|
18
18
|
- Installing or refreshing the CLI's agent skill (`toggl skill setup`, or `toggl skill sync` after upgrading `@toggl/cli`).
|
|
19
19
|
- Updating a globally installed `@toggl/cli`.
|
|
20
|
-
- Automating a
|
|
20
|
+
- Automating a Toggl 2.0 workflow from shell commands.
|
|
21
21
|
|
|
22
|
-
Do not use this skill for Toggl Track APIs, raw
|
|
22
|
+
Do not use this skill for Toggl Track APIs, raw Toggl 2.0 API calls, or MCP server implementation work unless the user specifically asks to operate through the CLI.
|
|
23
23
|
|
|
24
24
|
## Operating Rules
|
|
25
25
|
|
|
@@ -43,14 +43,14 @@ Do not use this skill for Toggl Track APIs, raw Focus API calls, or MCP server i
|
|
|
43
43
|
|
|
44
44
|
## Read Next
|
|
45
45
|
|
|
46
|
-
-
|
|
46
|
+
- Toggl 2.0 concepts, entity hierarchy, and resource relationships: `reference/focus-concepts.md`
|
|
47
47
|
- Auth, profiles, and workspaces: `reference/auth-environments-workspaces.md`
|
|
48
48
|
- Command shape, JSON input, output, dates, and safety flags: `reference/command-contract.md`
|
|
49
49
|
- Tasks: `reference/tasks.md`
|
|
50
50
|
- Projects: `reference/projects.md`
|
|
51
51
|
- Time entries: `reference/time-entries.md`
|
|
52
52
|
- Time blocks: `reference/time-blocks.md`
|
|
53
|
-
- Rates and billables (
|
|
53
|
+
- Rates and billables (Toggl 2.0 API vs Track): `reference/rates-and-billables.md`
|
|
54
54
|
- Statuses and users: `reference/statuses-users.md`
|
|
55
55
|
- Reports (`get-workload` vs `get-flexq-data`): `reference/reports.md`
|
|
56
56
|
- Common multi-step flows: `workflows/common-workflows.md`
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Toggl 2.0 Concepts
|
|
2
2
|
|
|
3
|
-
Use this file to understand how Toggl
|
|
3
|
+
Use this file to understand how Toggl 2.0 entities relate to each other before choosing CLI commands.
|
|
4
4
|
|
|
5
5
|
## Mental Model
|
|
6
6
|
|
|
7
|
-
Toggl
|
|
7
|
+
Toggl 2.0 is organized around work that happens inside a workspace:
|
|
8
8
|
|
|
9
9
|
```text
|
|
10
10
|
Environment/Profile
|
|
@@ -27,7 +27,7 @@ A profile stores credentials and the selected workspace. Use profiles when the u
|
|
|
27
27
|
|
|
28
28
|
### Workspace
|
|
29
29
|
|
|
30
|
-
A workspace is the top-level
|
|
30
|
+
A workspace is the top-level context for projects, tasks, statuses, users, time entries, and time blocks. Most IDs only make sense inside the active workspace.
|
|
31
31
|
|
|
32
32
|
Use workspace commands when the agent needs to list available workspaces, refresh workspace metadata, switch the default workspace, or override the workspace for one command.
|
|
33
33
|
|
|
@@ -63,7 +63,7 @@ Use time entries when the user wants to track work, start a break, stop tracking
|
|
|
63
63
|
|
|
64
64
|
A time block represents scheduled or planned work. Time blocks usually belong to a task and have explicit start/end times.
|
|
65
65
|
|
|
66
|
-
Use time blocks when the user wants to schedule, plan, move, inspect, or delete calendar-like
|
|
66
|
+
Use time blocks when the user wants to schedule, plan, move, inspect, or delete calendar-like time blocks.
|
|
67
67
|
|
|
68
68
|
## Choosing the Right Command
|
|
69
69
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Projects
|
|
2
2
|
|
|
3
|
-
Use project commands to list
|
|
3
|
+
Use project commands to list projects, resolve project IDs, create projects, rename projects, and delete projects.
|
|
4
4
|
|
|
5
5
|
## Commands
|
|
6
6
|
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
There are **two different systems**. Pick the one that matches where the user is working.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Toggl 2.0 billable / labor rate schedules (this CLI)
|
|
6
6
|
|
|
7
|
-
Workspace and project **billable rate schedules** live under `toggl rates billable …` (nested under `rates`; same endpoints as the former top-level `billable-rates` command). **Labor cost rate** schedules use `toggl rates labor …` when your generated catalog includes them. Typical verbs: upserts, ranged deletes, conflict checks, and reads for workspace/project and per-user overlays (`get-*`, `upsert-*`, `delete-*-range`, `check-*-conflicts`). Use these when the task is **
|
|
7
|
+
Workspace and project **billable rate schedules** live under `toggl rates billable …` (nested under `rates`; same endpoints as the former top-level `billable-rates` command). **Labor cost rate** schedules use `toggl rates labor …` when your generated catalog includes them. Typical verbs: upserts, ranged deletes, conflict checks, and reads for workspace/project and per-user overlays (`get-*`, `upsert-*`, `delete-*-range`, `check-*-conflicts`). Use these when the task is **Toggl 2.0 billing configuration** or **Toggl 2.0 API rate data**.
|
|
8
8
|
|
|
9
9
|
## Track workspace assignment / Members UI
|
|
10
10
|
|
|
11
|
-
**Track** exposes member and workspace defaults such as **`track_billable_rate`** (and related assignment flows in the **Members** area of the Track product). That path is **not** the
|
|
11
|
+
**Track** exposes member and workspace defaults such as **`track_billable_rate`** (and related assignment flows in the **Members** area of the Track product). That path is **not** the Toggl 2.0 `rates billable` endpoints. If someone is changing rates **only in Track’s member/project assignment UI**, use Track’s APIs or the Track web app — do not assume the Toggl 2.0 CLI commands wrote the same field.
|
|
12
12
|
|
|
13
|
-
**Rule of thumb:**
|
|
13
|
+
**Rule of thumb:** Toggl 2.0 CLI `rates billable` (and `rates labor` when present) ↔ Toggl 2.0 billing schedules. Track member default rate ↔ Track/Members and Track APIs.
|