Metadata-Version: 2.5
Name: dfm-agent
Version: 0.0.1
Summary: Developer Foundation Model: a local, privacy-first engineering agent for Apple Silicon.
Project-URL: Homepage, https://github.com/NehharShah/dfm
Project-URL: Documentation, https://github.com/NehharShah/dfm/blob/main/docs/guide.md
Project-URL: Issues, https://github.com/NehharShah/dfm/issues
Project-URL: Changelog, https://github.com/NehharShah/dfm/blob/main/CHANGELOG.md
Author: Nihar Shah
License: MIT
License-File: LICENSE
Keywords: apple-silicon,coding-agent,developer-tools,local-llm,mlx,privacy
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: MacOS
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development
Classifier: Topic :: Software Development :: Quality Assurance
Classifier: Typing :: Typed
Requires-Python: >=3.12
Requires-Dist: pydantic>=2.7
Requires-Dist: pyyaml>=6.0
Requires-Dist: repocanon<0.3,>=0.2.1
Requires-Dist: repokg<0.5,>=0.4.5
Requires-Dist: rich>=13.7.1
Requires-Dist: typer>=0.12.3
Provides-Extra: mlx
Requires-Dist: mlx-lm>=0.32.2; extra == 'mlx'
Description-Content-Type: text/markdown

# dfm — Developer Foundation Model

[![CI](https://github.com/NehharShah/dfm/actions/workflows/ci.yml/badge.svg)](https://github.com/NehharShah/dfm/actions/workflows/ci.yml)
[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
![Platform: macOS on Apple Silicon](https://img.shields.io/badge/platform-macOS%20Apple%20Silicon-lightgrey)
![Python 3.12+](https://img.shields.io/badge/python-3.12%2B-blue)

A coding agent that runs entirely on your Mac. DFM edits, builds, tests, repairs and verifies
code using on-device models: Apple FM for routing and short text, and a local MLX model for
code. Repository knowledge comes from [RepoCanon](https://github.com/NehharShah/repocanon),
[RepoKG](https://github.com/NehharShah/repokg) and, optionally,
[Reflex](https://github.com/sumervaid/reflex-tui).

DFM sends no code or prompts to hosted models. Other network access (GitHub, package registries)
is off or requires approval, per [policy](docs/policy.md).

**Status:** early (0.0.1). Commands and configuration may change.

## Requirements

- macOS on Apple Silicon, Python 3.12+, [uv](https://docs.astral.sh/uv/), Git.
- Memory for the local model: the recommended 27B model (4-bit) needs about 18.5 GB at its
  default context, so 32 GB or more is recommended. `dfm setup` picks a model that fits.
- Optional: Apple Intelligence, for Apple FM.

## Quick start

Install `dfm` as a command (the package is `dfm-agent`; the command is `dfm`):

```bash
uv tool install "dfm-agent[mlx]"           # from PyPI, once released
uv tool install "git+https://github.com/NehharShah/dfm[mlx]"   # or straight from GitHub
dfm doctor                                 # check this machine
dfm setup                                  # choose a local model
dfm implement "fix the failing test"
```

Omit `[mlx]` to install without the local coder. Upgrade with `uv tool upgrade dfm-agent`.
To run from a checkout instead, see [CONTRIBUTING.md](CONTRIBUTING.md).

## How it works

- The model proposes one action at a time (read, search, patch, run, test). DFM executes it,
  reruns the tests after every edit, and reports only what a command verified.
- Every command is classified and checked against policy, then runs in a per-command macOS
  sandbox. Destructive, production and mainnet actions require a typed confirmation. DFM does
  not commit, push or rewrite history.
- Repository files, issues and CI logs reach the model as untrusted data, with secrets
  redacted.
- Memory checks, thermal pacing, reasoning budgets and a persistent prompt cache keep the model
  usable alongside other apps.

Modes: `ask`, `plan`, `implement`, `review`, `security-review`, `ci`, `fix-pr`,
`implement-issue`, `benchmark`. Full list: [command reference](docs/cli.md).

## Documentation

[Guide](docs/guide.md) · [Architecture](ARCHITECTURE.md) · [Commands](docs/cli.md) ·
[Configuration](docs/config.md) · [Policy](docs/policy.md) · [Threat model](docs/threat-model.md) ·
[Troubleshooting](docs/troubleshooting.md) · [Design decisions](docs/decisions)

## Contributing and security

See [CONTRIBUTING.md](CONTRIBUTING.md) and [AGENTS.md](AGENTS.md). Report vulnerabilities
privately as described in [SECURITY.md](SECURITY.md). Changes: [CHANGELOG.md](CHANGELOG.md).

## License and notices

DFM is released under the [MIT License](LICENSE) and is provided "as is", without warranty of
any kind. DFM runs commands and changes files on your machine. Its safeguards reduce risk but do
not eliminate it. Review its changes before you commit them.

Models are third-party software under their own licenses, and you are responsible for complying
with the license of any model you download. RepoCanon, RepoKG and Reflex are separate projects
under their own licenses.

Apple, Apple Intelligence, Apple Silicon and macOS are trademarks of Apple Inc. DFM is an
independent project and is not affiliated with or endorsed by Apple.
