gibson-cli 0.5.1__tar.gz → 0.5.3__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 (123) hide show
  1. {gibson_cli-0.5.1/gibson_cli.egg-info → gibson_cli-0.5.3}/PKG-INFO +2 -1
  2. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/README.md +1 -0
  3. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/command/Build.py +2 -2
  4. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/command/Code.py +3 -3
  5. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/command/Conf.py +3 -3
  6. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/command/Count.py +2 -2
  7. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/command/Dev.py +2 -2
  8. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/command/Forget.py +2 -2
  9. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/command/Help.py +1 -2
  10. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/command/Import.py +4 -4
  11. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/command/List.py +2 -2
  12. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/command/Model.py +2 -2
  13. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/command/Modify.py +2 -2
  14. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/command/OpenApi.py +2 -2
  15. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/command/Question.py +5 -5
  16. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/command/Remove.py +2 -2
  17. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/command/Rename.py +2 -2
  18. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/command/Schema.py +2 -2
  19. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/command/Show.py +3 -3
  20. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/command/Test.py +2 -2
  21. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/command/Version.py +5 -5
  22. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/command/auth/Auth.py +3 -3
  23. gibson_cli-0.5.3/gibson/command/new/Module.py +46 -0
  24. gibson_cli-0.5.3/gibson/command/new/New.py +32 -0
  25. gibson_cli-0.5.1/gibson/command/New.py → gibson_cli-0.5.3/gibson/command/new/Project.py +1 -19
  26. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/command/rewrite/Rewrite.py +3 -3
  27. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/core/CommandRouter.py +1 -4
  28. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/core/Conversation.py +13 -5
  29. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/data/bash-completion.tmpl +2 -5
  30. {gibson_cli-0.5.1 → gibson_cli-0.5.3/gibson_cli.egg-info}/PKG-INFO +2 -1
  31. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson_cli.egg-info/SOURCES.txt +3 -2
  32. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/pyproject.toml +1 -1
  33. gibson_cli-0.5.1/gibson/command/Module.py +0 -40
  34. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/.gitignore +0 -0
  35. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/.pre-commit-config.yaml +0 -0
  36. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/bin/build.sh +0 -0
  37. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/bin/release.sh +0 -0
  38. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/api/BaseApi.py +0 -0
  39. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/api/Cli.py +0 -0
  40. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/bin/gibson.py +0 -0
  41. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/command/BaseCommand.py +0 -0
  42. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/command/Merge.py +0 -0
  43. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/command/Tree.py +0 -0
  44. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/command/WarGames.py +0 -0
  45. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/command/auth/Login.py +0 -0
  46. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/command/auth/Logout.py +0 -0
  47. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/command/rewrite/Api.py +0 -0
  48. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/command/rewrite/Base.py +0 -0
  49. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/command/rewrite/Models.py +0 -0
  50. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/command/rewrite/Schemas.py +0 -0
  51. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/command/rewrite/Tests.py +0 -0
  52. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/command/tests/test_command_BaseCommand.py +0 -0
  53. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/command/tests/test_command_Conf.py +0 -0
  54. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/conf/Api.py +0 -0
  55. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/conf/Code.py +0 -0
  56. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/conf/Custom.py +0 -0
  57. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/conf/Datastore.py +0 -0
  58. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/conf/Dependencies.py +0 -0
  59. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/conf/Dev.py +0 -0
  60. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/conf/Frameworks.py +0 -0
  61. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/conf/Modeler.py +0 -0
  62. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/conf/Paths.py +0 -0
  63. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/conf/Platform.py +0 -0
  64. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/conf/Project.py +0 -0
  65. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/conf/Version.py +0 -0
  66. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/conf/dev/Api.py +0 -0
  67. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/conf/dev/Base.py +0 -0
  68. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/conf/dev/Model.py +0 -0
  69. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/conf/dev/Schema.py +0 -0
  70. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/conf/tests/test_conf_Dependencies.py +0 -0
  71. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/conf/tests/test_conf_Platform.py +0 -0
  72. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/core/Colors.py +0 -0
  73. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/core/Completions.py +0 -0
  74. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/core/Configuration.py +0 -0
  75. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/core/Env.py +0 -0
  76. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/core/Memory.py +0 -0
  77. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/core/PythonPath.py +0 -0
  78. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/core/TimeKeeper.py +0 -0
  79. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/core/utils.py +0 -0
  80. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/data/default-ref-table.tmpl +0 -0
  81. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/data/default-table.tmpl +0 -0
  82. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/db/TableExceptions.py +0 -0
  83. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/db/tests/test_db_TableExceptions.py +0 -0
  84. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/dev/Dev.py +0 -0
  85. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/display/Header.py +0 -0
  86. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/display/WorkspaceFooter.py +0 -0
  87. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/display/WorkspaceHeader.py +0 -0
  88. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/display/tests/test_display_Header.py +0 -0
  89. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/display/tests/test_display_WorkspaceFooter.py +0 -0
  90. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/display/tests/test_display_WorkspaceHeader.py +0 -0
  91. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/lang/Python.py +0 -0
  92. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/lang/tests/test_lang_Python.py +0 -0
  93. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/services/auth/Server.py +0 -0
  94. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/services/code/context/schema/DataDictionary.py +0 -0
  95. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/services/code/context/schema/EntityKeys.py +0 -0
  96. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/services/code/context/schema/Manager.py +0 -0
  97. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/services/code/context/schema/tests/test_code_context_schema_DataDictionary.py +0 -0
  98. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/services/code/context/schema/tests/test_code_context_schema_EntityKeys.py +0 -0
  99. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/services/code/context/schema/tests/test_code_context_schema_Manager.py +0 -0
  100. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/services/code/customization/Authenticator.py +0 -0
  101. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/services/code/customization/BaseCustomization.py +0 -0
  102. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/services/code/customization/CustomizationManager.py +0 -0
  103. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/services/code/customization/Index.py +0 -0
  104. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/services/code/customization/tests/test_code_customization_Authenticator.py +0 -0
  105. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/services/code/customization/tests/test_code_customization_BaseCustomization.py +0 -0
  106. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/structure/Entity.py +0 -0
  107. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/structure/constraints/ReferenceConstraint.py +0 -0
  108. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/structure/keys/ForeignKey.py +0 -0
  109. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/structure/keys/Index.py +0 -0
  110. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/structure/keys/IndexAttribute.py +0 -0
  111. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/structure/keys/tests/test_ForeignKey.py +0 -0
  112. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/structure/keys/tests/test_Index.py +0 -0
  113. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/structure/keys/tests/test_IndexAttribute.py +0 -0
  114. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/structure/testing.py +0 -0
  115. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/structure/tests/test_Entity.py +0 -0
  116. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/tests/test_Env.py +0 -0
  117. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/tests/test_Memory.py +0 -0
  118. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson/tests/test_utils.py +0 -0
  119. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson_cli.egg-info/dependency_links.txt +0 -0
  120. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson_cli.egg-info/entry_points.txt +0 -0
  121. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/gibson_cli.egg-info/top_level.txt +0 -0
  122. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/requirements.txt +0 -0
  123. {gibson_cli-0.5.1 → gibson_cli-0.5.3}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: gibson-cli
3
- Version: 0.5.1
3
+ Version: 0.5.3
4
4
  Summary: Gibson Command Line Interface
5
5
  Author-email: GibsonAI <noc@gibsonai.com>
6
6
  Project-URL: Homepage, https://gibsonai.com/
@@ -169,6 +169,7 @@ More languages and frameworks are in active development. If you do not see a ver
169
169
 
170
170
  ### Configuring Your Datastore
171
171
 
172
+ `gibson conf datastore::type mysql`
172
173
  `gibson conf datastore::uri mysql+pymysql://[user]:[password]@[host]/[database name]`
173
174
 
174
175
  Note: Gibson currently only supports MySQL. Let us know if you need something else.
@@ -152,6 +152,7 @@ More languages and frameworks are in active development. If you do not see a ver
152
152
 
153
153
  ### Configuring Your Datastore
154
154
 
155
+ `gibson conf datastore::type mysql`
155
156
  `gibson conf datastore::uri mysql+pymysql://[user]:[password]@[host]/[database name]`
156
157
 
157
158
  Note: Gibson currently only supports MySQL. Let us know if you need something else.
@@ -3,8 +3,8 @@ import sys
3
3
  from sqlalchemy import create_engine
4
4
  from sqlalchemy.orm import sessionmaker
5
5
 
6
+ import gibson.core.Colors as Colors
6
7
  from gibson.command.BaseCommand import BaseCommand
7
- from gibson.core.Colors import argument, command, hint, subcommand
8
8
  from gibson.db.TableExceptions import TableExceptions
9
9
 
10
10
 
@@ -72,7 +72,7 @@ class Build(BaseCommand):
72
72
  else ""
73
73
  )
74
74
  self.conversation.type(
75
- f"usage: {command(self.configuration.command)} {subcommand('build')} {argument('datastore')} {hint('build the datastore')} {datastore_uri}\n"
75
+ f"usage: {Colors.command(self.configuration.command)} {Colors.subcommand('build')} {Colors.argument('datastore')} {Colors.hint('build the datastore')} {datastore_uri}\n"
76
76
  )
77
77
  self.conversation.newline()
78
78
  exit(1)
@@ -3,11 +3,11 @@ import re
3
3
  import sys
4
4
  from string import Template
5
5
 
6
+ import gibson.core.Colors as Colors
6
7
  from gibson.api.Cli import Cli
7
8
  from gibson.command.BaseCommand import BaseCommand
8
9
  from gibson.command.Merge import Merge
9
10
  from gibson.command.rewrite.Rewrite import Rewrite
10
- from gibson.core.Colors import argument, command, hint, input, subcommand
11
11
  from gibson.core.Configuration import Configuration
12
12
  from gibson.display.Header import Header
13
13
  from gibson.display.WorkspaceFooter import WorkspaceFooter
@@ -188,12 +188,12 @@ class Code(BaseCommand):
188
188
  def usage(self):
189
189
  self.configuration.display_project()
190
190
  self.conversation.type(
191
- f"usage: {command(self.configuration.command)} {subcommand('code')} {argument('entity')} {input('[entity name]')} {hint('create a new entity')}\n"
191
+ f"usage: {Colors.command(self.configuration.command)} {Colors.subcommand('code')} {Colors.argument('entity')} {Colors.input('[entity name]')} {Colors.hint('create a new entity')}\n"
192
192
  )
193
193
  self.conversation.newline()
194
194
  self.conversation.type(
195
195
  ' To create a new entity named "user":\n'
196
- f" {command(self.configuration.command)} {subcommand('code')} {argument('entity')} {input('user')}\n"
196
+ f" {Colors.command(self.configuration.command)} {Colors.subcommand('code')} {Colors.argument('entity')} {Colors.input('user')}\n"
197
197
  )
198
198
  self.conversation.newline()
199
199
  exit(1)
@@ -1,7 +1,7 @@
1
1
  import sys
2
2
 
3
+ import gibson.core.Colors as Colors
3
4
  from gibson.command.BaseCommand import BaseCommand
4
- from gibson.core.Colors import argument, command, hint, input, subcommand
5
5
 
6
6
 
7
7
  class Conf(BaseCommand):
@@ -61,12 +61,12 @@ class Conf(BaseCommand):
61
61
  def usage(self):
62
62
  self.configuration.display_project()
