Skip to main content

dotfill

dotfill is a local-only helper for maintaining token and identity variables in a personal .env file. It runs a Python CLI plus a localhost web UI, reads TOML configuration, and writes only after explicit user action.

Generic dotfill ships with no services, identities, domains, token names, or import aliases. A user config or a wrapper package supplies those definitions.

Installation

For CLI use, install dotfill as an isolated tool:

uv tool install dotfill

or:

pipx install dotfill

For use as a library or project dependency:

uv add dotfill

or:

pip install dotfill

dotfill requires Python 3.14 or newer.

Quick Start

dotfill status
dotfill
dotfill config path
dotfill config open

Useful options:

dotfill --config-root C:\tmp\dotfill-config --profile demo status
dotfill --env-path C:\work\project\.env
dotfill --env-path C:\work\project

If --env-path points at an existing directory, dotfill uses that directory's .env file.

First Config From An Existing .env

For individual use, install dotfill directly and create your own config.toml. If you already have a .env, a practical first setup path is to make a copy, remove the secret values, then ask an AI coding agent to draft config.toml from the sanitized variable names using dotfill's public docs.

Do not give API tokens or other secrets to the agent. Keep only variable names and non-secret comments, for example GITHUB_TOKEN= or GITHUB_TOKEN=<redacted>. Review the generated service URLs, test URLs, auth mode, identities, and derived variables before using the config against your real .env.

See Getting started for a suggested prompt and review checklist.

Documentation

Maintainer requirements, design notes, and implementation tracking live under dev/docs/.

Configuration

dotfill loads two optional TOML files from the resolved config directory:

config_common.toml
config.toml

config_common.toml is intended for managed baseline configuration. config.toml is intended for user-owned overrides. Both files must include version = 1 when present.

See docs/config-schema.md for the complete schema.

Default config root:

platformdirs.user_config_dir("dotfill", appauthor=False, roaming=True)

Profiles live under profiles/<name> inside the config root.

Example:

version = 1
name = "Example profile"

[target]
default_env_path = "~/.env"

[identities.WORK_EMAIL]
source = "literal"
value = "alice@example.com"

[identities.WORK_USER]
source = "local_part"
from = "WORK_EMAIL"

[derived.WORK_USERNAME]
from_identity = "WORK_EMAIL"

[services.EXAMPLE]
display_name = "Example"
token_var = "EXAMPLE_TOKEN"
token_url = "https://service.example.com/users/{WORK_USER}/tokens"
test_url = "https://service.example.com/me"
tls_verify = true
icon = "key"

[services.EXAMPLE.auth]
kind = "bearer"

[import_aliases.OLD_EXAMPLE_TOKEN]
target = "EXAMPLE_TOKEN"

Set enabled = false in config.toml to disable an inherited service, identity, derived variable, or import alias.

.env Behavior

The target .env contains ordinary environment values only. dotfill no longer reads legacy service or derived-variable meta-configuration from .env; those assignments are unrelated content unless their exact names are explicitly configured as managed variables in TOML.

The parser/writer preserves comments, blank lines, unrelated variables, unrelated duplicates, and line endings. Duplicate managed variables are rejected before writes.

Local UI

dotfill starts a server bound to 127.0.0.1, opens the dashboard, and serves static assets from the installed package. The dashboard can:

  • show configured identities, derived variables, services, config directory, and target .env;
  • save service tokens;
  • fill missing enabled derived variables during token saves and import commits;
  • fill or reset individual derived variables to their computed defaults;
  • import token/derived values from another .env-like file;
  • test configured service tokens on explicit user action.

When no services are configured, the dashboard shows an empty generic state.

Privacy

  • No dotfill-operated cloud backend, accounts, telemetry, or remote sync.
  • The optional entra identity detector (disabled by default) silently queries Microsoft Graph /me for the signed-in work or school account through the Windows sign-in broker (MSAL, in process). Its token is used for that single request and is never logged or stored. See docs/config-schema.md.
  • Raw token values are not returned by state/import APIs.
  • Dropped import values are kept only in backend session memory as secret values.
  • The browser keeps session and token input in memory only; no browser storage is used.
  • Service tests support configured bearer, header API-key, and basic auth requests only to configured test URLs.
  • Service tests verify TLS by default. Use tls_verify = false only when a configured service explicitly requires it.

Wrapper Packages

Wrapper packages are for sharing baked-in dotfill defaults with other people. For example, a team wrapper can provide managed config_common.toml content so teammates get the same services, token variable names, identity rules, import aliases, and profile policy without each person hand-writing the same TOML.

If you are using dotfill only for yourself, you usually do not need a wrapper. Install dotfill directly and create your own config.toml, profiles, services, identities, and aliases.

Wrappers launch dotfill through:

from importlib.metadata import version as package_version

from dotfill.entrypoints import run_dotfill

raise SystemExit(
    run_dotfill(
        locked_profile="team",
        program_name="team-dotfill",
        wrapper_name="team-dotfill",
        wrapper_version=package_version("team-dotfill"),
        before_config_load=sync_managed_config,
    )
)

Use locked_profile when the wrapper command should always mean one profile. Use default_profile only when CLI --profile or DOTFILL_PROFILE should be allowed to select another profile. Wrappers should not import the Typer app directly. User overrides remain in config.toml.

wrapper_name and wrapper_version are optional, but they must be supplied together. They add the wrapper identity beside dotfill's own dashboard version, for example v1.4.1 (team-dotfill v1.0.1). program_name remains independent and controls the command name used in CLI help and errors.

For a complete sample wrapper repo, see dotfill-wrapper-example.

Development

From a source checkout:

uv sync
uv run pytest
uv run dotfill status
uv build

If the virtual environment is activated, dotfill --help works directly. Without activation, use uv run dotfill ... or .\.venv\Scripts\dotfill.exe ....

Metadata

Release files for dotfill 1.5.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dotfill 1.5.1
File Size Uploaded Provenance Actions
dotfill-1.5.1.tar.gz 60.9 kB Without provenance Details for dotfill-1.5.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for dotfill 1.5.1
File Interpreter ABI Platform Actions
dotfill-1.5.1-py3-none-any.whl Python 3 none any Details for dotfill-1.5.1-py3-none-any.whl

Total release size: 136.8 kB

Release files / dotfill-1.5.1.tar.gz

Download URL dotfill-1.5.1.tar.gz
Size 60.9 kB
Tags Source
SHA-256 checksum
How to use checksums
8120d77d006b7eb8c678ba0aae2b31a3f1eebe3ec59c60002c271a1b79332f26
BLAKE2b-256 checksum
How to use checksums
fdeefe2acaa51f3a4a8361faac869526e13dedbedfd0370c7e71e6f126dbe770
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.20 {"installer":{"name":"uv","version":"0.12.20","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / dotfill-1.5.1-py3-none-any.whl

Download URL dotfill-1.5.1-py3-none-any.whl
Size 75.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e30777dab45d0636fd4dc376b36ade2c8a5a96723e961860e772809b84c65e68
BLAKE2b-256 checksum
How to use checksums
3a580d3bbae7c92a1fa7187c0204ab630bd0583b4a2b79de37939a3b2e2b59b7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.20 {"installer":{"name":"uv","version":"0.12.20","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for dotfill 1.5.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page