gibson-cli 0.3.0__tar.gz → 0.3.2__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 (119) hide show
  1. {gibson_cli-0.3.0/gibson_cli.egg-info → gibson_cli-0.3.2}/PKG-INFO +10 -10
  2. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/README.md +9 -9
  3. gibson_cli-0.3.2/gibson/command/Version.py +32 -0
  4. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/core/Colors.py +4 -0
  5. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/core/Configuration.py +3 -6
  6. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/core/Memory.py +2 -2
  7. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/services/auth/Server.py +5 -9
  8. {gibson_cli-0.3.0 → gibson_cli-0.3.2/gibson_cli.egg-info}/PKG-INFO +10 -10
  9. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/pyproject.toml +1 -1
  10. gibson_cli-0.3.0/gibson/command/Version.py +0 -9
  11. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/.gitignore +0 -0
  12. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/.pre-commit-config.yaml +0 -0
  13. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/bin/build.sh +0 -0
  14. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/bin/release.sh +0 -0
  15. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/api/BaseApi.py +0 -0
  16. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/api/Cli.py +0 -0
  17. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/bin/gibson.py +0 -0
  18. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/command/BaseCommand.py +0 -0
  19. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/command/Build.py +0 -0
  20. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/command/Code.py +0 -0
  21. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/command/Conf.py +0 -0
  22. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/command/Count.py +0 -0
  23. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/command/Dev.py +0 -0
  24. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/command/Forget.py +0 -0
  25. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/command/Import.py +0 -0
  26. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/command/List.py +0 -0
  27. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/command/Merge.py +0 -0
  28. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/command/Model.py +0 -0
  29. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/command/Modify.py +0 -0
  30. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/command/Module.py +0 -0
  31. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/command/New.py +0 -0
  32. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/command/OpenApi.py +0 -0
  33. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/command/Question.py +0 -0
  34. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/command/Remove.py +0 -0
  35. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/command/Rename.py +0 -0
  36. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/command/Schema.py +0 -0
  37. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/command/Show.py +0 -0
  38. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/command/Test.py +0 -0
  39. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/command/Tree.py +0 -0
  40. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/command/WarGames.py +0 -0
  41. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/command/auth/Auth.py +0 -0
  42. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/command/auth/Login.py +0 -0
  43. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/command/auth/Logout.py +0 -0
  44. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/command/rewrite/Api.py +0 -0
  45. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/command/rewrite/Base.py +0 -0
  46. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/command/rewrite/Models.py +0 -0
  47. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/command/rewrite/Rewrite.py +0 -0
  48. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/command/rewrite/Schemas.py +0 -0
  49. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/command/rewrite/Tests.py +0 -0
  50. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/command/tests/test_command_BaseCommand.py +0 -0
  51. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/command/tests/test_command_Conf.py +0 -0
  52. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/conf/Api.py +0 -0
  53. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/conf/Code.py +0 -0
  54. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/conf/Custom.py +0 -0
  55. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/conf/Datastore.py +0 -0
  56. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/conf/Dependencies.py +0 -0
  57. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/conf/Dev.py +0 -0
  58. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/conf/Frameworks.py +0 -0
  59. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/conf/Modeler.py +0 -0
  60. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/conf/Paths.py +0 -0
  61. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/conf/Platform.py +0 -0
  62. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/conf/Project.py +0 -0
  63. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/conf/Version.py +0 -0
  64. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/conf/dev/Api.py +0 -0
  65. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/conf/dev/Base.py +0 -0
  66. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/conf/dev/Model.py +0 -0
  67. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/conf/dev/Schema.py +0 -0
  68. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/conf/tests/test_conf_Dependencies.py +0 -0
  69. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/conf/tests/test_conf_Platform.py +0 -0
  70. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/core/CommandRouter.py +0 -0
  71. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/core/Completions.py +0 -0
  72. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/core/Conversation.py +0 -0
  73. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/core/Env.py +0 -0
  74. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/core/TimeKeeper.py +0 -0
  75. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/core/utils.py +0 -0
  76. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/data/bash-completion.tmpl +0 -0
  77. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/data/default-ref-table.tmpl +0 -0
  78. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/data/default-table.tmpl +0 -0
  79. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/db/TableExceptions.py +0 -0
  80. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/db/tests/test_db_TableExceptions.py +0 -0
  81. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/dev/Dev.py +0 -0
  82. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/display/Header.py +0 -0
  83. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/display/WorkspaceFooter.py +0 -0
  84. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/display/WorkspaceHeader.py +0 -0
  85. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/display/tests/test_display_Header.py +0 -0
  86. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/display/tests/test_display_WorkspaceFooter.py +0 -0
  87. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/display/tests/test_display_WorkspaceHeader.py +0 -0
  88. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/lang/Python.py +0 -0
  89. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/lang/tests/test_lang_Python.py +0 -0
  90. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/services/code/context/schema/DataDictionary.py +0 -0
  91. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/services/code/context/schema/EntityKeys.py +0 -0
  92. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/services/code/context/schema/Manager.py +0 -0
  93. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/services/code/context/schema/tests/test_code_context_schema_DataDictionary.py +0 -0
  94. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/services/code/context/schema/tests/test_code_context_schema_EntityKeys.py +0 -0
  95. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/services/code/context/schema/tests/test_code_context_schema_Manager.py +0 -0
  96. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/services/code/customization/Authenticator.py +0 -0
  97. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/services/code/customization/BaseCustomization.py +0 -0
  98. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/services/code/customization/CustomizationManager.py +0 -0
  99. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/services/code/customization/tests/test_code_customization_Authenticator.py +0 -0
  100. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/services/code/customization/tests/test_code_customization_BaseCustomization.py +0 -0
  101. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/structure/Entity.py +0 -0
  102. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/structure/constraints/ReferenceConstraint.py +0 -0
  103. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/structure/keys/ForeignKey.py +0 -0
  104. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/structure/keys/Index.py +0 -0
  105. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/structure/keys/IndexAttribute.py +0 -0
  106. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/structure/keys/tests/test_ForeignKey.py +0 -0
  107. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/structure/keys/tests/test_Index.py +0 -0
  108. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/structure/keys/tests/test_IndexAttribute.py +0 -0
  109. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/structure/testing.py +0 -0
  110. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/structure/tests/test_Entity.py +0 -0
  111. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/tests/test_Env.py +0 -0
  112. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/tests/test_Memory.py +0 -0
  113. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson/tests/test_utils.py +0 -0
  114. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson_cli.egg-info/SOURCES.txt +0 -0
  115. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson_cli.egg-info/dependency_links.txt +0 -0
  116. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson_cli.egg-info/entry_points.txt +0 -0
  117. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/gibson_cli.egg-info/top_level.txt +0 -0
  118. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/requirements.txt +0 -0
  119. {gibson_cli-0.3.0 → gibson_cli-0.3.2}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: gibson-cli
3
- Version: 0.3.0
3
+ Version: 0.3.2
4
4
  Summary: Gibson Command Line Interface
5
5
  Author-email: GibsonAI <noc@gibsonai.com>
6
6
  Project-URL: Homepage, https://gibsonai.com/
@@ -67,7 +67,7 @@ Let's consider a more concrete example. You imported your datastore into the CLI
67
67
 
68
68
  So Gibson creates a new version of the user table containing a nickname column. This new table is stored in last memory. If you execute:
69
69
 
70
- `gibson models`
70
+ `gibson rewrite models`
71
71
 
72
72
  The CLI will write the code for what is sitting in last memory.
73
73
 
@@ -123,8 +123,8 @@ All of Gibson's configuration files and caches are stored in `$HOME/.gibson`. Us
123
123
  - `:command! -nargs=* Gibson r ! gibson <args>`
124
124
  - Open a file and execute commands:
125
125
  - `:Gibson module abc`
126
- - `:Gibson models`
127
- - `:Gibson schemas`
126
+ - `:Gibson rewrite models`
127
+ - `:Gibson rewrite schemas`
128
128
 
129
129
  ## Currently Supported Software
130
130
 
@@ -200,7 +200,7 @@ For example, you might provide class name = `MyBaseModel` and import path = `pro
200
200
 
201
201
  ### Writing the Base Code
202
202
 
203
- `gibson base`
203
+ `gibson rewrite base`
204
204
 
205
205
  ### Writing the Code for a Single Model
206
206
 
@@ -212,20 +212,20 @@ For example, you might provide class name = `MyBaseModel` and import path = `pro
212
212
 
213
213
  ### Writing the Code for All Models
214
214
 
215
- `gibson models`
215
+ `gibson rewrite models`
216
216
 
217
217
  ### Writing the Code for All Schemas
218
218
 
219
- `gibson schemas`
219
+ `gibson rewrite schemas`
220
220
 
221
221
  ### Adding a New Module to the Software Using AI
222
222
 
223
223
  - gibson module [module name]
224
224
  - e.g. gibson module user
225
225
  - Gibson will display the SQL tables it has generated as a result of your request. It will store these entities in its last memory.
226
- - gibson models
226
+ - `gibson rewrite models`
227
227
  - This will write the code for the entities it just created.
228
- - gibson merge
228
+ - `gibson merge`
229
229
  - This will merge the new entities into your project.
230
230
  - Note, at the moment Gibson does not build the tables into your datastore.
231
231
 
@@ -234,7 +234,7 @@ For example, you might provide class name = `MyBaseModel` and import path = `pro
234
234
  - `gibson modify [table name] [natural language request]`
235
235
  - e.g. `gibson modify my_table I want to add a new column called name and remove all of the columns related to email`
236
236
  - Gibson will display the modified SQL table and store it in its last memory.
237
- - `gibson models`
237
+ - `gibson rewrite models`
238
238
  - This will write the code for the modified entity.
239
239
  - `gibson merge`
240
240
  - This will merge the modified entity into your project.
@@ -50,7 +50,7 @@ Let's consider a more concrete example. You imported your datastore into the CLI
50
50
 
51
51
  So Gibson creates a new version of the user table containing a nickname column. This new table is stored in last memory. If you execute:
52
52
 
53
- `gibson models`
53
+ `gibson rewrite models`
54
54
 
55
55
  The CLI will write the code for what is sitting in last memory.
56
56
 
@@ -106,8 +106,8 @@ All of Gibson's configuration files and caches are stored in `$HOME/.gibson`. Us
106
106
  - `:command! -nargs=* Gibson r ! gibson <args>`
107
107
  - Open a file and execute commands:
108
108
  - `:Gibson module abc`
109
- - `:Gibson models`
110
- - `:Gibson schemas`
109
+ - `:Gibson rewrite models`
110
+ - `:Gibson rewrite schemas`
111
111
 
112
112
  ## Currently Supported Software
113
113
 
@@ -183,7 +183,7 @@ For example, you might provide class name = `MyBaseModel` and import path = `pro
183
183
 
184
184
  ### Writing the Base Code
185
185
 
186
- `gibson base`
186
+ `gibson rewrite base`
187
187
 
188
188
  ### Writing the Code for a Single Model
189
189
 
@@ -195,20 +195,20 @@ For example, you might provide class name = `MyBaseModel` and import path = `pro
195
195
 
196
196
  ### Writing the Code for All Models
197
197
 
198
- `gibson models`
198
+ `gibson rewrite models`
199
199
 
200
200
  ### Writing the Code for All Schemas
201
201
 
202
- `gibson schemas`
202
+ `gibson rewrite schemas`
203
203
 
204
204
  ### Adding a New Module to the Software Using AI
205
205
 
206
206
  - gibson module [module name]
207
207
  - e.g. gibson module user
208
208
  - Gibson will display the SQL tables it has generated as a result of your request. It will store these entities in its last memory.
209
- - gibson models
209
+ - `gibson rewrite models`
210
210
  - This will write the code for the entities it just created.
211
- - gibson merge
211
+ - `gibson merge`
212
212
  - This will merge the new entities into your project.
213
213
  - Note, at the moment Gibson does not build the tables into your datastore.
214
214
 
@@ -217,7 +217,7 @@ For example, you might provide class name = `MyBaseModel` and import path = `pro
217
217
  - `gibson modify [table name] [natural language request]`
218
218
  - e.g. `gibson modify my_table I want to add a new column called name and remove all of the columns related to email`
219
219
  - Gibson will display the modified SQL table and store it in its last memory.
220
- - `gibson models`
220
+ - `gibson rewrite models`
221
221
  - This will write the code for the modified entity.
222
222
  - `gibson merge`
223
223
  - This will merge the modified entity into your project.
@@ -0,0 +1,32 @@
1
+ import requests
2
+
3
+ from gibson.command.BaseCommand import BaseCommand
4
+ from gibson.conf.Version import Version as VersionConf
5
+ from gibson.core.Colors import Color, colorize, command, option, subcommand
6
+
7
+
8
+ class Version(BaseCommand):
9
+ def execute(self):
10
+ try:
11
+ r = requests.get("https://pypi.org/pypi/gibson-cli/json")
12
+ latest_version = r.json()["info"]["version"]
13
+ except:
14
+ latest_version = VersionConf.num
15
+
16
+ if latest_version != VersionConf.num:
17
+ self.conversation.type(
18
+ f"A new version of {command(self.configuration.command)} is available: {colorize(latest_version, Color.CYAN)}\n"
19
+ )
20
+ self.conversation.type(
21
+ f"You are currently using version: {colorize(VersionConf.num, Color.VIOLET)}\n"
22
+ )
23
+ self.conversation.type(
24
+ f"Please update to the latest version by running: {command('pip3')} {subcommand('install')} {option('--upgrade')} gibson-cli\n"
25
+ )
26
+ else:
27
+ self.conversation.type(
28
+ f"Nice! You are using the latest version of {command(self.configuration.command)}: {colorize(VersionConf.num, Color.CYAN)}\n"
29
+ )
30
+
31
+ self.conversation.newline()
32
+ return True
@@ -60,5 +60,9 @@ def arguments(list):
60
60
  return f"[{'|'.join(map(lambda x: argument(x), list))}]"
61
61
 
62
62
 
63
+ def option(text):
64
+ return colorize(text, Color.CYAN)
65
+
66
+
63
67
  def hint(text):
64
68
  return colorize(text, Color.GREY)
@@ -407,11 +407,8 @@ class Configuration:
407
407
  pass
408
408
 
409
409
  with open(f"{self.paths.auth}/{self.API_ENV}", "w") as f:
410
- f.write(
411
- json.dumps(
412
- {"access_token": access_token, "refresh_token": refresh_token}
413
- )
414
- )
410
+ data = {"access_token": access_token, "refresh_token": refresh_token}
411
+ json.dump(data, f, indent=2)
415
412
 
416
413
  def set_config_paths(self, ignore_env_vars=False):
417
414
  user_home = os.environ.get("HOME")
@@ -464,7 +461,7 @@ class Configuration:
464
461
  pass
465
462
 
466
463
  with open(self.project.paths.config, "w") as f:
467
- f.write(json.dumps(self.settings))
464
+ json.dump(self.settings, f, indent=2)
468
465
 
469
466
  self.read_config()
470
467
 
@@ -104,7 +104,7 @@ class Memory:
104
104
 
105
105
  def __remember(self, file, data):
106
106
  with open(file, "w") as f:
107
- f.write(json.dumps(data))
107
+ json.dump(data, f, indent=2)
108
108
 
109
109
  return self
110
110
 
@@ -123,7 +123,7 @@ class Memory:
123
123
  return self.get_path_top() + "/last"
124
124
 
125
125
  def get_path_top(self):
126
- return (
126
+ return os.path.expandvars(
127
127
  self.configuration.project.paths.memory
128
128
  + "/"
129
129
  + self.configuration.project.name
@@ -1,9 +1,8 @@
1
- import webbrowser
2
1
  import time
3
- from http.server import HTTPServer, BaseHTTPRequestHandler
2
+ import webbrowser
3
+ from http.server import BaseHTTPRequestHandler, HTTPServer
4
4
  from threading import Thread
5
- from socket import socket
6
- from urllib.parse import urlparse, parse_qs
5
+ from urllib.parse import parse_qs, urlparse
7
6
 
8
7
 
9
8
  # HTTP handler for processing the token sent from the web browser
@@ -38,11 +37,8 @@ class Server(HTTPServer):
38
37
  thread = None
39
38
 
40
39
  def __init__(self, app_domain: str):
41
- sock = socket()
42
- sock.bind(("", 0))
43
- self.port = sock.getsockname()[1]
44
- super().__init__(("localhost", self.port), Handler)
45
-
40
+ super().__init__(("localhost", 0), Handler)
41
+ self.port = self.server_address[1]
46
42
  self.app_domain = app_domain
47
43
 
48
44
  def get_tokens(self):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: gibson-cli
3
- Version: 0.3.0
3
+ Version: 0.3.2
4
4
  Summary: Gibson Command Line Interface
5
5
  Author-email: GibsonAI <noc@gibsonai.com>
6
6
  Project-URL: Homepage, https://gibsonai.com/
@@ -67,7 +67,7 @@ Let's consider a more concrete example. You imported your datastore into the CLI
67
67
 
68
68
  So Gibson creates a new version of the user table containing a nickname column. This new table is stored in last memory. If you execute:
69
69
 
70
- `gibson models`
70
+ `gibson rewrite models`
71
71
 
72
72
  The CLI will write the code for what is sitting in last memory.
73
73
 
@@ -123,8 +123,8 @@ All of Gibson's configuration files and caches are stored in `$HOME/.gibson`. Us
123
123
  - `:command! -nargs=* Gibson r ! gibson <args>`
124
124
  - Open a file and execute commands:
125
125
  - `:Gibson module abc`
126
- - `:Gibson models`
127
- - `:Gibson schemas`
126
+ - `:Gibson rewrite models`
127
+ - `:Gibson rewrite schemas`
128
128
 
129
129
  ## Currently Supported Software
130
130
 
@@ -200,7 +200,7 @@ For example, you might provide class name = `MyBaseModel` and import path = `pro
200
200
 
201
201
  ### Writing the Base Code
202
202
 
203
- `gibson base`
203
+ `gibson rewrite base`
204
204
 
205
205
  ### Writing the Code for a Single Model
206
206
 
@@ -212,20 +212,20 @@ For example, you might provide class name = `MyBaseModel` and import path = `pro
212
212
 
213
213
  ### Writing the Code for All Models
214
214
 
215
- `gibson models`
215
+ `gibson rewrite models`
216
216
 
217
217
  ### Writing the Code for All Schemas
218
218
 
219
- `gibson schemas`
219
+ `gibson rewrite schemas`
220
220
 
221
221
  ### Adding a New Module to the Software Using AI
222
222
 
223
223
  - gibson module [module name]
224
224
  - e.g. gibson module user
225
225
  - Gibson will display the SQL tables it has generated as a result of your request. It will store these entities in its last memory.
226
- - gibson models
226
+ - `gibson rewrite models`
227
227
  - This will write the code for the entities it just created.
228
- - gibson merge
228
+ - `gibson merge`
229
229
  - This will merge the new entities into your project.
230
230
  - Note, at the moment Gibson does not build the tables into your datastore.
231
231
 
@@ -234,7 +234,7 @@ For example, you might provide class name = `MyBaseModel` and import path = `pro
234
234
  - `gibson modify [table name] [natural language request]`
235
235
  - e.g. `gibson modify my_table I want to add a new column called name and remove all of the columns related to email`
236
236
  - Gibson will display the modified SQL table and store it in its last memory.
237
- - `gibson models`
237
+ - `gibson rewrite models`
238
238
  - This will write the code for the modified entity.
239
239
  - `gibson merge`
240
240
  - This will merge the modified entity into your project.
@@ -14,7 +14,7 @@ classifiers = [
14
14
  "Intended Audience :: Developers",
15
15
  "Programming Language :: Python :: 3.9",
16
16
  ]
17
- version = "0.3.0"
17
+ version = "0.3.2"
18
18
 
19
19
  [tool.setuptools.packages.find]
20
20
  where = ["."]
@@ -1,9 +0,0 @@
1
- from gibson.command.BaseCommand import BaseCommand
2
- from gibson.conf.Version import Version as VersionConf
3
-
4
-
5
- class Version(BaseCommand):
6
- def execute(self):
7
- self.conversation.type(f"{VersionConf.num}\n")
8
- self.conversation.newline()
9
- return True
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes