Skip to main content

Token-based CLI for team, conversations, equipment, and absence in Dottie HR

Project description

dottie-cli

dottie-cli is a Python command line interface for the Dottie HR web application at https://app.dottie.no and the corresponding API at https://api.dottie.no.

The tool is designed for both direct shell use and agent-driven workflows:

  • read commands are stable and scriptable
  • write commands default to preview mode
  • token handling is explicit and never committed
  • output can be table-shaped for people or JSON for automation

Features

Current command coverage includes:

  • team membership and team overview
  • equipment assigned to team members
  • scheduled vacation and other absence for the current employee and team scope
  • recurring meeting history
  • append-only manager note preparation for upcoming recurring meetings

Authentication

The CLI uses a short-lived JWT from the live Dottie web application. It does not mint credentials, store refresh tokens, or expect secrets in the repository.

Default lookup order:

  1. DOTTIE_TOKEN environment variable
  2. ~/.dottie-token

The token must be the Dottie application token used against https://api.dottie.no, not a generic identity token.

Token Capture

Print a bookmarklet:

python -m dottie_cli token bookmarklet

Print a console snippet:

python -m dottie_cli token console-snippet

Validate the local token file without printing the token:

python -m dottie_cli token status

Typical capture flow:

  1. Open https://app.dottie.no
  2. Use the bookmarklet or console snippet
  3. Copy the token
  4. Write it locally:
pbpaste > ~/.dottie-token

Install

Editable install:

python3 -m pip install -e .

Run without installing:

python3 -m dottie_cli --help

Once published, the package can be invoked through uvx with either command name:

uvx --from dottie-cli dottie --help
uvx dottie-cli --help

Commands

Read team members:

dottie team list
dottie team list --include-self --json

Summarize headcount and organization distribution:

dottie team overview

Read equipment assigned to your team:

dottie equipment overview

Read absence for you and your team:

dottie absence overview --from 2026-01-01 --to 2026-12-31

Read conversation history for one employee:

dottie conversations history "Employee Name"

Read your own conversation history:

dottie conversations history --self

Read the next upcoming recurring meeting and any visible prefilled answers:

dottie conversations upcoming "Employee Name"
dottie conversations upcoming --self

Preview append-only conversation note updates:

dottie conversations sync-notes "Employee Name" --dry-run

Apply the updates after preview:

dottie conversations sync-notes "Employee Name" --apply

Optionally include leader feedback in the same run:

dottie conversations sync-notes "Employee Name" \
  --leader-feedback "Takk for at du tok ansvar for overleveringen i april." \
  --apply

Write Safety

sync-notes is intentionally append-only for private notes:

  • existing privateNote content is preserved
  • generated content is appended as a new section
  • a small provenance marker is included so repeated runs do not duplicate the same note block
  • feedback writes are explicit through --leader-feedback

API Basis

The command layout is based on Dottie's public OpenAPI document:

  • https://api.dottie.no/swagger/index.html
  • https://api.dottie.no/swagger/v1/swagger.json

Relevant resources used by this CLI:

  • Employee
  • Equipment
  • EquipmentLease
  • LeaveRequest
  • LeaveInterval
  • RecurringMeeting
  • RecurringMeetingAnswer

Notes for Agents

This CLI is intended to be straightforward to drive from another agent or automation layer:

  • prefer --json when another tool will consume the result
  • use token status as a preflight
  • treat conversations sync-notes without --apply as the planning step
  • only escalate to --apply once the preview matches the intended note append

No user or tenant identifiers are hard-coded in the source tree. The current employee is resolved from app_uid in the live token.

Publishing

The repository is set up to publish to PyPI from GitHub Actions on version tags matching v*.

Example release flow:

git tag v0.2.1
git push origin main --tags

The publish workflow uses PyPI trusted publishing. Configure the dottie-cli project on PyPI to trust this repository and the publish.yml workflow before relying on the automated release path.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dottie_cli-0.2.1.tar.gz (19.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dottie_cli-0.2.1-py3-none-any.whl (16.5 kB view details)

Uploaded Python 3

File details

Details for the file dottie_cli-0.2.1.tar.gz.

File metadata

  • Download URL: dottie_cli-0.2.1.tar.gz
  • Upload date:
  • Size: 19.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for dottie_cli-0.2.1.tar.gz
Algorithm Hash digest
SHA256 32727156c9527ec0cb1d8d13c7a886daa61182d1805cf1d1c4987940844e3881
MD5 dbc6ffce1e87376b4df18a7d709e19cf
BLAKE2b-256 63da73ca2ae8b2c12d2735e5fc265d52a618c68662c40a725db908ceb8b39d35

See more details on using hashes here.

Provenance

The following attestation bundles were made for dottie_cli-0.2.1.tar.gz:

Publisher: publish.yml on okms/dottie-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dottie_cli-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: dottie_cli-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 16.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for dottie_cli-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8e63ce70fbdbcb723e02d785efbcaf845d9043893cfa30b45e1f7eb44ccf02dc
MD5 2e58e6db90ddb0a41d335e5eaf139dec
BLAKE2b-256 a696215ccc63f2cd4ed7a794567dcc50faa6970da409443b3b94db71ca5e4b47

See more details on using hashes here.

Provenance

The following attestation bundles were made for dottie_cli-0.2.1-py3-none-any.whl:

Publisher: publish.yml on okms/dottie-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page