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, including self-history for employees
- the next upcoming recurring meeting and any visible prefilled answers
- append-only manager note preparation for upcoming recurring meetings
- direct write of
answerorprivateNotefields on the upcoming meeting (single index or bulk from JSON)
Install
From PyPI:
pip install dottie-cli
Run without installing (via uv):
uvx dottie-cli --help
uvx --from dottie-cli dottie --help
From source (editable):
git clone https://github.com/okms/dottie-cli
cd dottie-cli
python3 -m pip install -e .
After install, both script names are available:
dottie --help
dottie-cli --help
You can also run the module directly without installing:
python3 -m dottie_cli --help
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:
DOTTIE_TOKENenvironment variable~/.dottie-token--token-file <path>to override explicitly
The token must be the Dottie application token used against https://api.dottie.no, not a generic identity token.
Token Capture
Print a bookmarklet:
dottie token bookmarklet
Print a console snippet:
dottie token console-snippet
Validate the local token file without printing the token:
dottie token status
Typical capture flow:
- Open
https://app.dottie.no - Use the bookmarklet or console snippet
- Copy the token
- Write it locally:
pbpaste > ~/.dottie-token
Global Flags
These flags can appear anywhere on the command line:
--json— emit JSON instead of a table or prose view--token-file <path>— override the token file location
Commands
Team
List team members:
dottie team list
dottie team list --include-self
dottie team list --json
Summarize headcount and organization distribution:
dottie team overview
Equipment
Read equipment assigned to your team:
dottie equipment overview
dottie equipment overview --include-self
Absence
Read absence for you and your team:
dottie absence overview --from 2026-01-01 --to 2026-12-31
dottie absence overview --from 2026-01-01 --to 2026-12-31 --exclude-self
Both bounds are optional and accept ISO dates or datetimes.
Conversations
Read conversation history for one employee:
dottie conversations history "Employee Name"
Read your own conversation history (works for non-managers):
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 a single answer on the upcoming meeting (yours or a direct report's):
dottie conversations answer --self --index 1 --text "..." --dry-run
dottie conversations answer --self --index 1 --text "..." --apply
dottie conversations answer "Employee Name" --index 16 --text "..." --apply
Write multiple answers in one call via a JSON file:
cat > answers.json <<'EOF'
{
"answers": [
{"index": 1, "text": "..."},
{"index": 10, "text": "..."}
]
}
EOF
dottie conversations answer --self --from-file answers.json --apply
Use --property privateNote to target the manager-private note field instead
of the shared answer field. Updates that would not change the stored value
are reported as skipped and do not generate a PATCH.
Write Safety
sync-notes is intentionally append-only for private notes:
- existing
privateNotecontent 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 - without
--apply, no PATCH requests are sent
answer replaces the target field's value (unlike sync-notes):
- the preview shows every patch with the final composed value before any PATCH runs
- updates that would write the same value already present are reported as
skipped
API Basis
The command layout is based on Dottie's public OpenAPI document:
https://api.dottie.no/swagger/index.htmlhttps://api.dottie.no/swagger/v1/swagger.json
Relevant resources used by this CLI:
EmployeeEquipmentEquipmentLeaseLeaveRequestLeaveIntervalRecurringMeetingRecurringMeetingAnswer
Notes for Agents
This CLI is intended to be straightforward to drive from another agent or automation layer:
- prefer
--jsonwhen another tool will consume the result - use
dottie token statusas a preflight - treat
dottie conversations sync-noteswithout--applyas the planning step - only escalate to
--applyonce 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.
Releases
New versions are published to PyPI from GitHub Actions when a v* tag is pushed. The workflow uses PyPI trusted publishing against the pypi environment in this repository, so no long-lived API tokens are stored.
Release flow:
# bump version in pyproject.toml, commit
git tag vX.Y.Z
git push origin main --tags
The .github/workflows/publish.yml workflow builds the distribution and publishes it on tag push. Tag-less runs can also be triggered via workflow_dispatch from the Actions tab.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dottie_cli-0.3.1.tar.gz.
File metadata
- Download URL: dottie_cli-0.3.1.tar.gz
- Upload date:
- Size: 24.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2acbc4082964bf0e09a6aae30f2bd1e59f439b82087cca041b3d6f4ae7b25297
|
|
| MD5 |
ec0c9212b1121451803379b98526a321
|
|
| BLAKE2b-256 |
050a035f0c237390bcae2ced43b5b9e11f657f99863e2090da414aff910ac33e
|
Provenance
The following attestation bundles were made for dottie_cli-0.3.1.tar.gz:
Publisher:
publish.yml on okms/dottie-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dottie_cli-0.3.1.tar.gz -
Subject digest:
2acbc4082964bf0e09a6aae30f2bd1e59f439b82087cca041b3d6f4ae7b25297 - Sigstore transparency entry: 1365591803
- Sigstore integration time:
-
Permalink:
okms/dottie-cli@968114bbdacfa92f78e7e5702fdb54f702a2941d -
Branch / Tag:
refs/tags/v0.3.1 - Owner: https://github.com/okms
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@968114bbdacfa92f78e7e5702fdb54f702a2941d -
Trigger Event:
push
-
Statement type:
File details
Details for the file dottie_cli-0.3.1-py3-none-any.whl.
File metadata
- Download URL: dottie_cli-0.3.1-py3-none-any.whl
- Upload date:
- Size: 19.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ba33ee7ecd56dc52eb959fcb1b161ee75c01d1b2e6c9ece036f9fae7770cf0e8
|
|
| MD5 |
07687d3f6fda3890290e505ceecd8e2d
|
|
| BLAKE2b-256 |
cee1ae1897d8526586f7b1fc43a0e9812c5ba511803a0cc9bc4856642a59cf56
|
Provenance
The following attestation bundles were made for dottie_cli-0.3.1-py3-none-any.whl:
Publisher:
publish.yml on okms/dottie-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dottie_cli-0.3.1-py3-none-any.whl -
Subject digest:
ba33ee7ecd56dc52eb959fcb1b161ee75c01d1b2e6c9ece036f9fae7770cf0e8 - Sigstore transparency entry: 1365591867
- Sigstore integration time:
-
Permalink:
okms/dottie-cli@968114bbdacfa92f78e7e5702fdb54f702a2941d -
Branch / Tag:
refs/tags/v0.3.1 - Owner: https://github.com/okms
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@968114bbdacfa92f78e7e5702fdb54f702a2941d -
Trigger Event:
push
-
Statement type: