gibson-cli 0.5.7__tar.gz → 0.6.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 (128) hide show
  1. {gibson_cli-0.5.7/gibson_cli.egg-info → gibson_cli-0.6.0}/PKG-INFO +1 -1
  2. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/api/Cli.py +1 -0
  3. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/command/Help.py +2 -3
  4. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/command/Show.py +2 -4
  5. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/command/auth/Auth.py +5 -2
  6. gibson_cli-0.6.0/gibson/command/code/Code.py +42 -0
  7. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/command/code/Entity.py +2 -1
  8. {gibson_cli-0.5.7/gibson/command → gibson_cli-0.6.0/gibson/command/code}/Model.py +8 -14
  9. {gibson_cli-0.5.7/gibson/command → gibson_cli-0.6.0/gibson/command/code}/Schema.py +8 -14
  10. gibson_cli-0.5.7/gibson/command/Test.py → gibson_cli-0.6.0/gibson/command/code/Tests.py +8 -14
  11. {gibson_cli-0.5.7/gibson/command → gibson_cli-0.6.0/gibson/command/importer}/Import.py +14 -26
  12. {gibson_cli-0.5.7/gibson/command → gibson_cli-0.6.0/gibson/command/importer}/OpenApi.py +2 -14
  13. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/command/list/List.py +5 -2
  14. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/command/new/New.py +4 -6
  15. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/command/new/Project.py +2 -0
  16. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/command/rewrite/Rewrite.py +2 -1
  17. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/core/Colors.py +24 -0
  18. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/core/CommandRouter.py +3 -17
  19. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/core/Configuration.py +10 -1
  20. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/core/Conversation.py +14 -0
  21. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/core/Memory.py +2 -2
  22. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/core/TimeKeeper.py +3 -1
  23. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/data/bash-completion.tmpl +2 -7
  24. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/display/tests/test_display_WorkspaceHeader.py +1 -1
  25. {gibson_cli-0.5.7 → gibson_cli-0.6.0/gibson_cli.egg-info}/PKG-INFO +1 -1
  26. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson_cli.egg-info/SOURCES.txt +5 -5
  27. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/pyproject.toml +1 -1
  28. gibson_cli-0.5.7/gibson/command/code/Code.py +0 -26
  29. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/.gitignore +0 -0
  30. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/.pre-commit-config.yaml +0 -0
  31. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/README.md +0 -0
  32. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/bin/build.sh +0 -0
  33. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/bin/release.sh +0 -0
  34. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/api/BaseApi.py +0 -0
  35. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/api/ProjectApi.py +0 -0
  36. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/bin/gibson.py +0 -0
  37. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/command/BaseCommand.py +0 -0
  38. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/command/Build.py +0 -0
  39. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/command/Conf.py +0 -0
  40. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/command/Count.py +0 -0
  41. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/command/Dev.py +0 -0
  42. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/command/Forget.py +0 -0
  43. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/command/Merge.py +0 -0
  44. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/command/Modify.py +0 -0
  45. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/command/Question.py +0 -0
  46. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/command/Remove.py +0 -0
  47. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/command/Tree.py +0 -0
  48. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/command/Version.py +0 -0
  49. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/command/WarGames.py +0 -0
  50. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/command/auth/Login.py +0 -0
  51. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/command/auth/Logout.py +0 -0
  52. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/command/list/Entities.py +0 -0
  53. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/command/list/Projects.py +0 -0
  54. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/command/new/Module.py +0 -0
  55. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/command/rename/Entity.py +0 -0
  56. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/command/rename/Rename.py +0 -0
  57. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/command/rewrite/Api.py +0 -0
  58. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/command/rewrite/Base.py +0 -0
  59. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/command/rewrite/Models.py +0 -0
  60. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/command/rewrite/Schemas.py +0 -0
  61. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/command/rewrite/Tests.py +0 -0
  62. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/command/tests/test_command_BaseCommand.py +0 -0
  63. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/command/tests/test_command_Conf.py +0 -0
  64. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/conf/Api.py +0 -0
  65. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/conf/Code.py +0 -0
  66. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/conf/Custom.py +0 -0
  67. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/conf/Datastore.py +0 -0
  68. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/conf/Dependencies.py +0 -0
  69. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/conf/Dev.py +0 -0
  70. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/conf/Frameworks.py +0 -0
  71. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/conf/Modeler.py +0 -0
  72. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/conf/Paths.py +0 -0
  73. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/conf/Platform.py +0 -0
  74. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/conf/Project.py +0 -0
  75. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/conf/Version.py +0 -0
  76. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/conf/dev/Api.py +0 -0
  77. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/conf/dev/Base.py +0 -0
  78. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/conf/dev/Model.py +0 -0
  79. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/conf/dev/Schema.py +0 -0
  80. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/conf/tests/test_conf_Dependencies.py +0 -0
  81. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/conf/tests/test_conf_Platform.py +0 -0
  82. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/core/Completions.py +0 -0
  83. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/core/Env.py +0 -0
  84. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/core/PythonPath.py +0 -0
  85. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/core/utils.py +0 -0
  86. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/data/default-ref-table.tmpl +0 -0
  87. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/data/default-table.tmpl +0 -0
  88. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/db/TableExceptions.py +0 -0
  89. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/db/tests/test_db_TableExceptions.py +0 -0
  90. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/dev/Dev.py +0 -0
  91. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/display/Header.py +0 -0
  92. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/display/WorkspaceFooter.py +0 -0
  93. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/display/WorkspaceHeader.py +0 -0
  94. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/display/tests/test_display_Header.py +0 -0
  95. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/display/tests/test_display_WorkspaceFooter.py +0 -0
  96. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/lang/Python.py +0 -0
  97. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/lang/tests/test_lang_Python.py +0 -0
  98. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/services/auth/Server.py +0 -0
  99. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/services/code/context/schema/DataDictionary.py +0 -0
  100. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/services/code/context/schema/EntityKeys.py +0 -0
  101. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/services/code/context/schema/Manager.py +0 -0
  102. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/services/code/context/schema/tests/test_code_context_schema_DataDictionary.py +0 -0
  103. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/services/code/context/schema/tests/test_code_context_schema_EntityKeys.py +0 -0
  104. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/services/code/context/schema/tests/test_code_context_schema_Manager.py +0 -0
  105. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/services/code/customization/Authenticator.py +0 -0
  106. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/services/code/customization/BaseCustomization.py +0 -0
  107. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/services/code/customization/CustomizationManager.py +0 -0
  108. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/services/code/customization/Index.py +0 -0
  109. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/services/code/customization/tests/test_code_customization_Authenticator.py +0 -0
  110. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/services/code/customization/tests/test_code_customization_BaseCustomization.py +0 -0
  111. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/structure/Entity.py +0 -0
  112. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/structure/constraints/ReferenceConstraint.py +0 -0
  113. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/structure/keys/ForeignKey.py +0 -0
  114. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/structure/keys/Index.py +0 -0
  115. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/structure/keys/IndexAttribute.py +0 -0
  116. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/structure/keys/tests/test_ForeignKey.py +0 -0
  117. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/structure/keys/tests/test_Index.py +0 -0
  118. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/structure/keys/tests/test_IndexAttribute.py +0 -0
  119. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/structure/testing.py +0 -0
  120. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/structure/tests/test_Entity.py +0 -0
  121. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/tests/test_Env.py +0 -0
  122. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/tests/test_Memory.py +0 -0
  123. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson/tests/test_utils.py +0 -0
  124. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson_cli.egg-info/dependency_links.txt +0 -0
  125. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson_cli.egg-info/entry_points.txt +0 -0
  126. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/gibson_cli.egg-info/top_level.txt +0 -0
  127. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/requirements.txt +0 -0
  128. {gibson_cli-0.5.7 → gibson_cli-0.6.0}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: gibson-cli
3
- Version: 0.5.7
3
+ Version: 0.6.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,6 +11,7 @@ class Cli(BaseApi):
11
11
  self.configuration = configuration
12
12
  self.configuration.require_login()
13
13
  self.configuration.require_project()
14
+ self.configuration.require_project_key()
14
15
 
15
16
  def code_api(self):
16
17
  return self.post(
@@ -37,7 +37,7 @@ class Help(BaseCommand):
37
37
  },
38
38
  "help": {"description": "for help", "memory": None},
39
39
  "import": {
40
- "description": "configure from a data source",
40
+ "description": "import entities from a data source",
41
41
  "memory": "stored",
42
42
  },
43
43
  "list": {
@@ -57,7 +57,6 @@ class Help(BaseCommand):
57
57
  "memory": "last > stored",
58
58
  },
59
59
  "new": {"description": "create something new", "memory": None},
60
- "openapi": {"description": "build from an OpenAPI spec", "memory": "last"},
61
60
  "remove": {
62
61
  "description": "remove an entity from the project",
63
62
  "memory": "last > stored",
@@ -80,7 +79,7 @@ class Help(BaseCommand):
80
79
  "memory": "stored",
81
80
  },
82
81
  "tree": {"description": "illustrate the project layout", "memory": None},
83
- "? | q": {"description": "ask a question", "memory": None},
82
+ "q": {"description": "ask Gibson a question", "memory": None},
84
83
  }
85
84
 
86
85
  self.conversation.set_delay(0.001)
@@ -26,9 +26,7 @@ class Show(BaseCommand):
26
26
  self.usage()
27
27
 
28
28
  for entity in sorted(entities, key=lambda x: x["name"]):
29
- statement = entity["definition"].replace(
30
- entity["name"], Colors.argument(entity["name"]), 1
31
- )
29
+ statement = Colors.table(entity["definition"], entity["name"])
32
30
  print(f"\n{statement}")
33
31
 
34
32
  def usage(self):
@@ -37,7 +35,7 @@ class Show(BaseCommand):
37
35
  f"usage: {Colors.command(self.configuration.command)} {Colors.subcommand('show')} {Colors.hint('display the entire schema')}\n"
38
36
  )
39
37
  self.conversation.type(
40
- f" or: {Colors.command(self.configuration.command)} {Colors.subcommand('show')} {Colors.argument('[entity name]')} {Colors.hint('display the schema for an entity')}\n"
38
+ f" {Colors.command(self.configuration.command)} {Colors.subcommand('show')} {Colors.argument('[entity name]')} {Colors.hint('display the schema for an entity')}\n"
41
39
  )
42
40
  self.conversation.newline()
43
41
  exit(1)
@@ -20,10 +20,13 @@ class Auth(BaseCommand):
20
20
  def usage(self):
21
21
  self.configuration.display_project()
22
22
  self.conversation.type(
23
- f"usage: {Colors.command(self.configuration.command)} {Colors.subcommand('auth')} {Colors.argument('login')} {Colors.hint('login to Gibson')}\n"
23
+ f"usage: {Colors.command(self.configuration.command)} {Colors.subcommand('auth')} {Colors.arguments(['login', 'logout'])}\n"
24
24
  )
25
25
  self.conversation.type(
26
- f" or: {Colors.command(self.configuration.command)} {Colors.subcommand('auth')} {Colors.argument('logout')} {Colors.hint('logout of Gibson')}\n"
26
+ f" {Colors.command(self.configuration.command)} {Colors.subcommand('auth')} {Colors.argument('login')} {Colors.hint('login to Gibson')}\n"
27
+ )
28
+ self.conversation.type(
29
+ f" {Colors.command(self.configuration.command)} {Colors.subcommand('auth')} {Colors.argument('logout')} {Colors.hint('logout of Gibson')}\n"
27
30
  )
28
31
  self.conversation.newline()
29
32
  exit(1)
@@ -0,0 +1,42 @@
1
+ import sys
2
+
3
+ import gibson.core.Colors as Colors
4
+ from gibson.command.BaseCommand import BaseCommand
5
+ from gibson.command.code.Entity import CodeEntity
6
+ from gibson.command.code.Model import CodeModel
7
+ from gibson.command.code.Schema import CodeSchema
8
+ from gibson.command.code.Tests import CodeTests
9
+
10
+
11
+ class Code(BaseCommand):
12
+ def execute(self):
13
+ if len(sys.argv) == 4 and sys.argv[2] == "entity":
14
+ CodeEntity(self.configuration).execute()
15
+ elif len(sys.argv) == 4 and sys.argv[2] == "model":
16
+ CodeModel(self.configuration).execute()
17
+ elif len(sys.argv) == 4 and sys.argv[2] == "schema":
18
+ CodeSchema(self.configuration).execute()
19
+ elif len(sys.argv) == 4 and sys.argv[2] == "tests":
20
+ CodeTests(self.configuration).execute()
21
+ else:
22
+ self.usage()
23
+
24
+ def usage(self):
25
+ self.configuration.display_project()
26
+ self.conversation.type(
27
+ f"usage: {Colors.command(self.configuration.command)} {Colors.subcommand('code')} {Colors.arguments(['entity', 'model', 'schema', 'tests'])} {Colors.input('[entity name]')} {Colors.hint('write code')}\n"
28
+ )
29
+ self.conversation.type(
30
+ f" {Colors.command(self.configuration.command)} {Colors.subcommand('code')} {Colors.argument('entity')} {Colors.input('[entity name]')} {Colors.hint('create or update an entity using the AI pair programmer')}\n"
31
+ )
32
+ self.conversation.type(
33
+ f" {Colors.command(self.configuration.command)} {Colors.subcommand('code')} {Colors.argument('model')} {Colors.input('[entity name]')} {Colors.hint('generate the model code for an entity')}\n"
34
+ )
35
+ self.conversation.type(
36
+ f" {Colors.command(self.configuration.command)} {Colors.subcommand('code')} {Colors.argument('schema')} {Colors.input('[entity name]')} {Colors.hint('generate the schema code for an entity')}\n"
37
+ )
38
+ self.conversation.type(
39
+ f" {Colors.command(self.configuration.command)} {Colors.subcommand('code')} {Colors.argument('tests')} {Colors.input('[entity name]')} {Colors.hint('generate the unit tests for an entity')}\n"
40
+ )
41
+ self.conversation.newline()
42
+ exit(1)
@@ -2,6 +2,7 @@ import os
2
2
  import sys
3
3
  from string import Template
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
8
  from gibson.command.Merge import Merge
@@ -163,7 +164,7 @@ class CodeEntity(BaseCommand):
163
164
  print("")
164
165
  print(Header().render("SQL"))
165
166
  print("")
166
- print(entity.create_statement())
167
+ print(Colors.table(entity.create_statement(), entity.name))
167
168
 
168
169
  print("")
169
170
  print(Header().render("Model"))
@@ -7,16 +7,13 @@ from gibson.core.TimeKeeper import TimeKeeper
7
7
  from gibson.dev.Dev import Dev
8
8
 
9
9
 
10
- class Model(BaseCommand):
10
+ class CodeModel(BaseCommand):
11
11
  def execute(self):
12
- if len(sys.argv) != 3:
13
- self.usage()
14
-
15
12
  self.configuration.require_project()
16
- entity = self.memory.recall_stored_entity(sys.argv[2])
13
+ entity = self.memory.recall_stored_entity(sys.argv[3])
17
14
  if entity is None:
18
15
  self.conversation.not_sure_no_entity(
19
- self.configuration.project.name, sys.argv[2]
16
+ self.configuration.project.name, sys.argv[3]
20
17
  )
21
18
  exit(1)
22
19
 
@@ -29,13 +26,10 @@ class Model(BaseCommand):
29
26
  response["code"][0]["entity"]["name"], response["code"][0]["definition"]
30
27
  )
31
28
 
29
+ if self.configuration.project.dev.active is True:
30
+ self.conversation.type(
31
+ f"Gibson wrote the following {Colors.argument('model')} code to your project:\n"
32
+ )
33
+
32
34
  print(response["code"][0]["definition"])
33
35
  time_keeper.display()
34
-
35
- def usage(self):
36
- self.configuration.display_project()
37
- self.conversation.type(
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
- )
40
- self.conversation.newline()
41
- exit(1)
@@ -7,16 +7,13 @@ from gibson.core.TimeKeeper import TimeKeeper
7
7
  from gibson.dev.Dev import Dev
8
8
 
9
9
 
10
- class Schema(BaseCommand):
10
+ class CodeSchema(BaseCommand):
11
11
  def execute(self):
12
- if len(sys.argv) != 3:
13
- self.usage()
14
-
15
12
  self.configuration.require_project()
16
- entity = self.memory.recall_stored_entity(sys.argv[2])
13
+ entity = self.memory.recall_stored_entity(sys.argv[3])
17
14
  if entity is None:
18
15
  self.conversation.not_sure_no_entity(
19
- self.configuration.project.name, sys.argv[2]
16
+ self.configuration.project.name, sys.argv[3]
20
17
  )
21
18
  exit(1)
22
19
 
@@ -29,13 +26,10 @@ class Schema(BaseCommand):
29
26
  response["code"][0]["entity"]["name"], response["code"][0]["definition"]
30
27
  )
31
28
 
29
+ if self.configuration.project.dev.active is True:
30
+ self.conversation.type(
31
+ f"Gibson wrote the following {Colors.argument('schema')} code to your project:\n"
32
+ )
33
+
32
34
  print(response["code"][0]["definition"])
33
35
  time_keeper.display()
34
-
35
- def usage(self):
36
- self.configuration.display_project()
37
- self.conversation.type(
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
- )
40
- self.conversation.newline()
41
- exit(1)
@@ -7,16 +7,13 @@ from gibson.core.TimeKeeper import TimeKeeper
7
7
  from gibson.dev.Dev import Dev
8
8
 
9
9
 
10
- class Test(BaseCommand):
10
+ class CodeTests(BaseCommand):
11
11
  def execute(self):
12
- if len(sys.argv) != 3:
13
- self.usage()
14
-
15
12
  self.configuration.require_project()
16
- entity = self.memory.recall_stored_entity(sys.argv[2])
13
+ entity = self.memory.recall_stored_entity(sys.argv[3])
17
14
  if entity is None:
18
15
  self.conversation.not_sure_no_entity(
19
- self.configuration.project.name, sys.argv[2]
16
+ self.configuration.project.name, sys.argv[3]
20
17
  )
21
18
  exit(1)
22
19
 
@@ -29,13 +26,10 @@ class Test(BaseCommand):
29
26
  response["code"][0]["entity"]["name"], response["code"][0]["definition"]
30
27
  )
31
28
 
29
+ if self.configuration.project.dev.active is True:
30
+ self.conversation.type(
31
+ f"Gibson wrote the following {Colors.argument('tests')} to your project:\n"
32
+ )
33
+
32
34
  print(response["code"][0]["definition"])
33
35
  time_keeper.display()
34
-
35
- def usage(self):
36
- self.configuration.display_project()
37
- self.conversation.type(
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
- )
40
- self.conversation.newline()
41
- exit(1)
@@ -6,44 +6,30 @@ from sqlalchemy.orm import sessionmaker
6
6
  import gibson.core.Colors as Colors
7
7
  from gibson.api.Cli import Cli
8
8
  from gibson.command.BaseCommand import BaseCommand
9
+ from gibson.command.importer.OpenApi import OpenApi
9
10
  from gibson.command.rewrite.Rewrite import Rewrite
10
11
  from gibson.db.TableExceptions import TableExceptions
11
12
 
12
13
 
13
14
  class Import(BaseCommand):
14
15
  def execute(self):
15
- if len(sys.argv) != 3 and len(sys.argv) != 5:
16
- self.usage()
17
-
18
16
  self.configuration.require_project()
19
17
  write_code = False
20
- if len(sys.argv) == 5:
21
- if sys.argv[3] != ".." or sys.argv[4] != "dev":
22
- self.usage()
23
-
24
- if self.configuration.project.dev.active is False:
25
- self.configuration.display_project()
26
- self.conversation.type(
27
- "Dude, seriously?! You have Dev Mode turned off. "
28
- + "Why would you do that?\n"
29
- )
30
- self.conversation.newline()
31
- exit(1)
32
-
33
- write_code = True
34
18
 
35
- if sys.argv[2] == "api":
19
+ if len(sys.argv) == 3 and sys.argv[2] == "api":
36
20
  entities = self.__import_from_api()
37
- elif sys.argv[2] == "datastore":
21
+ write_code = self.configuration.project.dev.active
22
+ elif len(sys.argv) == 3 and sys.argv[2] == "datastore":
38
23
  entities = self.__import_from_datastore()
24
+ write_code = self.configuration.project.dev.active
25
+ elif len(sys.argv) == 4 and sys.argv[2] == "openapi":
26
+ return OpenApi(self.configuration).execute()
39
27
  else:
40
28
  self.usage()
41
29
 
42
30
  self.memory.remember_entities(entities)
43
31
 
44
- word_entities = "entities"
45
- if len(entities) == 1:
46
- word_entities = "entity"
32
+ word_entities = "entity" if len(entities) == 1 else "entities"
47
33
 
48
34
  self.conversation.type("\nSummary\n")
49
35
  self.conversation.type(f" {len(entities)} {word_entities} imported\n")
@@ -62,7 +48,6 @@ class Import(BaseCommand):
62
48
  response = Cli(self.configuration).import_()
63
49
  self.conversation.type("Building schema...\n")
64
50
 
65
- entities = []
66
51
  for entity in response["project"]["entities"]:
67
52
  self.conversation.type(f" {entity['name']}\n", delay=0.002)
68
53
 
@@ -106,13 +91,16 @@ class Import(BaseCommand):
106
91
  else ""
107
92
  )
108
93
  self.conversation.type(
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"
94
+ f"usage: {Colors.command(self.configuration.command)} {Colors.subcommand('import')} {Colors.arguments(['api', 'datastore', 'openapi'])} {Colors.hint('import entities')}\n"
95
+ )
96
+ self.conversation.type(
97
+ f" {Colors.command(self.configuration.command)} {Colors.subcommand('import')} {Colors.argument('api')} {Colors.hint(f'import all entities from your project created on {Colors.link(self.configuration.app_domain())}')}\n"
110
98
  )
111
99
  self.conversation.type(
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"
100
+ f" {Colors.command(self.configuration.command)} {Colors.subcommand('import')} {Colors.argument('datastore')} {Colors.hint('import all entities from your local datastore')} {Colors.link(datastore_uri)}\n"
113
101
  )
114
102
  self.conversation.type(
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"
103
+ f" {Colors.command(self.configuration.command)} {Colors.subcommand('import')} {Colors.argument('openapi')} {Colors.input('path/to/openapi.json')} {Colors.hint('import all entities from an OpenAPI spec file')}\n"
116
104
  )
117
105
  self.conversation.newline()
118
106
  exit(1)
@@ -2,7 +2,6 @@ import json
2
2
  import re
3
3
  import sys
4
4
 
5
- import gibson.core.Colors as Colors
6
5
  from gibson.api.Cli import Cli
7
6
  from gibson.command.BaseCommand import BaseCommand
8
7
 
@@ -17,11 +16,8 @@ class OpenApi(BaseCommand):
17
16
  exit(1)
18
17
 
19
18
  def execute(self):
20
- if len(sys.argv) != 3:
21
- self.usage()
22
-
23
19
  try:
24
- with open(sys.argv[2], "r") as f:
20
+ with open(sys.argv[3], "r") as f:
25
21
  contents = json.loads(f.read())
26
22
  except FileNotFoundError:
27
23
  self.file_not_found()
@@ -119,7 +115,7 @@ class OpenApi(BaseCommand):
119
115
  def file_not_found(self):
120
116
  self.configuration.display_project()
121
117
  self.conversation.type(
122
- f'Well that embarrassing. There is no file "{sys.argv[2]}".\n'
118
+ f'Well that embarrassing. There is no file "{sys.argv[3]}".\n'
123
119
  )
124
120
  self.conversation.newline()
125
121
  exit(1)
@@ -131,11 +127,3 @@ class OpenApi(BaseCommand):
131
127
  )
132
128
  self.conversation.newline()
133
129
  exit(1)
134
-
135
- def usage(self):
136
- self.configuration.display_project()
137
- self.conversation.type(
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
- )
140
- self.conversation.newline()
141
- exit(1)
@@ -18,10 +18,13 @@ class List(BaseCommand):
18
18
  def usage(self):
19
19
  self.configuration.display_project()
20
20
  self.conversation.type(
21
- f"usage: {Colors.command(self.configuration.command)} {Colors.subcommand('list')} {Colors.arguments(['entities'])} {Colors.hint('list all entities')}\n"
21
+ f"usage: {Colors.command(self.configuration.command)} {Colors.subcommand('list')} {Colors.arguments(['entities', 'projects'])}\n"
22
22
  )
23
23
  self.conversation.type(
24
- f" or: {Colors.command(self.configuration.command)} {Colors.subcommand('list')} {Colors.arguments(['projects'])} {Colors.hint('list all projects')}\n"
24
+ f" {Colors.command(self.configuration.command)} {Colors.subcommand('list')} {Colors.argument('entities')} {Colors.hint('list all entities')}\n"
25
+ )
26
+ self.conversation.type(
27
+ f" {Colors.command(self.configuration.command)} {Colors.subcommand('list')} {Colors.argument('projects')} {Colors.hint('list all projects')}\n"
25
28
  )
26
29
  self.conversation.newline()
27
30
  exit(1)
@@ -9,13 +9,11 @@ from gibson.command.new.Project import NewProject
9
9
 
10
10
  class New(BaseCommand):
11
11
  def execute(self):
12
- if not len(sys.argv) >= 3:
13
- self.usage()
14
- elif sys.argv[2] == "project":
12
+ if len(sys.argv) == 3 and sys.argv[2] == "project":
15
13
  NewProject(self.configuration).execute()
16
- elif sys.argv[2] == "module":
14
+ elif len(sys.argv) == 3 and sys.argv[2] == "module":
17
15
  NewModule(self.configuration).execute()
18
- elif sys.argv[2] == "entity":
16
+ elif len(sys.argv) == 4 and sys.argv[2] == "entity":
19
17
  CodeEntity(self.configuration).execute()
20
18
  else:
21
19
  self.usage()
@@ -32,7 +30,7 @@ class New(BaseCommand):
32
30
  f" {Colors.command(self.configuration.command)} {Colors.subcommand('new')} {Colors.argument('module')} {Colors.hint('create a new module')}\n"
33
31
  )
34
32
  self.conversation.type(
35
- f" {Colors.command(self.configuration.command)} {Colors.subcommand('new')} {Colors.argument('entity')} {Colors.hint('create a new entity')}\n"
33
+ f" {Colors.command(self.configuration.command)} {Colors.subcommand('new')} {Colors.argument('entity')} {Colors.input('[entity name]')} {Colors.hint('create a new entity')}\n"
36
34
  )
37
35
  self.conversation.newline()
38
36
  exit(1)
@@ -13,5 +13,7 @@ class NewProject(BaseCommand):
13
13
 
14
14
  self.configuration.set_project_env(project_name)
15
15
  self.configuration.append_project_to_conf(project_name, project_description)
16
+ self.configuration.setup_project()
17
+ self.configuration.create_project_memory()
16
18
 
17
19
  self.conversation.configure_new_project(self.configuration)
@@ -38,6 +38,7 @@ class Rewrite(BaseCommand):
38
38
 
39
39
  def write(self, argument=None):
40
40
  self.configuration.require_project()
41
+ self.configuration.require_project_key()
41
42
 
42
43
  if len(self.memory.recall_merged()) == 0:
43
44
  self.conversation.cant_no_entities(self.configuration.project.name)
@@ -120,7 +121,7 @@ class Rewrite(BaseCommand):
120
121
  f"usage: {Colors.command(self.configuration.command)} {Colors.subcommand('rewrite')} {Colors.hint('rewrite all code')}\n"
121
122
  )
122
123
  self.conversation.type(
123
- f" or: {Colors.command(self.configuration.command)} {Colors.subcommand('rewrite')} {Colors.arguments(self.arguments)} {Colors.hint('rewrite only the specified code')}\n"
124
+ f" {Colors.command(self.configuration.command)} {Colors.subcommand('rewrite')} {Colors.arguments(self.arguments)} {Colors.hint('rewrite only the specified code')}\n"
124
125
  )
125
126
  self.conversation.newline()
126
127
  exit(1)
@@ -40,37 +40,61 @@ class Color:
40
40
  YELLOW2 = "\033[93m"
41
41
 
42
42
 
43
+ # Colorize text with a given color
43
44
  def colorize(text, color):
44
45
  return f"{color}{text}{Color.END}"
45
46
 
46
47
 
48
+ # Colorize a command
47
49
  def command(text):
48
50
  return colorize(text, Color.GREEN)
49
51
 
50
52
 
53
+ # Colorize a subcommand
51
54
  def subcommand(text):
52
55
  return colorize(text, Color.YELLOW)
53
56
 
54
57
 
58
+ # Colorize an argument
55
59
  def argument(text):
56
60
  return colorize(text, Color.VIOLET)
57
61
 
58
62
 
63
+ # Colorize a list of arguments
59
64
  def arguments(list):
60
65
  return f"[{'|'.join(map(lambda x: argument(x), list))}]"
61
66
 
62
67
 
68
+ # Colorize user input
63
69
  def input(text):
64
70
  return colorize(text, Color.WHITE2)
65
71
 
66
72
 
73
+ # Colorize a command option
67
74
  def option(text):
68
75
  return colorize(text, Color.CYAN)
69
76
 
70
77
 
78
+ # Colorize a hint
71
79
  def hint(text):
72
80
  return colorize(text, Color.GREY)
73
81
 
74
82
 
83
+ # Colorize a project name
75
84
  def project(text):
76
85
  return colorize(text, Color.BOLD)
86
+
87
+
88
+ # Colorize a URL to appear as a link
89
+ def link(text):
90
+ return colorize(colorize(text, Color.BLUE), Color.UNDERLINE)
91
+
92
+
93
+ # Colorize the table name in a SQL statement
94
+ def table(sql, name):
95
+ return sql.replace(name, colorize(name, Color.VIOLET))
96
+
97
+
98
+ # Colorize a time/duration output
99
+ def time(text):
100
+ return colorize(text, Color.GREEN)
@@ -8,20 +8,16 @@ from gibson.command.Count import Count
8
8
  from gibson.command.Dev import Dev
9
9
  from gibson.command.Forget import Forget
10
10
  from gibson.command.Help import Help
11
- from gibson.command.Import import Import
11
+ from gibson.command.importer.Import import Import
12
12
  from gibson.command.list.List import List
13
13
  from gibson.command.Merge import Merge
14
- from gibson.command.Model import Model
15
14
  from gibson.command.Modify import Modify
16
15
  from gibson.command.new.New import New
17
- from gibson.command.OpenApi import OpenApi
18
16
  from gibson.command.Question import Question
19
17
  from gibson.command.Remove import Remove
20
18
  from gibson.command.rename.Rename import Rename
21
19
  from gibson.command.rewrite.Rewrite import Rewrite
22
- from gibson.command.Schema import Schema
23
20
  from gibson.command.Show import Show
24
- from gibson.command.Test import Test
25
21
  from gibson.command.Tree import Tree
26
22
  from gibson.command.Version import Version
27
23
  from gibson.command.WarGames import WarGames
@@ -65,34 +61,24 @@ class CommandRouter:
65
61
  command = List(self.configuration)
66
62
  elif sys.argv[1] == "merge":
67
63
  command = Merge(self.configuration)
68
- elif sys.argv[1] == "model":
69
- command = Model(self.configuration)
70
64
  elif sys.argv[1] == "modify":
71
65
  command = Modify(self.configuration)
72
66
  elif sys.argv[1] == "new":
73
67
  command = New(self.configuration)
74
- elif sys.argv[1] == "openapi":
75
- command = OpenApi(self.configuration)
76
68
  elif sys.argv[1] == "remove":
77
69
  command = Remove(self.configuration)
78
70
  elif sys.argv[1] == "rename":
79
71
  command = Rename(self.configuration)
80
72
  elif sys.argv[1] == "rewrite":
81
73
  command = Rewrite(self.configuration, with_header=True)
82
- elif sys.argv[1] == "schema":
83
- command = Schema(self.configuration)
84
74
  elif sys.argv[1] == "show":
85
75
  command = Show(self.configuration)
86
- elif sys.argv[1] == "test":
87
- command = Test(self.configuration)
88
76
  elif sys.argv[1] == "tree":
89
77
  command = Tree(self.configuration)
90
- elif sys.argv[1] in ["?", "q"]:
78
+ elif sys.argv[1] in ["q"]:
91
79
  command = Question(self.configuration)
92
- elif sys.argv[1] in ["--version", "-v"]:
80
+ elif sys.argv[1] in ["version", "--version", "-v"]:
93
81
  command = Version(self.configuration)
94
- else:
95
- command = WarGames(self.configuration)
96
82
 
97
83
  if command is None or command.execute() is False:
98
84
  Help(self.configuration).execute()
@@ -301,6 +301,8 @@ class Configuration:
301
301
  self.conversation.pause()
302
302
 
303
303
  section = self.append_project_to_conf(project_name, project_description)
304
+ self.set_project_env(project_name)
305
+ self.setup_project()
304
306
  self.create_project_memory()
305
307
 
306
308
  self.conversation.message_configuration_added(self.paths.config, section)
@@ -365,6 +367,13 @@ class Configuration:
365
367
 
366
368
  return self
367
369
 
370
+ def require_project_key(self):
371
+ if not self.project.api.key or self.project.api.key == "FIXME":
372
+ self.conversation.project_api_key_not_set(self.app_domain())
373
+ exit(1)
374
+
375
+ return self
376
+
368
377
  def set_auth_tokens(self, access_token, refresh_token):
369
378
  try:
370
379
  os.mkdir(self.paths.auth)
@@ -397,7 +406,7 @@ class Configuration:
397
406
  config = list(self.settings.values())[0]
398
407
  self.project = Project()
399
408
  self.project.name = list(self.settings.keys())[0]
400
- else:
409
+ elif self.settings is not None:
401
410
  gibsonai_project = os.environ.get("GIBSONAI_PROJECT")
402
411
  if gibsonai_project is None:
403
412
  # TODO: traverse fs and attempt to find a .gibsonai/config file to use
@@ -213,6 +213,20 @@ class Conversation:
213
213
  self.type(f'\nA project named "{project_name}" already exists.\n')
214
214
  self.newline()
215
215
 
216
+ def project_api_key_not_set(self, domain):
217
+ self.type(
218
+ f"\nYou have not set the API key for your project. Please set the API key by executing:\n"
219
+ )
220
+ self.newline()
221
+ self.type(
222
+ f"{Colors.command('gibson')} {Colors.subcommand('conf')} {Colors.argument('api::key')} {Colors.input('[API key]')}\n"
223
+ )
224
+ self.newline()
225
+ self.type(
226
+ f"If you don't have an API key, you can get one by creating a new project at {Colors.link(domain + '/chat')}\n"
227
+ )
228
+ self.newline()
229
+
216
230
  def prompt_description(self, project_name):
217
231
  while True:
218
232
  self.type(f"Tell me about {project_name}. Don't be shy > ")
@@ -71,7 +71,7 @@ class Memory:
71
71
  def recall_last_entity(self, name):
72
72
  if self.last is not None:
73
73
  for entity in self.last["entities"]:
74
- if entity["name"] == name:
74
+ if entity["name"].lower() == name.lower():
75
75
  return entity
76
76
  return None
77
77
 
@@ -98,7 +98,7 @@ class Memory:
98
98
  def recall_stored_entity(self, name):
99
99
  if self.entities is not None:
100
100
  for entity in self.entities:
101
- if entity["name"] == name:
101
+ if entity["name"].lower() == name.lower():
102
102
  return entity
103
103
 
104
104
  return None
@@ -1,5 +1,7 @@
1
1
  import time
2
2
 
3
+ import gibson.core.Colors as Colors
4
+
3
5
 
4
6
  class TimeKeeper:
5
7
  def __init__(self):
@@ -9,4 +11,4 @@ class TimeKeeper:
9
11
  print(self.get_display() + "\n")
10
12
 
11
13
  def get_display(self):
12
- return "[%ss]" % str(time.time() - self.__started)[0:7]
14
+ return Colors.time("[%ss]" % str(time.time() - self.__started)[0:7])
@@ -31,16 +31,12 @@ __gibson_commands_and_options() {
31
31
  import
32
32
  list
33
33
  merge
34
- model
35
34
  modify
36
35
  new
37
- openapi
38
36
  remove
39
37
  rename
40
38
  rewrite
41
- schema
42
39
  show
43
- test
44
40
  tree
45
41
  q
46
42
  '
@@ -61,16 +57,15 @@ __gibson_completions() {
61
57
  case "${previous_word}" in
62
58
  gibson) __gibson_commands_and_options ;;
63
59
  auth) __gibson_generate_completion "login logout" ;;
64
- code) __gibson_generate_completion "entity" ;;
60
+ code) __gibson_generate_completion "entity model schema tests" ;;
65
61
  conf) __gibson_generate_completion "api::key code::custom::model::class code::custom::path datastore::uri datastore::type" ;;
66
62
  dev) __gibson_generate_completion "on off" ;;
67
63
  forget) __gibson_generate_completion "stored last all" ;;
68
- import) __gibson_generate_completion "api datastore" ;;
64
+ import) __gibson_generate_completion "api datastore openapi" ;;
69
65
  list) __gibson_generate_completion "entities projects" ;;
70
66
  new) __gibson_generate_completion "project module entity" ;;
71
67
  rename) __gibson_generate_completion "entity" ;;
72
68
  rewrite) __gibson_generate_completion "api base models schemas tests" ;;
73
- # project) __gibson_generate_completion "create delete list" ;;
74
69
  esac
75
70
 
76
71
  return 0
@@ -3,6 +3,6 @@ from gibson.display.WorkspaceHeader import WorkspaceHeader
3
3
 
4
4
  def test_render():
5
5
  assert WorkspaceHeader().render("abc def ghi") == (
6
- """Workspace abc def ghi [CONTEXT LOADED]
6
+ """Project abc def ghi [PAIR PROGRAMMER]
7
7
  ==============================================================================="""
8
8
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: gibson-cli
3
- Version: 0.5.7
3
+ Version: 0.6.0
4
4
  Summary: Gibson Command Line Interface
5
5
  Author-email: GibsonAI <noc@gibsonai.com>
6
6
  Project-URL: Homepage, https://gibsonai.com/
@@ -16,16 +16,11 @@ gibson/command/Count.py
16
16
  gibson/command/Dev.py
17
17
  gibson/command/Forget.py
18
18
  gibson/command/Help.py
19
- gibson/command/Import.py
20
19
  gibson/command/Merge.py
21
- gibson/command/Model.py
22
20
  gibson/command/Modify.py
23
- gibson/command/OpenApi.py
24
21
  gibson/command/Question.py
25
22
  gibson/command/Remove.py
26
- gibson/command/Schema.py
27
23
  gibson/command/Show.py
28
- gibson/command/Test.py
29
24
  gibson/command/Tree.py
30
25
  gibson/command/Version.py
31
26
  gibson/command/WarGames.py
@@ -34,6 +29,11 @@ gibson/command/auth/Login.py
34
29
  gibson/command/auth/Logout.py
35
30
  gibson/command/code/Code.py
36
31
  gibson/command/code/Entity.py
32
+ gibson/command/code/Model.py
33
+ gibson/command/code/Schema.py
34
+ gibson/command/code/Tests.py
35
+ gibson/command/importer/Import.py
36
+ gibson/command/importer/OpenApi.py
37
37
  gibson/command/list/Entities.py
38
38
  gibson/command/list/List.py
39
39
  gibson/command/list/Projects.py
@@ -14,7 +14,7 @@ classifiers = [
14
14
  "Intended Audience :: Developers",
15
15
  "Programming Language :: Python :: 3.9",
16
16
  ]
17
- version = "0.5.7"
17
+ version = "0.6.0"
18
18
 
19
19
  [tool.setuptools.packages.find]
20
20
  where = ["."]
@@ -1,26 +0,0 @@
1
- import sys
2
-
3
- import gibson.core.Colors as Colors
4
- from gibson.command.BaseCommand import BaseCommand
5
- from gibson.command.code.Entity import CodeEntity
6
-
7
-
8
- class Code(BaseCommand):
9
- def execute(self):
10
- if len(sys.argv) == 4 and sys.argv[2] == "entity":
11
- CodeEntity(self.configuration).execute()
12
- else:
13
- self.usage()
14
-
15
- def usage(self):
16
- self.configuration.display_project()
17
- self.conversation.type(
18
- f"usage: {Colors.command(self.configuration.command)} {Colors.subcommand('code')} {Colors.argument('entity')} {Colors.input('[entity name]')} {Colors.hint('create a new entity')}\n"
19
- )
20
- self.conversation.newline()
21
- self.conversation.type(
22
- ' To create a new entity named "user":\n'
23
- f" {Colors.command(self.configuration.command)} {Colors.subcommand('code')} {Colors.argument('entity')} {Colors.input('user')}\n"
24
- )
25
- self.conversation.newline()
26
- exit(1)
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes