Are we tiny?#
gptme is intended to be small and simple, and focus on doing the right thing in the right way, rather than all the things in all the ways.
Since it is built by a single developer, there are limits imposed to how large things can get before it becomes too much to handle. Being aggressive about keeping things small and simple is a way to keep the project maintainable and fun to work on. The fastest way to kill a project is to make it too big and complex, and suffer burnout as a result.
To that end, in this document we will present some statistics about the current state of the project, trying to be mindful to keep an eye on this page and make sure we are not growing too much.
Lines of code#
LoC Core#
$ make -C .. cloc-core
make[2]: Entering directory '/home/runner/work/gptme/gptme'
cloc gptme/*.py gptme/tools/__init__.py gptme/tools/base.py --by-file
24 text files.
classified 24 files
24 unique files.
0 files ignored.
github.com/AlDanial/cloc v 1.90 T=0.03 s (761.4 files/s, 126776.1 lines/s)
----------------------------------------------------------------------------------------
File blank comment code
----------------------------------------------------------------------------------------
gptme/cli.py 106 123 521
gptme/logmanager.py 59 45 259
gptme/message.py 45 55 236
gptme/util.py 47 25 236
gptme/commands.py 18 18 188
gptme/llm.py 38 28 153
gptme/llm_openai_models.py 4 9 134
gptme/tools/base.py 35 51 125
gptme/config.py 32 14 113
gptme/prompts.py 44 69 102
gptme/models.py 24 10 100
gptme/tools/__init__.py 21 11 93
gptme/init.py 27 21 89
gptme/llm_anthropic.py 21 7 86
gptme/llm_openai.py 20 12 84
gptme/reduce.py 24 32 73
gptme/codeblock.py 13 10 64
gptme/tabcomplete.py 20 19 45
gptme/dirs.py 15 6 22
gptme/useredit.py 12 13 21
gptme/constants.py 4 12 14
gptme/__init__.py 1 0 8
gptme/__version__.py 1 0 5
gptme/__main__.py 1 0 3
----------------------------------------------------------------------------------------
SUM: 632 590 2774
----------------------------------------------------------------------------------------
make[2]: Leaving directory '/home/runner/work/gptme/gptme'
LoC Tools#
$ make -C .. cloc-tools
make[2]: Entering directory '/home/runner/work/gptme/gptme'
cloc gptme/tools/*.py --by-file
16 text files.
classified 16 files
16 unique files.
0 files ignored.
github.com/AlDanial/cloc v 1.90 T=0.02 s (749.6 files/s, 117915.2 lines/s)
-------------------------------------------------------------------------------------
File blank comment code
-------------------------------------------------------------------------------------
gptme/tools/shell.py 59 77 254
gptme/tools/tmux.py 39 66 153
gptme/tools/patch.py 38 35 143
gptme/tools/python.py 46 56 134
gptme/tools/chats.py 44 42 127
gptme/tools/base.py 35 51 125
gptme/tools/_browser_playwright.py 36 15 120
gptme/tools/save.py 27 34 102
gptme/tools/subagent.py 36 26 94
gptme/tools/__init__.py 21 11 93
gptme/tools/browser.py 41 82 77
gptme/tools/screenshot.py 11 6 36
gptme/tools/youtube.py 10 4 27
gptme/tools/vision.py 5 1 13
gptme/tools/gh.py 10 24 11
gptme/tools/read.py 3 7 10
-------------------------------------------------------------------------------------
SUM: 461 537 1519
-------------------------------------------------------------------------------------
make[2]: Leaving directory '/home/runner/work/gptme/gptme'
LoC Server#
$ make -C .. cloc-server
make[2]: Entering directory '/home/runner/work/gptme/gptme'
cloc gptme/server --by-file
6 text files.
classified 6 files
6 unique files.
0 files ignored.
github.com/AlDanial/cloc v 1.90 T=0.01 s (632.1 files/s, 66582.9 lines/s)
---------------------------------------------------------------------------------
File blank comment code
---------------------------------------------------------------------------------
gptme/server/static/index.html 27 5 342
gptme/server/api.py 33 19 103
gptme/server/static/style.css 9 0 42
gptme/server/cli.py 8 5 27
gptme/server/__init__.py 2 3 3
gptme/server/__main__.py 1 0 3
---------------------------------------------------------------------------------
SUM: 80 32 520
---------------------------------------------------------------------------------
make[2]: Leaving directory '/home/runner/work/gptme/gptme'
LoC Tests#
$ make -C .. cloc-tests
make[2]: Entering directory '/home/runner/work/gptme/gptme'
cloc tests/*.py --by-file
18 text files.
classified 18 files
18 unique files.
0 files ignored.
github.com/AlDanial/cloc v 1.90 T=0.02 s (1147.6 files/s, 84411.4 lines/s)
------------------------------------------------------------------------------------------
File blank comment code
------------------------------------------------------------------------------------------
tests/test_cli.py 72 41 236
tests/test_shell.py 21 19 63
tests/test_server.py 22 2 60
tests/test_tools_patch.py 31 87 48
tests/test_eval.py 8 9 47
tests/test_message.py 7 17 39
tests/test_reduce.py 10 2 39
tests/test_codeblock.py 12 31 38
tests/test_util.py 28 51 38
tests/test_tools_python.py 15 1 21
tests/test_tabcomplete.py 6 4 19
tests/test_browser.py 13 10 18
tests/test_logmanager.py 8 5 18
tests/test_prompts.py 8 1 16
tests/test_tools_chats.py 2 0 13
tests/test_tools_shell.py 9 11 13
tests/test_tools_subagent.py 7 10 11
tests/test_config.py 2 0 5
------------------------------------------------------------------------------------------
SUM: 281 301 742
------------------------------------------------------------------------------------------
make[2]: Leaving directory '/home/runner/work/gptme/gptme'
LoC Eval#
$ make -C .. cloc-eval
make[2]: Entering directory '/home/runner/work/gptme/gptme'
cloc gptme/eval/**.py --by-file
8 text files.
classified 8 files
8 unique files.
0 files ignored.
github.com/AlDanial/cloc v 1.90 T=0.01 s (627.3 files/s, 75825.2 lines/s)
-------------------------------------------------------------------------------------
File blank comment code
-------------------------------------------------------------------------------------
gptme/eval/main.py 52 18 296
gptme/eval/run.py 47 27 274
gptme/eval/execenv.py 10 14 55
gptme/eval/agents.py 12 5 52
gptme/eval/filestore.py 5 2 32
gptme/eval/types.py 13 12 32
gptme/eval/__init__.py 1 0 4
gptme/eval/__main__.py 1 0 3
-------------------------------------------------------------------------------------
SUM: 141 78 748
-------------------------------------------------------------------------------------
make[2]: Leaving directory '/home/runner/work/gptme/gptme'
LoC Total#
$ make -C .. cloc-total
make[2]: Entering directory '/home/runner/work/gptme/gptme'
cloc gptme/reduce.py gptme/message.py gptme/llm_anthropic.py gptme/__version__.py gptme/cli.py gptme/tools/youtube.py gptme/tools/read.py gptme/tools/screenshot.py gptme/tools/subagent.py gptme/tools/_browser_playwright.py gptme/tools/python.py gptme/tools/save.py gptme/tools/base.py gptme/tools/patch.py gptme/tools/chats.py gptme/tools/tmux.py gptme/tools/vision.py gptme/tools/gh.py gptme/tools/__init__.py gptme/tools/browser.py gptme/tools/shell.py gptme/llm.py gptme/useredit.py gptme/llm_openai.py gptme/codeblock.py gptme/__main__.py gptme/llm_openai_models.py gptme/constants.py gptme/init.py gptme/dirs.py gptme/models.py gptme/eval/filestore.py gptme/eval/run.py gptme/eval/execenv.py gptme/eval/__main__.py gptme/eval/suites/init_projects.py gptme/eval/suites/basic.py gptme/eval/suites/__init__.py gptme/eval/suites/browser.py gptme/eval/types.py gptme/eval/__init__.py gptme/eval/main.py gptme/eval/agents.py gptme/util.py gptme/server/cli.py gptme/server/__main__.py gptme/server/api.py gptme/server/__init__.py gptme/commands.py gptme/config.py gptme/logmanager.py gptme/tabcomplete.py gptme/__init__.py gptme/prompts.py tests/test_util.py tests/test_reduce.py tests/test_tools_shell.py tests/test_prompts.py tests/test_message.py tests/test_browser.py tests/test_server.py tests/test_tools_subagent.py tests/test_tabcomplete.py tests/test_tools_patch.py tests/test_tools_chats.py tests/test_codeblock.py tests/test_tools_python.py tests/test_eval.py tests/test_config.py tests/test_shell.py tests/test_logmanager.py tests/test_cli.py scripts/list_user_messages.py scripts/shorten_details.py scripts/summarize_project.py scripts/gpt_todoer.py scripts/describe_api.py scripts/train/collect.py --by-file
78 text files.
classified 78 files
78 unique files.
0 files ignored.
github.com/AlDanial/cloc v 1.90 T=0.07 s (1157.2 files/s, 140663.7 lines/s)
-------------------------------------------------------------------------------------
File blank comment code
-------------------------------------------------------------------------------------
gptme/cli.py 106 123 521
gptme/eval/main.py 52 18 296
gptme/eval/run.py 47 27 274
gptme/logmanager.py 59 45 259
gptme/tools/shell.py 59 77 254
gptme/message.py 45 55 236
gptme/util.py 47 25 236
tests/test_cli.py 72 41 236
gptme/commands.py 18 18 188
gptme/llm.py 38 28 153
gptme/tools/tmux.py 39 66 153
gptme/tools/patch.py 38 35 143
gptme/llm_openai_models.py 4 9 134
gptme/tools/python.py 46 56 134
gptme/tools/chats.py 44 42 127
gptme/tools/base.py 35 51 125
gptme/tools/_browser_playwright.py 36 15 120
gptme/config.py 32 14 113
scripts/gpt_todoer.py 47 25 107
gptme/server/api.py 33 19 103
scripts/train/collect.py 34 52 103
gptme/prompts.py 44 69 102
gptme/tools/save.py 27 34 102
gptme/models.py 24 10 100
gptme/tools/subagent.py 36 26 94
gptme/tools/__init__.py 21 11 93
gptme/init.py 27 21 89
gptme/llm_anthropic.py 21 7 86
gptme/llm_openai.py 20 12 84
gptme/tools/browser.py 41 82 77
gptme/reduce.py 24 32 73
gptme/codeblock.py 13 10 64
tests/test_shell.py 21 19 63
tests/test_server.py 22 2 60
gptme/eval/execenv.py 10 14 55
gptme/eval/suites/basic.py 15 1 55
gptme/eval/suites/init_projects.py 21 1 55
scripts/describe_api.py 28 25 54
gptme/eval/agents.py 12 5 52
tests/test_tools_patch.py 31 87 48
tests/test_eval.py 8 9 47
gptme/tabcomplete.py 20 19 45
tests/test_message.py 7 17 39
tests/test_reduce.py 10 2 39
tests/test_codeblock.py 12 31 38
tests/test_util.py 28 51 38
gptme/tools/screenshot.py 11 6 36
scripts/list_user_messages.py 10 9 33
scripts/shorten_details.py 11 6 33
gptme/eval/filestore.py 5 2 32
gptme/eval/types.py 13 12 32
gptme/server/cli.py 8 5 27
gptme/tools/youtube.py 10 4 27
scripts/summarize_project.py 11 1 26
gptme/dirs.py 15 6 22
gptme/useredit.py 12 13 21
tests/test_tools_python.py 15 1 21
gptme/eval/suites/__init__.py 3 0 19
tests/test_tabcomplete.py 6 4 19
tests/test_browser.py 13 10 18
tests/test_logmanager.py 8 5 18
gptme/eval/suites/browser.py 5 0 16
tests/test_prompts.py 8 1 16
gptme/constants.py 4 12 14
gptme/tools/vision.py 5 1 13
tests/test_tools_chats.py 2 0 13
tests/test_tools_shell.py 9 11 13
gptme/tools/gh.py 10 24 11
tests/test_tools_subagent.py 7 10 11
gptme/tools/read.py 3 7 10
gptme/__init__.py 1 0 8
gptme/__version__.py 1 0 5
tests/test_config.py 2 0 5
gptme/eval/__init__.py 1 0 4
gptme/__main__.py 1 0 3
gptme/eval/__main__.py 1 0 3
gptme/server/__init__.py 2 3 3
gptme/server/__main__.py 1 0 3
-------------------------------------------------------------------------------------
SUM: 1688 1591 6202
-------------------------------------------------------------------------------------
make[2]: Leaving directory '/home/runner/work/gptme/gptme'