63
63
  self.conversation.type(
64
- f"usage: {command(self.configuration.command)} {subcommand('conf')} {argument('[key]')} {input('[value]')} {hint('set a configuration value')}\n"
64
+ f"usage: {Colors.command(self.configuration.command)} {Colors.subcommand('conf')} {Colors.argument('[key]')} {Colors.input('[value]')} {Colors.hint('set a configuration value')}\n"
65
65
  )
66
66
  self.conversation.newline()
67
67
 
68
68
  if self.configuration.project:
69
- self.conversation.type(f" where {argument('[key]')} is one of:\n")
69
+ self.conversation.type(f" where {Colors.argument('[key]')} is one of:\n")
70
70
  self.conversation.set_delay(0.004)
71
71
 
72
72
  for key in self.get_configuration_keys():
@@ -1,7 +1,7 @@
1
1
  import sys
2
2
 
3
+ import gibson.core.Colors as Colors
3
4
  from gibson.command.BaseCommand import BaseCommand
4
- from gibson.core.Colors import arguments, command, hint, subcommand
5
5
 
6
6
 
7
7
  class Count(BaseCommand):
@@ -31,7 +31,7 @@ class Count(BaseCommand):
31
31
  def usage(self):
32
32
  self.configuration.display_project()
33
33
  self.conversation.type(
34
- f"usage: {command(self.configuration.command)} {subcommand('count')} {arguments(['last', 'stored'])} {hint('display the number of entities')}\n"
34
+ f"usage: {Colors.command(self.configuration.command)} {Colors.subcommand('count')} {Colors.arguments(['last', 'stored'])} {Colors.hint('display the number of entities')}\n"
35
35
  )
36
36
  self.conversation.newline()
37
37
  exit(1)
@@ -1,8 +1,8 @@
1
1
  import os
2
2
  import sys
3
3
 
4
+ import gibson.core.Colors as Colors
4
5
  from gibson.command.BaseCommand import BaseCommand
5
- from gibson.core.Colors import arguments, command, hint, subcommand
6
6
  from gibson.lang.Python import Python
7
7
 
8
8
 
@@ -119,7 +119,7 @@ class Dev(BaseCommand):
119
119
  def usage(self):
120
120
  self.configuration.display_project()
121
121
  self.conversation.type(
122
- f"usage: {command(self.configuration.command)} {subcommand('dev')} {arguments(['off', 'on'])} {hint('turn dev mode on or off')}\n"
122
+ f"usage: {Colors.command(self.configuration.command)} {Colors.subcommand('dev')} {Colors.arguments(['off', 'on'])} {Colors.hint('turn dev mode on or off')}\n"
123
123
  )
124
124
  self.conversation.newline()
125
125
  exit(1)
@@ -1,7 +1,7 @@
1
1
  import sys
2
2
 
3
+ import gibson.core.Colors as Colors
3
4
  from gibson.command.BaseCommand import BaseCommand
4
- from gibson.core.Colors import arguments, command, hint, subcommand
5
5
 
6
6
 
7
7
  class Forget(BaseCommand):
@@ -27,7 +27,7 @@ class Forget(BaseCommand):
27
27
  def usage(self):
28
28
  self.configuration.display_project()
29
29
  self.conversation.type(
30
- f"usage: {command(self.configuration.command)} {subcommand('forget')} {arguments(['all', 'last', 'stored'])} {hint('delete entities from memory')}\n"
30
+ f"usage: {Colors.command(self.configuration.command)} {Colors.subcommand('forget')} {Colors.arguments(['all', 'last', 'stored'])} {Colors.hint('delete entities from memory')}\n"
31
31
  )
32
32
  self.conversation.newline()
33
33
  exit(1)
@@ -56,8 +56,7 @@ class Help(BaseCommand):
56
56
  "description": "change an entity using natural language",
57
57
  "memory": "last > stored",
58
58
  },
59
- "module": {"description": "create a new module", "memory": "last"},
60
- "new": {"description": "start something new", "memory": None},
59
+ "new": {"description": "create something new", "memory": None},
61
60
  "openapi": {"description": "build from an OpenAPI spec", "memory": "last"},
62
61
  "remove": {
63
62
  "description": "remove an entity from the project",
@@ -3,10 +3,10 @@ import sys
3
3
  from sqlalchemy import create_engine
4
4
  from sqlalchemy.orm import sessionmaker
5
5
 
6
+ import gibson.core.Colors as Colors
6
7
  from gibson.api.Cli import Cli
7
8
  from gibson.command.BaseCommand import BaseCommand
8
9
  from gibson.command.rewrite.Rewrite import Rewrite
9
- from gibson.core.Colors import argument, arguments, command, hint, option, subcommand
10
10
  from gibson.db.TableExceptions import TableExceptions
11
11
 
12
12
 
@@ -106,13 +106,13 @@ class Import(BaseCommand):
106
106
  else ""
107
107
  )
108
108
  self.conversation.type(
109
- f"usage: {command(self.configuration.command)} {subcommand('import')} {argument('api')} {hint('import all entities from your project created on GibsonAI.com')}\n"
109
+ f"usage: {Colors.command(self.configuration.command)} {Colors.subcommand('import')} {Colors.argument('api')} {Colors.hint('import all entities from your project created on GibsonAI.com')}\n"
110
110
  )
111
111
  self.conversation.type(
112
- f" or: {command(self.configuration.command)} {subcommand('import')} {argument('datastore')} {hint('import all entities from your local datastore')} {datastore_uri}\n"
112
+ f" or: {Colors.command(self.configuration.command)} {Colors.subcommand('import')} {Colors.argument('datastore')} {Colors.hint('import all entities from your local datastore')} {datastore_uri}\n"
113
113
  )
