gibson-cli 0.7.7__tar.gz → 0.8.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (145) hide show
  1. {gibson_cli-0.7.7/gibson_cli.egg-info → gibson_cli-0.8.0}/PKG-INFO +47 -23
  2. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/README.md +22 -3
  3. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/bin/build.sh +1 -1
  4. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/api/BaseApi.py +24 -6
  5. gibson_cli-0.8.0/gibson/api/ProjectApi.py +46 -0
  6. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/command/Help.py +6 -2
  7. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/command/code/Entity.py +2 -2
  8. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/command/list/Projects.py +1 -1
  9. gibson_cli-0.8.0/gibson/command/mcp/McpServer.py +25 -0
  10. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/core/CommandRouter.py +3 -0
  11. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/core/Completions.py +2 -2
  12. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/core/Configuration.py +14 -0
  13. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/core/Conversation.py +2 -2
  14. gibson_cli-0.8.0/gibson/services/mcp/server.py +87 -0
  15. {gibson_cli-0.7.7 → gibson_cli-0.8.0/gibson_cli.egg-info}/PKG-INFO +47 -23
  16. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson_cli.egg-info/SOURCES.txt +4 -1
  17. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson_cli.egg-info/requires.txt +21 -16
  18. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/pyproject.toml +4 -4
  19. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/requirements.txt +21 -16
  20. gibson_cli-0.8.0/venv/bin/activate_this.py +59 -0
  21. gibson_cli-0.7.7/gibson/api/ProjectApi.py +0 -13
  22. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/.gitignore +0 -0
  23. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/.pre-commit-config.yaml +0 -0
  24. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/bin/clean.sh +0 -0
  25. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/bin/gibson +0 -0
  26. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/bin/release.sh +0 -0
  27. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/api/Cli.py +0 -0
  28. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/bin/gibson.py +0 -0
  29. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/command/BaseCommand.py +0 -0
  30. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/command/Build.py +0 -0
  31. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/command/Conf.py +0 -0
  32. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/command/Count.py +0 -0
  33. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/command/Dev.py +0 -0
  34. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/command/Forget.py +0 -0
  35. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/command/Merge.py +0 -0
  36. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/command/Modify.py +0 -0
  37. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/command/Question.py +0 -0
  38. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/command/Remove.py +0 -0
  39. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/command/Show.py +0 -0
  40. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/command/Tree.py +0 -0
  41. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/command/Version.py +0 -0
  42. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/command/auth/Auth.py +0 -0
  43. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/command/auth/Login.py +0 -0
  44. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/command/auth/Logout.py +0 -0
  45. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/command/code/Api.py +0 -0
  46. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/command/code/Base.py +0 -0
  47. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/command/code/Code.py +0 -0
  48. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/command/code/Model.py +0 -0
  49. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/command/code/Models.py +0 -0
  50. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/command/code/Schema.py +0 -0
  51. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/command/code/Schemas.py +0 -0
  52. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/command/code/Test.py +0 -0
  53. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/command/code/Tests.py +0 -0
  54. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/command/importer/Import.py +0 -0
  55. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/command/importer/OpenApi.py +0 -0
  56. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/command/list/Entities.py +0 -0
  57. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/command/list/List.py +0 -0
  58. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/command/new/Module.py +0 -0
  59. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/command/new/New.py +0 -0
  60. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/command/new/Project.py +0 -0
  61. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/command/rename/Entity.py +0 -0
  62. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/command/rename/Rename.py +0 -0
  63. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/command/rewrite/Rewrite.py +0 -0
  64. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/command/tests/test_command_BaseCommand.py +0 -0
  65. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/command/tests/test_command_Conf.py +0 -0
  66. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/conf/Api.py +0 -0
  67. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/conf/Code.py +0 -0
  68. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/conf/Custom.py +0 -0
  69. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/conf/Datastore.py +0 -0
  70. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/conf/Dependencies.py +0 -0
  71. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/conf/Dev.py +0 -0
  72. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/conf/Frameworks.py +0 -0
  73. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/conf/Modeler.py +0 -0
  74. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/conf/Paths.py +0 -0
  75. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/conf/Platform.py +0 -0
  76. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/conf/Project.py +0 -0
  77. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/conf/Version.py +0 -0
  78. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/conf/dev/Api.py +0 -0
  79. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/conf/dev/Base.py +0 -0
  80. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/conf/dev/Model.py +0 -0
  81. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/conf/dev/Schema.py +0 -0
  82. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/conf/tests/test_conf_Dependencies.py +0 -0
  83. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/conf/tests/test_conf_Platform.py +0 -0
  84. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/core/Colors.py +0 -0
  85. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/core/Diff.py +0 -0
  86. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/core/Env.py +0 -0
  87. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/core/Memory.py +0 -0
  88. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/core/PythonPath.py +0 -0
  89. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/core/Spinner.py +0 -0
  90. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/core/TimeKeeper.py +0 -0
  91. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/core/utils.py +0 -0
  92. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/data/bash-completion.tmpl +0 -0
  93. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/data/mysql/default-ref-table.tmpl +0 -0
  94. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/data/mysql/default-table.tmpl +0 -0
  95. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/data/postgresql/default-ref-table.tmpl +0 -0
  96. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/data/postgresql/default-table.tmpl +0 -0
  97. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/db/TableExceptions.py +0 -0
  98. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/db/tests/test_db_TableExceptions.py +0 -0
  99. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/dev/Dev.py +0 -0
  100. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/display/Header.py +0 -0
  101. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/display/WorkspaceFooter.py +0 -0
  102. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/display/WorkspaceHeader.py +0 -0
  103. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/display/tests/test_display_Header.py +0 -0
  104. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/display/tests/test_display_WorkspaceFooter.py +0 -0
  105. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/display/tests/test_display_WorkspaceHeader.py +0 -0
  106. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/lang/Python.py +0 -0
  107. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/lang/tests/test_lang_Python.py +0 -0
  108. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/services/auth/Server.py +0 -0
  109. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/services/code/context/schema/DataDictionary.py +0 -0
  110. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/services/code/context/schema/EntityKeys.py +0 -0
  111. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/services/code/context/schema/Manager.py +0 -0
  112. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/services/code/context/schema/tests/test_code_context_schema_DataDictionary.py +0 -0
  113. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/services/code/context/schema/tests/test_code_context_schema_EntityKeys.py +0 -0
  114. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/services/code/context/schema/tests/test_code_context_schema_Manager.py +0 -0
  115. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/services/code/customization/Authenticator.py +0 -0
  116. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/services/code/customization/BaseCustomization.py +0 -0
  117. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/services/code/customization/CustomizationManager.py +0 -0
  118. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/services/code/customization/Index.py +0 -0
  119. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/services/code/customization/tests/test_code_customization_Authenticator.py +0 -0
  120. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/services/code/customization/tests/test_code_customization_BaseCustomization.py +0 -0
  121. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/structure/Entity.py +0 -0
  122. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/structure/mysql/Entity.py +0 -0
  123. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/structure/mysql/constraints/ReferenceConstraint.py +0 -0
  124. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/structure/mysql/keys/ForeignKey.py +0 -0
  125. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/structure/mysql/keys/Index.py +0 -0
  126. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/structure/mysql/keys/IndexAttribute.py +0 -0
  127. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/structure/mysql/keys/tests/test_structure_mysql_keys_ForeignKey.py +0 -0
  128. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/structure/mysql/keys/tests/test_structure_mysql_keys_Index.py +0 -0
  129. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/structure/mysql/keys/tests/test_structure_mysql_keys_IndexAttribute.py +0 -0
  130. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/structure/mysql/testing.py +0 -0
  131. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/structure/mysql/tests/test_structure_mysql_Entity.py +0 -0
  132. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/structure/postgresql/Entity.py +0 -0
  133. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/structure/postgresql/References.py +0 -0
  134. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/structure/postgresql/table/ForeignKey.py +0 -0
  135. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/structure/postgresql/table/tests/test_structure_postgresql_table_ForeignKey.py +0 -0
  136. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/structure/postgresql/testing.py +0 -0
  137. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/structure/postgresql/tests/test_structure_postgresql_Entity.py +0 -0
  138. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/structure/tests/test_structure_Entity.py +0 -0
  139. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/tests/test_Env.py +0 -0
  140. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/tests/test_Memory.py +0 -0
  141. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson/tests/test_utils.py +0 -0
  142. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson_cli.egg-info/dependency_links.txt +0 -0
  143. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson_cli.egg-info/entry_points.txt +0 -0
  144. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/gibson_cli.egg-info/top_level.txt +0 -0
  145. {gibson_cli-0.7.7 → gibson_cli-0.8.0}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: gibson-cli
3
- Version: 0.7.7
3
+ Version: 0.8.0
4
4
  Summary: Gibson Command Line Interface
5
5
  Author-email: GibsonAI <noc@gibsonai.com>
6
6
  Project-URL: Homepage, https://gibsonai.com/
@@ -11,55 +11,60 @@ Project-URL: Changelog, https://github.com/gibsonai/cli/releases
11
11
  Classifier: Operating System :: OS Independent
12
12
  Classifier: Development Status :: 4 - Beta
13
13
  Classifier: Intended Audience :: Developers
14
- Classifier: Programming Language :: Python :: 3.9
15
- Requires-Python: >=3.9
14
+ Classifier: Programming Language :: Python :: 3.10
15
+ Requires-Python: >=3.10
16
16
  Description-Content-Type: text/markdown
17
17
  Requires-Dist: annotated-types==0.6.0
18
- Requires-Dist: anyio==4.3.0
18
+ Requires-Dist: anyio==4.9.0
19
19
  Requires-Dist: certifi==2024.2.2
20
20
  Requires-Dist: charset-normalizer==3.3.2
21
21
  Requires-Dist: click==8.1.7
22
22
  Requires-Dist: dnspython==2.6.1
23
- Requires-Dist: email_validator==2.1.1
23
+ Requires-Dist: email-validator==2.1.1
24
24
  Requires-Dist: exceptiongroup==1.2.0
25
- Requires-Dist: Faker==24.0.0
26
- Requires-Dist: faker_sqlalchemy==0.10.2208140
27
- Requires-Dist: fastapi==0.111.0
25
+ Requires-Dist: faker==24.0.0
26
+ Requires-Dist: faker-sqlalchemy==0.10.2208140
27
+ Requires-Dist: fastapi==0.115.12
28
28
  Requires-Dist: fastapi-cli==0.0.2
29
29
  Requires-Dist: h11==0.14.0
30
30
  Requires-Dist: httpcore==1.0.5
31
31
  Requires-Dist: httptools==0.6.1
32
32
  Requires-Dist: httpx==0.27.0
33
+ Requires-Dist: httpx-sse==0.4.0
33
34
  Requires-Dist: idna==3.6
34
35
  Requires-Dist: iniconfig==2.0.0
35
- Requires-Dist: Jinja2==3.1.4
36
+ Requires-Dist: jinja2==3.1.4
36
37
  Requires-Dist: markdown-it-py==3.0.0
37
- Requires-Dist: MarkupSafe==2.1.5
38
+ Requires-Dist: markupsafe==2.1.5
39
+ Requires-Dist: mcp==1.6.0
38
40
  Requires-Dist: mdurl==0.1.2
39
41
  Requires-Dist: orjson==3.10.3
40
- Requires-Dist: packaging==23.2
42
+ Requires-Dist: packaging==24.2
41
43
  Requires-Dist: pluggy==1.4.0
42
- Requires-Dist: pydantic==2.6.1
43
- Requires-Dist: pydantic_core==2.16.2
44
+ Requires-Dist: pydantic==2.11.0
45
+ Requires-Dist: pydantic-core==2.33.0
46
+ Requires-Dist: pydantic-settings==2.8.1
44
47
  Requires-Dist: pyfiglet==1.0.2
45
- Requires-Dist: Pygments==2.18.0
46
- Requires-Dist: PyMySQL==1.1.0
48
+ Requires-Dist: pygments==2.18.0
49
+ Requires-Dist: pymysql==1.1.0
47
50
  Requires-Dist: pytest==8.0.1
48
51
  Requires-Dist: python-dateutil==2.9.0.post0
49
52
  Requires-Dist: python-dotenv==1.0.1
50
53
  Requires-Dist: python-multipart==0.0.9
51
- Requires-Dist: PyYAML==6.0.1
54
+ Requires-Dist: pyyaml==6.0.1
52
55
  Requires-Dist: requests==2.31.0
53
56
  Requires-Dist: rich==13.9.2
54
57
  Requires-Dist: shellingham==1.5.4
55
58
  Requires-Dist: six==1.16.0
56
59
  Requires-Dist: sniffio==1.3.1
57
- Requires-Dist: SQLAlchemy==1.4.41
58
- Requires-Dist: starlette==0.37.2
60
+ Requires-Dist: sqlalchemy==1.4.41
61
+ Requires-Dist: sse-starlette==2.2.1
62
+ Requires-Dist: starlette==0.46.1
59
63
  Requires-Dist: textual==0.83.0
60
64
  Requires-Dist: tomli==2.0.1
61
65
  Requires-Dist: typer==0.12.3
62
- Requires-Dist: typing_extensions==4.9.0
66
+ Requires-Dist: typing-extensions==4.13.0
67
+ Requires-Dist: typing-inspection==0.4.0
63
68
  Requires-Dist: ujson==5.9.0
64
69
  Requires-Dist: urllib3==1.26.6
65
70
  Requires-Dist: uvicorn==0.29.0
@@ -74,12 +79,12 @@ Requires-Dist: yaspin==3.1.0
74
79
  # Gibson CLI
75
80
 
76
81
  [![PyPI - Version](https://img.shields.io/pypi/v/gibson-cli)](https://pypi.org/project/gibson-cli/)
77
- ![Python 3.9+](https://img.shields.io/badge/Python-3.9%2B-blue)
82
+ ![Python 3.10+](https://img.shields.io/badge/Python-3.10%2B-blue)
78
83
  [![Docs](https://img.shields.io/badge/Docs-https://docs.gibsonai.com-green)](https://docs.gibsonai.com)
79
84
 
80
85
  ## Prerequisites
81
86
 
82
- Gibson currently works on projects that use Python 3.9 or greater, MySQL, SQLAlchemy, Pydantic, Alembic, FastAPI and pytest. It is capable of building a complete application, from database to API end points, using these frameworks. Future enhancements of Gibson will include support for more languages and frameworks.
87
+ Gibson currently works on projects that use Python 3.10 or greater, MySQL, SQLAlchemy, Pydantic, Alembic, FastAPI and pytest. It is capable of building a complete application, from database to API end points, using these frameworks. Future enhancements of Gibson will include support for more languages and frameworks.
83
88
 
84
89
  Portions of the Gibson backend code are written by Gibson. So far, versus a human developer, it has coded 66% of the software and did so in seconds. To get started, read the instructions here.
85
90
 
@@ -191,7 +196,7 @@ All of Gibson's configuration files and caches are stored in `$HOME/.gibson`. Us
191
196
 
192
197
  ## Currently Supported Software
193
198
 
194
- - Python 3.9 or greater
199
+ - Python 3.10 or greater
195
200
  - MySQL
196
201
  - SQLAlchemy
197
202
  - Pydantic
@@ -375,6 +380,25 @@ At the moment, just refer to the base-level schema directly.
375
380
  - e.g. `gibson q add nickname to sql://user`
376
381
  - `gibson code model user`
377
382
 
383
+ ### Setting up the MCP server with Cursor
384
+
385
+ Head over to `Cursor Settings` > `MCP` and click `Add new MCP server`
386
+
387
+ Update the configuration to look like the following:
388
+
389
+ ```json
390
+ {
391
+ "mcpServers": {
392
+ "gibson": {
393
+ "command": "gibson",
394
+ "args": ["mcp", "run"]
395
+ }
396
+ }
397
+ }
398
+ ```
399
+
400
+ That's it! Just make sure you're logged in to the CLI (if you're reading this, you've likely already run `gibson auth login`) and then Cursor's agents will have access to the Gibson MCP server to create + update projects on your behalf, explain how to interact with the database + hosted APIs, and even write working code for you.
401
+
378
402
  ## Contributing
379
403
 
380
404
  - Clone this repository somewhere in your file system
@@ -4,12 +4,12 @@
4
4
  # Gibson CLI
5
5
 
6
6
  [![PyPI - Version](https://img.shields.io/pypi/v/gibson-cli)](https://pypi.org/project/gibson-cli/)
7
- ![Python 3.9+](https://img.shields.io/badge/Python-3.9%2B-blue)
7
+ ![Python 3.10+](https://img.shields.io/badge/Python-3.10%2B-blue)
8
8
  [![Docs](https://img.shields.io/badge/Docs-https://docs.gibsonai.com-green)](https://docs.gibsonai.com)
9
9
 
10
10
  ## Prerequisites
11
11
 
12
- Gibson currently works on projects that use Python 3.9 or greater, MySQL, SQLAlchemy, Pydantic, Alembic, FastAPI and pytest. It is capable of building a complete application, from database to API end points, using these frameworks. Future enhancements of Gibson will include support for more languages and frameworks.
12
+ Gibson currently works on projects that use Python 3.10 or greater, MySQL, SQLAlchemy, Pydantic, Alembic, FastAPI and pytest. It is capable of building a complete application, from database to API end points, using these frameworks. Future enhancements of Gibson will include support for more languages and frameworks.
13
13
 
14
14
  Portions of the Gibson backend code are written by Gibson. So far, versus a human developer, it has coded 66% of the software and did so in seconds. To get started, read the instructions here.
15
15
 
@@ -121,7 +121,7 @@ All of Gibson's configuration files and caches are stored in `$HOME/.gibson`. Us
121
121
 
122
122
  ## Currently Supported Software
123
123
 
124
- - Python 3.9 or greater
124
+ - Python 3.10 or greater
125
125
  - MySQL
126
126
  - SQLAlchemy
127
127
  - Pydantic
@@ -305,6 +305,25 @@ At the moment, just refer to the base-level schema directly.
305
305
  - e.g. `gibson q add nickname to sql://user`
306
306
  - `gibson code model user`
307
307
 
308
+ ### Setting up the MCP server with Cursor
309
+
310
+ Head over to `Cursor Settings` > `MCP` and click `Add new MCP server`
311
+
312
+ Update the configuration to look like the following:
313
+
314
+ ```json
315
+ {
316
+ "mcpServers": {
317
+ "gibson": {
318
+ "command": "gibson",
319
+ "args": ["mcp", "run"]
320
+ }
321
+ }
322
+ }
323
+ ```
324
+
325
+ That's it! Just make sure you're logged in to the CLI (if you're reading this, you've likely already run `gibson auth login`) and then Cursor's agents will have access to the Gibson MCP server to create + update projects on your behalf, explain how to interact with the database + hosted APIs, and even write working code for you.
326
+
308
327
  ## Contributing
309
328
 
310
329
  - Clone this repository somewhere in your file system
@@ -1,2 +1,2 @@
1
1
  rm -rf dist gibson_cli.egg-info
2
- python3 -m build
2
+ PYTHONMEM=1G python3 -m build
@@ -1,4 +1,3 @@
1
- import os
2
1
  import pprint
3
2
 
4
3
  import requests
@@ -16,6 +15,16 @@ class BaseApi:
16
15
  def base_url(self):
17
16
  return f"{self.configuration.api_domain()}/{self.VERSION}"
18
17
 
18
+ def delete(self, endpoint):
19
+ r = requests.delete(self.url(endpoint), headers=self.headers())
20
+
21
+ if r.status_code == 401 and self.refresh_auth_tokens():
22
+ r = requests.delete(self.url(endpoint), headers=self.headers())
23
+
24
+ self.__raise_for_status(r)
25
+
26
+ return r
27
+
19
28
  def get(self, endpoint):
20
29
  r = requests.get(self.url(endpoint), headers=self.headers())
21
30
 
@@ -37,7 +46,17 @@ class BaseApi:
37
46
 
38
47
  return headers
39
48
 
40
- def post(self, endpoint, json: dict):
49
+ def patch(self, endpoint, json: dict):
50
+ r = requests.patch(self.url(endpoint), headers=self.headers(), json=json)
51
+
52
+ if r.status_code == 401 and self.refresh_auth_tokens():
53
+ r = requests.patch(self.url(endpoint), headers=self.headers(), json=json)
54
+
55
+ self.__raise_for_status(r)
56
+
57
+ return r
58
+
59
+ def post(self, endpoint: str = "", json: dict = None):
41
60
  r = requests.post(self.url(endpoint), headers=self.headers(), json=json)
42
61
 
43
62
  if r.status_code == 401 and self.refresh_auth_tokens():
@@ -78,10 +97,9 @@ class BaseApi:
78
97
  )
79
98
  return True
80
99
 
81
- def url(self, endpoint):
82
- if self.PREFIX:
83
- return f"{self.base_url()}/{self.PREFIX}/{endpoint}"
84
- return f"{self.base_url()}/{endpoint}"
100
+ def url(self, endpoint: str):
101
+ base = f"{self.base_url()}/{self.PREFIX}" if self.PREFIX else self.base_url()
102
+ return f"{base}/{endpoint}" if endpoint else base
85
103
 
86
104
  def __raise_for_status(self, r):
87
105
  if r.status_code == 401:
@@ -0,0 +1,46 @@
1
+ from gibson.api.BaseApi import BaseApi
2
+ from gibson.core.Configuration import Configuration
3
+
4
+
5
+ class ProjectApi(BaseApi):
6
+ PREFIX = "project"
7
+
8
+ def __init__(self, configuration: Configuration):
9
+ self.configuration = configuration
10
+ self.configuration.require_login()
11
+
12
+ def list(self):
13
+ return self.get("all")["projects"]
14
+
15
+ def create(self):
16
+ return self.post().json()
17
+
18
+ def database_schema(self, uuid: str):
19
+ return self.get(f"{uuid}/schema/deployed")
20
+
21
+ def lookup(self, uuid: str):
22
+ return self.get(f"{uuid}")
23
+
24
+ def deploy(self, uuid: str):
25
+ return self.post(f"{uuid}/deploy")
26
+
27
+ def mcp(self, uuid: str):
28
+ return self.get(f"{uuid}/mcp")
29
+
30
+ def schema(self, uuid: str):
31
+ return self.get(f"{uuid}/schema")
32
+
33
+ def structure(self, uuid: str):
34
+ return self.get(f"{uuid}/structure")
35
+
36
+ def submit_message(self, uuid: str, message: str):
37
+ if not message:
38
+ raise ValueError("Message is required")
39
+
40
+ return self.post(f"{uuid}/conversation", {"content": message}).json()
41
+
42
+ def update(self, uuid: str, name: str):
43
+ if not name:
44
+ raise ValueError("Name is required")
45
+
46
+ return self.put(f"{uuid}", {"name": name}).json()
@@ -3,7 +3,6 @@ from rich.console import Console
3
3
  from rich.table import Table
4
4
  from rich.text import Text
5
5
 
6
- import gibson.core.Colors as Colors
7
6
  from gibson.command.BaseCommand import BaseCommand
8
7
  from gibson.core.Memory import Memory
9
8
 
@@ -57,7 +56,7 @@ class Help(BaseCommand):
57
56
  "memory": None,
58
57
  },
59
58
  "forget": {
60
- "description": f"delete entities from memory",
59
+ "description": "delete entities from memory",
61
60
  "subcommands": ["all", "last", "stored"],
62
61
  "memory": "based on user selection",
63
62
  },
@@ -72,6 +71,11 @@ class Help(BaseCommand):
72
71
  "subcommands": ["entities", "projects"],
73
72
  "memory": None,
74
73
  },
74
+ "mcp": {
75
+ "description": "allows tools like Cursor to interact with your gibson project",
76
+ "subcommands": ["run"],
77
+ "memory": None,
78
+ },
75
79
  "merge": {
76
80
  "description": "merge last memory (recent changes) into stored project memory",
77
81
  "subcommands": None,
@@ -186,10 +186,10 @@ class Entity(BaseCommand):
186
186
 
187
187
  def __render_workspace(
188
188
  self,
189
- original_entity: StructureEntity | None,
189
+ original_entity: StructureEntity,
190
190
  entity: StructureEntity,
191
191
  model_name: str,
192
- original_model_code: str | None,
192
+ original_model_code: str,
193
193
  model_code: str,
194
194
  ):
195
195
  self.configuration.platform.cmd_clear()
@@ -13,7 +13,7 @@ class Projects(BaseCommand):
13
13
  self.configuration.require_login()
14
14
 
15
15
  with DisappearingSpinner():
16
- projects = ProjectApi(self.configuration).all_projects()
16
+ projects = ProjectApi(self.configuration).list()
17
17
 
18
18
  if len(projects) == 0:
19
19
  self.conversation.type(
@@ -0,0 +1,25 @@
1
+ import signal
2
+ import sys
3
+
4
+ import gibson.core.Colors as Colors
5
+ from gibson.command.BaseCommand import BaseCommand
6
+ from gibson.services.mcp.server import mcp
7
+
8
+
9
+ class McpServer(BaseCommand):
10
+ def execute(self):
11
+ if len(sys.argv) == 3 and sys.argv[2] == "run":
12
+ # Setup signal handlers to exit the server
13
+ signal.signal(signal.SIGTERM, lambda signo, frame: sys.exit(0))
14
+ signal.signal(signal.SIGINT, lambda signo, frame: sys.exit(0))
15
+ mcp.run()
16
+ else:
17
+ self.usage()
18
+
19
+ def usage(self):
20
+ self.configuration.display_project()
21
+ self.conversation.type(
22
+ f"usage: {Colors.command(self.configuration.command, 'mcp', args='run', hint='run the mcp server')}\n"
23
+ )
24
+ self.conversation.newline()
25
+ exit(1)
@@ -10,6 +10,7 @@ from gibson.command.Forget import Forget
10
10
  from gibson.command.Help import Help
11
11
  from gibson.command.importer.Import import Import
12
12
  from gibson.command.list.List import List
13
+ from gibson.command.mcp.McpServer import McpServer
13
14
  from gibson.command.Merge import Merge
14
15
  from gibson.command.Modify import Modify
15
16
  from gibson.command.new.New import New
@@ -58,6 +59,8 @@ class CommandRouter:
58
59
  command = Import(self.configuration)
59
60
  elif sys.argv[1] == "list":
60
61
  command = List(self.configuration)
62
+ elif sys.argv[1] == "mcp":
63
+ command = McpServer(self.configuration)
61
64
  elif sys.argv[1] == "merge":
62
65
  command = Merge(self.configuration)
63
66
  elif sys.argv[1] == "modify":
@@ -8,7 +8,7 @@ class Completions:
8
8
  self.file_name = "bash_completion"
9
9
 
10
10
  def install(self):
11
- completions_location = f"$HOME/{self.gibson_config}/{self.file_name}"
11
+ completions_location = f"{self.user_home}/{self.gibson_config}/{self.file_name}"
12
12
  installation = f"""\n[ -s "{completions_location}" ] && \\. "{completions_location}" # Load gibson auto completion\n"""
13
13
 
14
14
  for file in [f"{self.user_home}/.bashrc", f"{self.user_home}/.zshrc"]:
@@ -21,7 +21,7 @@ class Completions:
21
21
 
22
22
  def write(self):
23
23
  try:
24
- file = os.path.dirname(__file__) + f"/../data/bash-completion.tmpl"
24
+ file = os.path.dirname(__file__) + "/../data/bash-completion.tmpl"
25
25
  with open(file, "r") as f:
26
26
  contents = f.read()
27
27
  except FileNotFoundError:
@@ -235,6 +235,10 @@ class Configuration:
235
235
  self.require_project()
236
236
  return self.settings[self.project.name]
237
237
 
238
+ def get_project_id(self):
239
+ self.require_project()
240
+ return self.project.id
241
+
238
242
  def get_refresh_token(self):
239
243
  try:
240
244
  with open(f"{self.paths.auth}/{self.API_ENV}", "r") as f:
@@ -329,6 +333,16 @@ class Configuration:
329
333
 
330
334
  return self
331
335
 
336
+ def require_project_id(self) -> str:
337
+ project_id = self.get_project_id()
338
+ if not project_id:
339
+ self.conversation.type(
340
+ "A valid project ID is required to perform this action. Please ensure the project ID is set in your configuration.\n"
341
+ )
342
+ exit(1)
343
+
344
+ return project_id
345
+
332
346
  def require_project_key_or_id(self):
333
347
  if self.project.id:
334
348
  return self
@@ -105,7 +105,7 @@ class Conversation:
105
105
 
106
106
  def message_customize_settings(self):
107
107
  self.type(
108
- f"You can edit the configuration file directly or ask me to do it for you.\n"
108
+ "You can edit the configuration file directly or ask me to do it for you.\n"
109
109
  )
110
110
  self.type(
111
111
  "I will not be able to do much until you modify api::key and "
@@ -220,7 +220,7 @@ class Conversation:
220
220
 
221
221
  def project_api_key_not_set(self, configuration):
222
222
  self.type(
223
- f"\nYou have not set the API key for your project. Please set the API key by executing:\n"
223
+ "\nYou have not set the API key for your project. Please set the API key by executing:\n"
224
224
  )
225
225
  self.newline()
226
226
  self.type(
@@ -0,0 +1,87 @@
1
+ from typing import Dict, List
2
+
3
+ from mcp.server.fastmcp import FastMCP
4
+
5
+ from gibson.api.ProjectApi import ProjectApi
6
+ from gibson.core.Configuration import Configuration
7
+
8
+ mcp = FastMCP("GibsonAI")
9
+
10
+ project_api = ProjectApi(Configuration())
11
+
12
+ # Note: Resources are not yet supported by Cursor, everything must be implemented as a tool
13
+ # See https://docs.cursor.com/context/model-context-protocol#limitations
14
+
15
+
16
+ @mcp.tool()
17
+ def get_projects() -> List[Dict]:
18
+ """Get all GibsonAI projects"""
19
+ return project_api.list()
20
+
21
+
22
+ @mcp.tool()
23
+ def create_project() -> Dict:
24
+ """Create a new GibsonAI project"""
25
+ return project_api.create()
26
+
27
+
28
+ @mcp.tool()
29
+ def get_project_details(uuid: str) -> Dict:
30
+ """Get a GibsonAI project's details"""
31
+ return project_api.lookup(uuid=uuid)
32
+
33
+
34
+ @mcp.tool()
35
+ def get_project_hosted_api_details(uuid: str) -> str:
36
+ """
37
+ Get a GibsonAI project's hosted API details
38
+ This includes necessary context for an LLM to understand and generate API calls related to fetching or modifying the project's data
39
+ """
40
+ return project_api.mcp(uuid=uuid)
41
+
42
+
43
+ @mcp.tool()
44
+ def update_project(uuid: str, project_name: str) -> Dict:
45
+ """
46
+ Update a GibsonAI project's details
47
+ This currently only updates the project's name
48
+ Returns the updated project details
49
+ """
50
+ return project_api.update(uuid=uuid, name=project_name)
51
+
52
+
53
+ @mcp.tool()
54
+ def submit_data_modeling_request(uuid: str, data_modeling_request: str) -> Dict:
55
+ """
56
+ Submit a data modeling request for a GibsonAI project
57
+ This tool fully handles all data modeling, you should provide the user's request as-is
58
+ Returns the response from the LLM
59
+ """
60
+ return project_api.submit_message(uuid=uuid, message=data_modeling_request)
61
+
62
+
63
+ @mcp.tool()
64
+ def deploy_project(uuid: str) -> None:
65
+ """
66
+ Deploy a GibsonAI project's hosted databases
67
+ This deploys both the development and production databases simultaneously and automatically handles the migrations
68
+ """
69
+ project_api.deploy(uuid=uuid)
70
+
71
+
72
+ @mcp.tool()
73
+ def get_project_schema(uuid: str) -> str:
74
+ """
75
+ Get the schema for a GibsonAI project
76
+ This includes any changes made to the schema since the last deployment
77
+ """
78
+ return project_api.schema(uuid=uuid)
79
+
80
+
81
+ @mcp.tool()
82
+ def get_deployed_schema(uuid: str) -> str:
83
+ """
84
+ Get the deployed schema for a GibsonAI project
85
+ This is the schema that is currently live on the project's hosted databases
86
+ """
87
+ return project_api.database_schema(uuid=uuid)