or run

npx @tessl/cli init
Log in

Version

Tile

Overview

Evals

Files

Files

docs

ast-nodes.mdbuild-system.mdcommand-line-tools.mddaemon-mode.mderror-system.mdindex.mdmypyc-compiler.mdplugin-system.mdprogrammatic-api.mdstub-tools.mdtype-system.md

daemon-mode.mddocs/

0

# Daemon Mode

1

2

High-performance daemon mode for faster incremental type checking in development environments. The dmypy daemon provides significant performance improvements for repeated type checking of large codebases.

3

4

## Capabilities

5

6

### Daemon Operations

7

8

```python { .api }

9

# Available through dmypy command-line tool

10

# Start daemon: dmypy daemon

11

# Check files: dmypy check [files...]

12

# Stop daemon: dmypy stop

13

# Restart daemon: dmypy restart

14

# Get status: dmypy status

15

```

16

17

#### Performance Benefits

18

19

- **First run**: Same speed as regular mypy

20

- **Subsequent runs**: 10-50x faster for large codebases

21

- **Incremental analysis**: Only re-analyzes changed files and dependencies

22

- **Memory persistence**: Keeps type information in memory between runs

23

24

### Integration Usage

25

26

```python

27

from mypy import api

28

29

# Use daemon through programmatic API (not thread-safe)

30

result = api.run_dmypy(['check', 'myfile.py'])

31

stdout, stderr, exit_code = result

32

33

# Daemon management

34

api.run_dmypy(['daemon']) # Start daemon

35

api.run_dmypy(['stop']) # Stop daemon

36

```

37

38

For detailed daemon usage patterns, see [Command Line Tools](./command-line-tools.md) and [Programmatic API](./programmatic-api.md) documentation.