114
114
  self.conversation.type(
115
- f" or: {command(self.configuration.command)} {subcommand('import')} {arguments(['api', 'datastore'])} {option('.. dev')} {hint('have dev mode write all the code')}\n"
115
+ f" or: {Colors.command(self.configuration.command)} {Colors.subcommand('import')} {Colors.arguments(['api', 'datastore'])} {Colors.option('.. dev')} {Colors.hint('have dev mode write all the code')}\n"
116
116
  )
117
117
  self.conversation.newline()
118
118
  exit(1)
@@ -1,8 +1,8 @@
1
1
  import sys
2
2
 
3
+ import gibson.core.Colors as Colors
3
4
  from gibson.api.Cli import Cli
4
5
  from gibson.command.BaseCommand import BaseCommand
5
- from gibson.core.Colors import arguments, command, hint, subcommand
6
6
 
7
7
 
8
8
  class List(BaseCommand):
@@ -58,7 +58,7 @@ class List(BaseCommand):
58
58
  def usage(self):
59
59
  self.configuration.display_project()
60
60
  self.conversation.type(
61
- f"usage: {command(self.configuration.command)} {subcommand('list')} {arguments(['entities'])} {hint('list all entities')}\n"
61
+ f"usage: {Colors.command(self.configuration.command)} {Colors.subcommand('list')} {Colors.arguments(['entities'])} {Colors.hint('list all entities')}\n"
62
62
  )
63
63
  self.conversation.newline()
64
64
  exit(1)
@@ -1,8 +1,8 @@
1
1
  import sys
2
2
 
3
+ import gibson.core.Colors as Colors
3
4
  from gibson.api.Cli import Cli
4
5
  from gibson.command.BaseCommand import BaseCommand
5
- from gibson.core.Colors import command, hint, input, subcommand
6
6
  from gibson.core.TimeKeeper import TimeKeeper
7
7
  from gibson.dev.Dev import Dev
8
8
 
@@ -35,7 +35,7 @@ class Model(BaseCommand):
35
35
  def usage(self):
36
36
  self.configuration.display_project()
37
37
  self.conversation.type(
38
- f"usage: {command(self.configuration.command)} {subcommand('model')} {input('[entity name]')} {hint('generate the model for an entity')}\n"
38
+ f"usage: {Colors.command(self.configuration.command)} {Colors.subcommand('model')} {Colors.input('[entity name]')} {Colors.hint('generate the model for an entity')}\n"
39
39
  )
40
40
  self.conversation.newline()
41
41
  exit(1)
@@ -1,8 +1,8 @@
1
1
  import sys
2
2
 
3
+ import gibson.core.Colors as Colors
3
4
  from gibson.api.Cli import Cli
4
5
  from gibson.command.BaseCommand import BaseCommand
5
- from gibson.core.Colors import argument, command, hint, input, subcommand
6
6
 
7
7
 
8
8
  class Modify(BaseCommand):
@@ -34,7 +34,7 @@ class Modify(BaseCommand):
34
34
  def usage(self):
35
35
  self.configuration.display_project()
36
36
  self.conversation.type(
37
- f"usage: {command(self.configuration.command)} {subcommand('modify')} {argument('[entity name]')} {input('[instructions]')} {hint('modify an entity with natural language instructions')}\n"
37
+ f"usage: {Colors.command(self.configuration.command)} {Colors.subcommand('modify')} {Colors.argument('[entity name]')} {Colors.input('[instructions]')} {Colors.hint('modify an entity with natural language instructions')}\n"
38
38
  )
39
39
  self.conversation.newline()
40
40
  exit(1)
@@ -2,9 +2,9 @@ import json
2
2
  import re
3
3
  import sys
4
4
 
5
+ import gibson.core.Colors as Colors
5
6
  from gibson.api.Cli import Cli
6
7
  from gibson.command.BaseCommand import BaseCommand
7
- from gibson.core.Colors import command, hint, input, subcommand
8
8
 
9
9
 
10
10
  class OpenApi(BaseCommand):
@@ -135,7 +135,7 @@ class OpenApi(BaseCommand):
135
135
  def usage(self):
136
136
  self.configuration.display_project()
137
137
  self.conversation.type(
138
- f"usage: {command(self.configuration.command)} {subcommand('openapi')} {input('[file path]')} {hint('import entities from an OpenAPI spec file')}\n"
138
+ f"usage: {Colors.command(self.configuration.command)} {Colors.subcommand('openapi')} {Colors.input('[file path]')} {Colors.hint('import entities from an OpenAPI spec file')}\n"
139
139
  )
140
140
  self.conversation.newline()
141
141
  exit(1)
@@ -1,9 +1,9 @@
1
1
  import os
2
2
  import sys
3
3
 
4
+ import gibson.core.Colors as Colors
4
5
  from gibson.api.Cli import Cli
5
6
  from gibson.command.BaseCommand import BaseCommand
6
- from gibson.core.Colors import argument, command, hint, input, subcommand
7
7
 
8
8
 
9
9
  class Question(BaseCommand):
@@ -96,16 +96,16 @@ class Question(BaseCommand):
96
96
  def usage(self):
97
97
  self.configuration.display_project()
98
98
  self.conversation.type(
99
- f"usage: {command(self.configuration.command)} {subcommand('q')} {input('[instructions]')} {hint('ask a question or tell Gibson to do something using natural language')}\n"
99
+ f"usage: {Colors.command(self.configuration.command)} {Colors.subcommand('q')} {Colors.input('[instructions]')} {Colors.hint('ask a question or tell Gibson to do something using natural language')}\n"
100
100
  )
101
101
  self.conversation.type(
102
- f" use {argument(self.TOKEN_FILE+'[path]')} to import a file from the filesystem\n"
102
+ f" use {Colors.argument(self.TOKEN_FILE+'[path]')} to import a file from the filesystem\n"
103
103
  )
104
104
  self.conversation.type(
105
- f" use {argument(self.TOKEN_PYTHON+'[import]')} to import a file from PYTHONPATH\n"
105
+ f" use {Colors.argument(self.TOKEN_PYTHON+'[import]')} to import a file from PYTHONPATH\n"
106
106
  )
107
107
  self.conversation.type(
108
- f" use {argument(self.TOKEN_SQL+'[entity name]')} to import SQL\n"
108
+ f" use {Colors.argument(self.TOKEN_SQL+'[entity name]')} to import SQL\n"
109
109
  )
110
110
 
111
111
  self.conversation.newline()
@@ -1,9 +1,9 @@
1
1
  import sys
2
2
 
3
+ import gibson.core.Colors as Colors
3
4
  from gibson.api.Cli import Cli
4
5
  from gibson.command.BaseCommand import BaseCommand
5
6
  from gibson.command.rewrite.Rewrite import Rewrite
6
- from gibson.core.Colors import command, hint, input, subcommand
7
7
 
8
8
 
9
9
  class Remove(BaseCommand):
@@ -74,7 +74,7 @@ class Remove(BaseCommand):
74
74
  def usage(self):
75
75
  self.configuration.display_project()
76
76
  self.conversation.type(
77
- f"usage: {command(self.configuration.command)} {subcommand('remove')} {input('[entity name]')} {hint('remove an entity from the project')}\n"
77
+ f"usage: {Colors.command(self.configuration.command)} {Colors.subcommand('remove')} {Colors.input('[entity name]')} {Colors.hint('remove an entity from the project')}\n"
78
78
  )
79
79
  self.conversation.newline()
80
80
  exit(1)
@@ -1,9 +1,9 @@
1
1
  import sys
2
2
 
3
+ import gibson.core.Colors as Colors
3
4
  from gibson.api.Cli import Cli
4
5
  from gibson.command.BaseCommand import BaseCommand
5
6
  from gibson.command.rewrite.Rewrite import Rewrite
6
- from gibson.core.Colors import argument, command, hint, input, subcommand
7
7
 
8
8
 
9
9
  class Rename(BaseCommand):
@@ -64,7 +64,7 @@ class Rename(BaseCommand):
64
64
  def usage(self):
65
65
  self.configuration.display_project()
66
66
  self.conversation.type(
67
- f"usage: {command(self.configuration.command)} {subcommand('rename')} {argument('[current]')} {input('[new]')} {hint('rename an entity')}\n"
67
+ f"usage: {Colors.command(self.configuration.command)} {Colors.subcommand('rename')} {Colors.argument('[current]')} {Colors.input('[new]')} {Colors.hint('rename an entity')}\n"
68
68
  )
69
69
  self.conversation.newline()
70
70
  exit(1)
@@ -1,8 +1,8 @@
1
1
  import sys
2
2
 
3
+ import gibson.core.Colors as Colors
3
4
  from gibson.api.Cli import Cli
4
5
  from gibson.command.BaseCommand import BaseCommand
5
- from gibson.core.Colors import argument, command, hint, subcommand
6
6
  from gibson.core.TimeKeeper import TimeKeeper
7
7
  from gibson.dev.Dev import Dev
8
8
 
@@ -35,7 +35,7 @@ class Schema(BaseCommand):
35
35
  def usage(self):
36
36
  self.configuration.display_project()
37
37
  self.conversation.type(
38
- f"usage: {command(self.configuration.command)} {subcommand('schema')} {argument('[entity name]')} {hint('write the schema code for an entity')}\n"
38
+ f"usage: {Colors.command(self.configuration.command)} {Colors.subcommand('schema')} {Colors.argument('[entity name]')} {Colors.hint('write the schema code for an entity')}\n"
39
39
  )
40
40
  self.conversation.newline()
41
41
  exit(1)
@@ -1,7 +1,7 @@
1
1
  import sys
2
2
 
3
+ import gibson.core.Colors as Colors
3
4
  from gibson.command.BaseCommand import BaseCommand
4
- from gibson.core.Colors import argument, command, hint, subcommand
5
5
 
6
6
 
7
7
  class Show(BaseCommand):
@@ -31,10 +31,10 @@ class Show(BaseCommand):
31
31
  def usage(self):
32
32
  self.configuration.display_project()
33
33
  self.conversation.type(
34
- f"usage: {command(self.configuration.command)} {subcommand('show')} {hint('display the entire schema')}\n"
34
+ f"usage: {Colors.command(self.configuration.command)} {Colors.subcommand('show')} {Colors.hint('display the entire schema')}\n"
35
35
  )
36
36
  self.conversation.type(
37
- f" or: {command(self.configuration.command)} {subcommand('show')} {argument('[entity name]')} {hint('display the schema for an entity')}\n"
37
+ f" or: {Colors.command(self.configuration.command)} {Colors.subcommand('show')} {Colors.argument('[entity name]')} {Colors.hint('display the schema for an entity')}\n"
38
38
  )
39
39
  self.conversation.newline()
40
40
  exit(1)
@@ -1,8 +1,8 @@
1
1
  import sys
2
2
 
3
+ import gibson.core.Colors as Colors
3
4
  from gibson.api.Cli import Cli
4
5
  from gibson.command.BaseCommand import BaseCommand
5
- from gibson.core.Colors import argument, command, hint, subcommand
6
6
  from gibson.core.TimeKeeper import TimeKeeper
7
7
  from gibson.dev.Dev import Dev
8
8
 
@@ -35,7 +35,7 @@ class Test(BaseCommand):
35
35
  def usage(self):
36
36
  self.configuration.display_project()
37
37
  self.conversation.type(
38
- f"usage: {command(self.configuration.command)} {subcommand('test')} {argument('[entity name]')} {hint('write the unit tests for an entity')}\n"
38
+ f"usage: {Colors.command(self.configuration.command)} {Colors.subcommand('test')} {Colors.argument('[entity name]')} {Colors.hint('write the unit tests for an entity')}\n"
39
39
  )
40
40
  self.conversation.newline()
41
41
  exit(1)
@@ -1,8 +1,8 @@
1
1
  import requests
2
2
 
3
+ import gibson.core.Colors as Colors
3
4
  from gibson.command.BaseCommand import BaseCommand
4
5
  from gibson.conf.Version import Version as VersionConf
5
- from gibson.core.Colors import Color, colorize, command, option, subcommand
6
6
 
7
7
 
8
8
  class Version(BaseCommand):
@@ -15,17 +15,17 @@ class Version(BaseCommand):
15
15
 
16
16
  if latest_version != VersionConf.num:
17
17
  self.conversation.type(
18
- f"A new version of {command(self.configuration.command)} is available: {colorize(latest_version, Color.CYAN)}\n"
18
+ f"A new version of {Colors.command(self.configuration.command)} is available: {Colors.colorize(latest_version, Colors.Color.CYAN)}\n"
19
19
  )
20
20
  self.conversation.type(
21
- f"You are currently using version: {colorize(VersionConf.num, Color.VIOLET)}\n"
21
+ f"You are currently using version: {Colors.colorize(VersionConf.num, Colors.Color.VIOLET)}\n"
22
22
  )
23
23
  self.conversation.type(
24
- f"Please update to the latest version by running: {command('pip3')} {subcommand('install')} {option('--upgrade')} gibson-cli\n"
24
+ f"Please update to the latest version by running: {Colors.command('pip3')} {Colors.subcommand('install')} {Colors.option('--upgrade')} gibson-cli\n"
25
25
  )
26
26
  else:
27
27
  self.conversation.type(
28
- f"Nice! You are using the latest version of {command(self.configuration.command)}: {colorize(VersionConf.num, Color.CYAN)}\n"
28
+ f"Nice! You are using the latest version of {Colors.command(self.configuration.command)}: {Colors.colorize(VersionConf.num, Colors.Color.CYAN)}\n"
29
29
  )
30
30
 
31
31
  self.conversation.newline()
@@ -1,9 +1,9 @@
1
1
  import sys
2
2
 
3
+ import gibson.core.Colors as Colors
3
4
  from gibson.command.auth.Login import Login
4
5
  from gibson.command.auth.Logout import Logout
5
6
  from gibson.command.BaseCommand import BaseCommand
6
- from gibson.core.Colors import argument, command, hint, subcommand
7
7
 
8
8
 
9
9
  class Auth(BaseCommand):
@@ -20,10 +20,10 @@ class Auth(BaseCommand):
20
20
  def usage(self):
21
21
  self.configuration.display_project()
22
22
  self.conversation.type(
23
- f"usage: {command(self.configuration.command)} {subcommand('auth')} {argument('login')} {hint('login to Gibson')}\n"
23
+ f"usage: {Colors.command(self.configuration.command)} {Colors.subcommand('auth')} {Colors.argument('login')} {Colors.hint('login to Gibson')}\n"
24
24
  )
25
25
  self.conversation.type(
26
- f" or: {command(self.configuration.command)} {subcommand('auth')} {argument('logout')} {hint('logout of Gibson')}\n"
26
+ f" or: {Colors.command(self.configuration.command)} {Colors.subcommand('auth')} {Colors.argument('logout')} {Colors.hint('logout of Gibson')}\n"
27
27
  )
28
28
  self.conversation.newline()
29
29
  exit(1)
@@ -0,0 +1,46 @@
1
+ import gibson.core.Colors as Colors
2
+ from gibson.api.Cli import Cli
3
+ from gibson.command.BaseCommand import BaseCommand
4
+
5
+
6
+ class Module(BaseCommand):
7
+ def execute(self):
8
+ self.configuration.ensure_project()
9
+ module_name = self.conversation.prompt_module()
10
+
11
+ self.conversation.newline()
12
+ self.conversation.type(
13
+ f"Generating new module: {Colors.argument(module_name)}\n"
14
+ )
15
+
16
+ cli = Cli(self.configuration)
17
+ response = cli.modeler_module(
18
+ self.configuration.project.modeler.version,
19
+ self.configuration.project.description,
20
+ module_name,
21
+ )
22
+
23
+ self.memory.remember_last(response)
24
+
25
+ self.conversation.newline()
26
+ self.conversation.type(
27
+ f"The following entities were created in your {Colors.argument('last')} memory:\n"
28
+ )
29
+
30
+ for entity in response["entities"]:
31
+ self.conversation.newline()
32
+ print(entity["definition"])
33
+
34
+ self.conversation.newline()
35
+ self.conversation.type(f"If you want to persist these new entities run:\n")
36
+ self.conversation.type(
37
+ f"{Colors.command(self.configuration.command)} {Colors.subcommand('merge')}\n"
38
+ )
39
+
40
+ self.conversation.newline()
41
+ self.conversation.type(
42
+ f"Afterwards, you can modify any of these entities by running:\n"
43
+ )
44
+ self.conversation.type(
45
+ f"{Colors.command(self.configuration.command)} {Colors.subcommand('modify')} {Colors.argument('[entity name]')} {Colors.input('[instructions]')}\n"
46
+ )
@@ -0,0 +1,32 @@
1
+ import sys
2
+
3
+ import gibson.core.Colors as Colors
4
+ from gibson.command.BaseCommand import BaseCommand
5
+ from gibson.command.new.Module import Module
6
+ from gibson.command.new.Project import Project
7
+
8
+
9
+ class New(BaseCommand):
10
+ def execute(self):
11
+ if len(sys.argv) != 3:
12
+ self.usage()
13
+ elif sys.argv[2] == "project":
14
+ Project(self.configuration).execute()
15
+ elif sys.argv[2] == "module":
16
+ Module(self.configuration).execute()
17
+ else:
18
+ self.usage()
19
+
20
+ def usage(self):
21
+ self.configuration.display_project()
22
+ self.conversation.type(
23
+ f"usage: {Colors.command(self.configuration.command)} {Colors.subcommand('new')} {Colors.arguments(['project', 'module'])} {Colors.hint('create something new')}\n"
24
+ )
25
+ self.conversation.type(
26
+ f" {Colors.command(self.configuration.command)} {Colors.subcommand('new')} {Colors.argument('project')} {Colors.hint('create a new project')}\n"
27
+ )
28
+ self.conversation.type(
29
+ f" {Colors.command(self.configuration.command)} {Colors.subcommand('new')} {Colors.argument('module')} {Colors.hint('create a new module')}\n"
30
+ )
31
+ self.conversation.newline()
32
+ exit(1)
@@ -1,18 +1,8 @@
1
- import sys
2
-
3
- from gibson.api.Cli import Cli
4
1
  from gibson.command.BaseCommand import BaseCommand
5
- from gibson.core.Colors import argument, command, hint, subcommand
6
2
 
7
3
 
8
- class New(BaseCommand):
4
+ class Project(BaseCommand):
9
5
  def execute(self):
10
- if len(sys.argv) != 3:
11
- self.usage()
12
-
13
- if sys.argv[2] != "project":
14
- self.usage()
15
-
16
6
  self.conversation.new_project(self.configuration)
17
7
  project_name = self.conversation.prompt_project()
18
8
  if project_name in self.configuration.settings:
@@ -25,11 +15,3 @@ class New(BaseCommand):
25
15
  self.configuration.append_project_to_conf(project_name, project_description)
26
16
 
27
17
  self.conversation.configure_new_project(self.configuration)
28
-
29
- def usage(self):
30
- self.configuration.display_project()
31
- self.conversation.type(
32
- f"usage: {command(self.configuration.command)} {subcommand('new')} {argument('project')} {hint('create a new project')}\n"
33
- )
34
- self.conversation.newline()
35
- exit(1)
@@ -2,7 +2,7 @@ import os
2
2
  import shutil
3
3
  import sys
4
4
 
5
- from gibson.core.Colors import arguments, command, hint, subcommand
5
+ import gibson.core.Colors as Colors
6
6
  from gibson.core.Configuration import Configuration
7
7
  from gibson.core.TimeKeeper import TimeKeeper
8
8
  from gibson.services.code.customization.CustomizationManager import CustomizationManager
@@ -117,10 +117,10 @@ class Rewrite(BaseCommand):
117
117
  def usage(self):
118
118
  self.configuration.display_project()
119
119
  self.conversation.type(
120
- f"usage: {command(self.configuration.command)} {subcommand('rewrite')} {hint('rewrite all code')}\n"
120
+ f"usage: {Colors.command(self.configuration.command)} {Colors.subcommand('rewrite')} {Colors.hint('rewrite all code')}\n"
121
121
  )
122
122
  self.conversation.type(
123
- f" or: {command(self.configuration.command)} {subcommand('rewrite')} {arguments(self.arguments)} {hint('rewrite only the specified code')}\n"
123
+ f" or: {Colors.command(self.configuration.command)} {Colors.subcommand('rewrite')} {Colors.arguments(self.arguments)} {Colors.hint('rewrite only the specified code')}\n"
124
124
  )
125
125
  self.conversation.newline()
126
126
  exit(1)
@@ -13,8 +13,7 @@ from gibson.command.List import List
13
13
  from gibson.command.Merge import Merge
14
14
  from gibson.command.Model import Model
15
15
  from gibson.command.Modify import Modify
16
- from gibson.command.Module import Module
17
- from gibson.command.New import New
16
+ from gibson.command.new.New import New
18
17
  from gibson.command.OpenApi import OpenApi
19
18
  from gibson.command.Question import Question
20
19
  from gibson.command.Remove import Remove
@@ -75,8 +74,6 @@ class CommandRouter:
75
74
  command = Model(self.configuration)
76
75
  elif sys.argv[1] == "modify":
77
76
  command = Modify(self.configuration)
78
- elif sys.argv[1] == "module":
79
- command = Module(self.configuration)
80
77
  elif sys.argv[1] == "new":
81
78
  command = New(self.configuration)
82
79
  elif sys.argv[1] == "openapi":
@@ -5,8 +5,8 @@ import time
5
5
 
6
6
  import pyfiglet
7
7
 
8
+ import gibson.core.Colors as Colors
8
9
  from gibson.conf.Version import Version
9
- from gibson.core.Colors import project
10
10
 
11
11
 
12
12
  class Conversation:
@@ -55,8 +55,9 @@ class Conversation:
55
55
  self.type(
56
56
  "\nI am so excited that we're building something new together. "
57
57
  + "You probably need\nto execute:\n\n"
58
- + " gibson conf api::key [API key]\n"
59
- + " gibson conf datastore::uri [datastore URI]\n\n"
58
+ + " gibson conf api::key [API key]\n"
59
+ + " gibson conf datastore::type [datastore type]\n"
60
+ + " gibson conf datastore::uri [datastore URI]\n\n"
60
61
  + "To finish setting things up.\n"
61
62
  )
62
63
  self.newline()
@@ -73,7 +74,7 @@ class Conversation:
73
74
  self.newline()
74
75
 
75
76
  def display_project(self, project_name):
76
- self.type(f"<> Project {project(project_name)}\n\n")
77
+ self.type(f"<> Project {Colors.project(project_name)}\n\n")
77
78
 
78
79
  def entities_hijacked(self):
79
80
  self.type(
@@ -202,7 +203,7 @@ class Conversation:
202
203
  time.sleep(1)
203
204
 
204
205
  def project_already_exists(self, project_name):
205
- self.type(f'\nA project called "{project_name}" already exists.\n')
206
+ self.type(f'\nA project named "{project_name}" already exists.\n')
206
207
  self.newline()
207
208
 
208
209
  def prompt_description(self, project_name):
@@ -212,6 +213,13 @@ class Conversation:
212
213
  if len(user_prompt) > 0:
213
214
  return user_prompt
214
215
 
216
+ def prompt_module(self):
217
+ while True:
218
+ self.type("Module Name [a-z0-9] > ")
219
+ user_prompt = input("")
220
+ if re.search("^[a-z0-9]+$", user_prompt):
221
+ return user_prompt
222
+
215
223
  def prompt_project(self):
216
224
  while True:
217
225
  self.type("Project Name [A-Za-z0-9_-] > ")
@@ -25,7 +25,6 @@ __gibson_commands_and_options() {
25
25
  code
26
26
  conf
27
27
  count
28
- create
29
28
  dev
30
29
  forget
31
30
  help
@@ -36,8 +35,6 @@ __gibson_commands_and_options() {
36
35
  modify
37
36
  new
38
37
  openapi
39
- project
40
- question
41
38
  remove
42
39
  rename
43
40
  rewrite
@@ -65,12 +62,12 @@ __gibson_completions() {
65
62
  gibson) __gibson_commands_and_options ;;
66
63
  auth) __gibson_generate_completion "login logout" ;;
67
64
  code) __gibson_generate_completion "entity" ;;
68
- conf) __gibson_generate_completion "api::key code::custom::model::class code::custom::path datastore::uri" ;;
65
+ conf) __gibson_generate_completion "api::key code::custom::model::class code::custom::path datastore::uri datastore::type" ;;
69
66
  dev) __gibson_generate_completion "on off" ;;
70
67
  forget) __gibson_generate_completion "stored last all" ;;
71
68
  import) __gibson_generate_completion "api datastore" ;;
72
69
  list) __gibson_generate_completion "entities" ;;
73
- new) __gibson_generate_completion "project" ;;
70
+ new) __gibson_generate_completion "project module" ;;
74
71
  rewrite) __gibson_generate_completion "api base models schemas tests" ;;
75
72
  # create) __gibson_generate_completion "project module entity" ;;
76
73
  # project) __gibson_generate_completion "create delete list" ;;
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: gibson-cli
3
- Version: 0.5.1
3
+ Version: 0.5.3
4
4
  Summary: Gibson Command Line Interface
5
5
  Author-email: GibsonAI <noc@gibsonai.com>
6
6
  Project-URL: Homepage, https://gibsonai.com/
@@ -169,6 +169,7 @@ More languages and frameworks are in active development. If you do not see a ver
169
169
 
170
170
  ### Configuring Your Datastore
171
171
 
172
+ `gibson conf datastore::type mysql`
172
173
  `gibson conf datastore::uri mysql+pymysql://[user]:[password]@[host]/[database name]`
173
174
 
174
175
  Note: Gibson currently only supports MySQL. Let us know if you need something else.
@@ -21,8 +21,6 @@ gibson/command/List.py
21
21
  gibson/command/Merge.py
22
22
  gibson/command/Model.py
23
23
  gibson/command/Modify.py
24
- gibson/command/Module.py
25
- gibson/command/New.py
26
24
  gibson/command/OpenApi.py
27
25
  gibson/command/Question.py
28
26
  gibson/command/Remove.py
@@ -36,6 +34,9 @@ gibson/command/WarGames.py
36
34
  gibson/command/auth/Auth.py
37
35
  gibson/command/auth/Login.py
38
36
  gibson/command/auth/Logout.py
37
+ gibson/command/new/Module.py
38
+ gibson/command/new/New.py
39
+ gibson/command/new/Project.py
39
40
  gibson/command/rewrite/Api.py
40
41
  gibson/command/rewrite/Base.py
41
42
  gibson/command/rewrite/Models.py
@@ -14,7 +14,7 @@ classifiers = [
14
14
  "Intended Audience :: Developers",
15
15
  "Programming Language :: Python :: 3.9",
16
16
  ]
17
- version = "0.5.1"
17
+ version = "0.5.3"
18
18
 
19
19
  [tool.setuptools.packages.find]
20
20
  where = ["."]
@@ -1,40 +0,0 @@
1
- import re
2
- import sys
3
-
4
- from gibson.api.Cli import Cli
5
- from gibson.command.BaseCommand import BaseCommand
6
- from gibson.core.Colors import command, hint, input, subcommand
7
-
8
-
9
- class Module(BaseCommand):
10
- def execute(self):
11
- if len(sys.argv) != 3:
12
- self.usage()
13
-
14
- self.configuration.ensure_project()
15
- if not re.search("^[a-z0-9]+$", sys.argv[2]):
16
- self.configuration.display_project()
17
- self.conversation.type("[module name] should only contain ^[a-z0-9]+$.\n\n")
18
- return True
19
-
20
- cli = Cli(self.configuration)
21
-
22
- response = cli.modeler_module(
23
- self.configuration.project.modeler.version,
24
- self.configuration.project.description,
25
- sys.argv[2],
26
- )
27
-
28
- self.memory.remember_last(response)
29
-
30
- for entity in response["entities"]:
31
- print(entity["definition"])
32
- self.conversation.newline()
33
-
34
- def usage(self):
35
- self.configuration.display_project()
36
- self.conversation.type(
37
- f"usage: {command(self.configuration.command)} {subcommand('module')} {input('[module name]')} {hint('create a new module for this project')}\n"
38
- )
39
- self.conversation.newline()
40
- exit(1)
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes