otta-cli
Use `otta-cli` to automate `otta.fi` workflows from terminal. This tool is usually used for tracking working time, absences, and sick leaves: authenticate, inspect config/cache, check account status, manage worktimes (list/add/update/delete), browse absences, fetch holidays, and generate combined/detailed calendar reports. Trigger this skill when a request needs CLI-first Otta operations, `OTTA_CLI_*` environment setup, machine-readable `--format json` output, or diagnosis of auth/config/API validation errors.
- License 许可
- MIT
- 最近更新
- 2026-06-07
- Stars
- ★ 0
- Forks
- 1
01 前言 Front Matter
- name
- otta-cli
- description
- Use `otta-cli` to automate `otta.fi` workflows from terminal. This tool is usually used for tracking working time, absences, and sick leaves: authenticate, inspect config/cache, check account status, manage worktimes (list/add/update/delete), browse absences, fetch holidays, and generate combined/detailed calendar reports. Trigger this skill when a request needs CLI-first Otta operations, `OTTA_CLI_*` environment setup, machine-readable `--format json` output, or diagnosis of auth/config/API validation errors.
03 SKILL.md 正文
Otta CLI
Use this skill to execute Otta time-tracking tasks end-to-end with repeatable CLI commands.
Main repository: https://github.com/mekedron/otta-cli
Quick Start
-
Use the
ottabinary directly. -
Verify command surface and storage paths.
otta --help
otta config path
otta config cache-path
- Authenticate and hydrate cache.
otta auth login --username "$OTTA_CLI_USERNAME" --password "$OTTA_CLI_PASSWORD" --format json
otta status --format json
statusupdates cached user metadata (foruserandworktimegroupfallbacks used by worktimes/holidays/calendar commands).- For non-interactive automation, prefer
--password-stdinor secret env handling to reduce shell history exposure.
Command Recipes
Use explicit dates/times in YYYY-MM-DD and HH:MM formats.
List worktimes:
otta worktimes list --date 2026-02-20 --format json
Add worktime:
otta worktimes add \
--date 2026-02-20 \
--start 09:00 \
--end 17:00 \
--pause 30 \
--project <project-id> \
--worktype <worktype-id> \
--description "Example task description" \
--format json
--useris optional ifOTTA_CLI_USER_IDor cached user ID exists.
Update worktime:
otta worktimes update --id <worktime-id> --start 10:00 --end 18:00 --format json
- Send at least one changed field with
--id.
Delete worktime:
otta worktimes delete --id <worktime-id> --format json
Fetch holidays/workday calendar:
otta holidays \
--from 2026-02-20 \
--to 2026-02-29 \
--worktimegroup <worktimegroup-id> \
--format json
--worktimegroupis optional ifOTTA_CLI_WORKTIMEGROUP_IDor cached value exists.
Browse absences:
otta absence browse \
--from 2026-02-01 \
--to 2026-02-28 \
--format json
Fetch current cumulative saldo:
otta saldo --format json
Generate combined calendar overview:
otta calendar overview \
--from 2026-02-01 \
--to 2026-02-28 \
--format json
Generate detailed calendar day-by-day report:
otta calendar detailed \
--from 2026-02-01 \
--to 2026-02-28 \
--format json
Use alternate duration units when totals are minute-based:
otta calendar detailed --from 2026-02-01 --to 2026-02-28 --format json --duration-format hours
otta worktimes browse --from 2026-02-01 --to 2026-02-28 --format json --duration-format days
--duration-formatvalues:minutes(default),hours,days,hhmm- day conversion is fixed at
1 day = 24h = 1440 minutes
Generate absence comment text:
otta absence comment \
--type sick \
--from 2026-02-20 \
--to 2026-02-20 \
--details "Flu symptoms" \
--format json
Environment Variables
Use these variables when running in CI/non-interactive environments:
OTTA_CLI_CONFIG_PATHOTTA_CLI_CACHE_PATHOTTA_CLI_API_BASE_URLOTTA_CLI_CLIENT_IDOTTA_CLI_USERNAMEOTTA_CLI_PASSWORDOTTA_CLI_ACCESS_TOKENOTTA_CLI_TOKEN_TYPEOTTA_CLI_REFRESH_TOKENOTTA_CLI_TOKEN_SCOPEOTTA_CLI_USER_IDOTTA_CLI_WORKTIMEGROUP_ID
Agent Operating Rules
- Prefer
--format jsonfor all data-producing commands and parse response fields instead of scraping text output. worktimes list/browse/reportare worktime-only and never include absences; do not infer absences from empty worktime rows.- For user schedule checks/log interpretation, prefer
calendar detailed --format jsonfirst; usecalendar overviewas lighter fallback. - Use
--duration-formatwhen users request non-minute output; keep raw minute values for auditability. - Run
status --format jsonbefore operations that rely on cached user/worktimegroup metadata. - Validate dates/times before command execution (
YYYY-MM-DD,HH:MM). - Run
worktimes listbeforeupdateordeletewhen IDs are not explicitly known. - Return exact command, exit code, and concise stderr message when failures happen.
- Never print raw credentials or tokens in summaries.
Failure Recovery
no access token configured (run \otta auth login`)`- Run
auth login, then rerunstatus.
- Run
username is required (use --username)- Pass
--usernameor setOTTA_CLI_USERNAME.
- Pass
--worktimegroup is required (...)- Pass
--worktimegroup, setOTTA_CLI_WORKTIMEGROUP_ID, or runstatusto refresh cache.
- Pass
--date must be YYYY-MM-DD,--start must be HH:MM,--to must be greater than or equal to --from- Correct input format/order, rerun command.
directory ... is contained in a module that is not one of the workspace modules listed in go.work- Build/run with
GOWORK=offin this repository context.
- Build/run with
04 同仓库更多 Skills
crowd-prompting
A marketplace where AI agents improve prompts, system instructions, tool descriptions, and other text-based content with domain expertise from real-world operations — and earn tokens for valuable contributions.
ceaser
Interact with the Ceaser privacy protocol on Base L2 using the ceaser-mcp MCP tools. This skill uses the ceaser-mcp npm package for ALL operations -- shield, unshield, note management, and protocol queries. All ceaser tool calls use CLI subcommands (npx -y ceaser-mcp <subcommand>). Ceaser is a privacy-preserving ETH wrapper using Noir/UltraHonk zero-knowledge proofs on Base L2 (chain ID 8453).
ceaser-send
Fully automated private ETH transfer via Ceaser Protocol on Base L2 using the ceaser-mcp MCP tools. This skill uses the ceaser-mcp npm package for ALL operations -- all ceaser tool calls use CLI subcommands (npx -y ceaser-mcp <subcommand>). WARNING -- creates observable on-chain links between user wallet and hot wallet (see Privacy Warning). Generates an ephemeral hot wallet with BIP-39 mnemonic recovery, user funds it, agent signs and broadcasts the Shield TX automatically. Exactly one manual step required (funding the hot wallet with ETH). Uses Noir/UltraHonk zero-knowledge proofs.
dilemm-ai
Compete in DilemmAI, the prisoner's dilemma AI arena at dilemm.ai. Use when an OpenClaw agent wants to create an account, design and submit strategy prompts for their bot, enter matchmaking, analyze historical matches and leaderboards, and iterate on bot strategy. Requires headless browser automation (no API available yet).
moldium
Post and manage content on the Moldium blog platform. Triggered by "post to Moldium", "write a blog post", "publish an article", etc.
arxiv-paper-reviews
Interact with arXiv Crawler API to fetch papers, read reviews, submit comments, search papers, and import papers. Use when working with arXiv papers, fetching paper lists by date/category/interest, viewing paper details with comments, submitting paper reviews, searching papers by title, or importing papers from arXiv URLs via API at http://weakaccept.top:8000/.