gibson-cli 0.5.2__py3-none-any.whl → 0.5.3__py3-none-any.whl

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.
gibson/command/Build.py CHANGED
@@ -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)
gibson/command/Code.py CHANGED
@@ -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)
gibson/command/Conf.py CHANGED
@@ -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():
gibson/command/Count.py CHANGED
@@ -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)
gibson/command/Dev.py CHANGED
@@ -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)
gibson/command/Forget.py CHANGED
@@ -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)
gibson/command/Import.py CHANGED
@@ -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)
gibson/command/List.py CHANGED
@@ -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)
gibson/command/Model.py CHANGED
@@ -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)
gibson/command/Modify.py CHANGED
@@ -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)
gibson/command/OpenApi.py CHANGED
@@ -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()
gibson/command/Remove.py CHANGED
@@ -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)
gibson/command/Rename.py CHANGED
@@ -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)
gibson/command/Schema.py CHANGED
@@ -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)
gibson/command/Show.py CHANGED
@@ -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)
gibson/command/Test.py CHANGED
@@ -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)
gibson/command/Version.py CHANGED
@@ -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)
@@ -1,6 +1,6 @@
1
+ import gibson.core.Colors as Colors
1
2
  from gibson.api.Cli import Cli
2
3
  from gibson.command.BaseCommand import BaseCommand
3
- from gibson.core.Colors import argument, arguments, command, hint, subcommand
4
4
 
5
5
 
6
6
  class Module(BaseCommand):
@@ -9,7 +9,9 @@ class Module(BaseCommand):
9
9
  module_name = self.conversation.prompt_module()
10
10
 
11
11
  self.conversation.newline()
12
- self.conversation.type(f"Generating new module: {argument(module_name)}\n")
12
+ self.conversation.type(
13
+ f"Generating new module: {Colors.argument(module_name)}\n"
14
+ )
13
15
 
14
16
  cli = Cli(self.configuration)
15
17
  response = cli.modeler_module(
@@ -22,7 +24,7 @@ class Module(BaseCommand):
22
24
 
23
25
  self.conversation.newline()
24
26
  self.conversation.type(
25
- f"The following entities were created in your {argument('last')} memory:\n"
27
+ f"The following entities were created in your {Colors.argument('last')} memory:\n"
26
28
  )
27
29
 
28
30
  for entity in response["entities"]:
@@ -32,7 +34,7 @@ class Module(BaseCommand):
32
34
  self.conversation.newline()
33
35
  self.conversation.type(f"If you want to persist these new entities run:\n")
34
36
  self.conversation.type(
35
- f"{command(self.configuration.command)} {subcommand('merge')}\n"
37
+ f"{Colors.command(self.configuration.command)} {Colors.subcommand('merge')}\n"
36
38
  )
37
39
 
38
40
  self.conversation.newline()
@@ -40,5 +42,5 @@ class Module(BaseCommand):
40
42
  f"Afterwards, you can modify any of these entities by running:\n"
41
43
  )
42
44
  self.conversation.type(
43
- f"{command(self.configuration.command)} {subcommand('modify')} {argument('[entity name]')} {input('[instructions]')}\n"
45
+ f"{Colors.command(self.configuration.command)} {Colors.subcommand('modify')} {Colors.argument('[entity name]')} {Colors.input('[instructions]')}\n"
44
46
  )
gibson/command/new/New.py CHANGED
@@ -1,9 +1,9 @@
1
1
  import sys
2
2
 
3
+ import gibson.core.Colors as Colors
3
4
  from gibson.command.BaseCommand import BaseCommand
4
5
  from gibson.command.new.Module import Module
5
6
  from gibson.command.new.Project import Project
6
- from gibson.core.Colors import argument, arguments, command, hint, subcommand
7
7
 
8
8
 
9
9
  class New(BaseCommand):
@@ -20,13 +20,13 @@ class New(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('new')} {arguments(['project', 'module'])} {hint('create something new')}\n"
23
+ f"usage: {Colors.command(self.configuration.command)} {Colors.subcommand('new')} {Colors.arguments(['project', 'module'])} {Colors.hint('create something new')}\n"
24
24
  )
25
25
  self.conversation.type(
26
- f" {command(self.configuration.command)} {subcommand('new')} {argument('project')} {hint('create a new project')}\n"
26
+ f" {Colors.command(self.configuration.command)} {Colors.subcommand('new')} {Colors.argument('project')} {Colors.hint('create a new project')}\n"
27
27
  )
28
28
  self.conversation.type(
29
- f" {command(self.configuration.command)} {subcommand('new')} {argument('module')} {hint('create a new module')}\n"
29
+ f" {Colors.command(self.configuration.command)} {Colors.subcommand('new')} {Colors.argument('module')} {Colors.hint('create a new module')}\n"
30
30
  )
31
31
  self.conversation.newline()
32
32
  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)
@@ -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:
@@ -74,7 +74,7 @@ class Conversation:
74
74
  self.newline()
75
75
 
76
76
  def display_project(self, project_name):
77
- self.type(f"<> Project {project(project_name)}\n\n")
77
+ self.type(f"<> Project {Colors.project(project_name)}\n\n")
78
78
 
79
79
  def entities_hijacked(self):
80
80
  self.type(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: gibson-cli
3
- Version: 0.5.2
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/
@@ -4,38 +4,38 @@ gibson/api/BaseApi.py,sha256=l_EsHdKRz-cXGXd3Ju5IFwmCRUkunba6ckB957S9DAk,2696
4
4
  gibson/api/Cli.py,sha256=JlioOwE3oob_OY_cr6qis0QEINU1H68ZjkWEQiGhZ-4,7897
5
5
  gibson/bin/gibson.py,sha256=N1mAWaww9pw8s5u0et87FC5cFHVU6JzN4Kls3lDn-xw,354
6
6
  gibson/command/BaseCommand.py,sha256=mmWUO0FxjMCbv3cHWnnasfAWnU_hTuGHUsRVJ4hUcqM,777
7
- gibson/command/Build.py,sha256=eypLUpZb3bw9LJ3s4uANZNbMNhshj90g94iQTreY74w,2851
8
- gibson/command/Code.py,sha256=Tb-eVAODHAbTqQldC2vR30YhrQvM2CtsiXt34RUoS3I,6913
9
- gibson/command/Conf.py,sha256=z7G-81GpPUGZxjuE0HJn3ltHBIScqy4-rzinLYCyiLA,2467
10
- gibson/command/Count.py,sha256=FInot7Wz-lClKM1gfKgZXwBVIsTR0Gde0cMjYrCitog,1086
11
- gibson/command/Dev.py,sha256=KXaWeAMGifrxb4uyBJ5W0v9XIYeG8_C1Dw8TiAeOlHE,4358
12
- gibson/command/Forget.py,sha256=2-XpPqzjqhdGvilMitZECVBegDzlV12kDiR0xrxEVyY,1064
7
+ gibson/command/Build.py,sha256=xo3gPqMAyNZ8qcoaaSSUZ_CZXdtBDf-1zYTyaJwV4kU,2848
8
+ gibson/command/Code.py,sha256=clzdgcv2yOMoWEa-SAK8nvWRu1D7xiPB95m7qd9lh_Y,6938
9
+ gibson/command/Conf.py,sha256=adj39A6Qlsg5BulYqA1zSbO-dWKZLfTr1FOqhKk1NA4,2471
10
+ gibson/command/Count.py,sha256=67P4NPzVonsaLk13ziASY26uIIGi3uzpAAyLQbRydf8,1082
11
+ gibson/command/Dev.py,sha256=UprSgTUMHf9tZaa3FMhar8tKDADrM7N1MJpS1hDq7ZQ,4354
12
+ gibson/command/Forget.py,sha256=yMjyIOlwnqM6Hy_3k9152PKJCvxiwZM3E4WbIOUMSis,1060
13
13
  gibson/command/Help.py,sha256=KoHukpEk_jLNxaNdM-n4R-dXj_VZub6x4xIXbTK1_wU,4794
14
- gibson/command/Import.py,sha256=4VeDtQNWf20j2tSvAMjU9r-gB05fD3hh6Mfxdp5B_oI,4174
15
- gibson/command/List.py,sha256=XNL0p3WvGCjuWeFD_24VO5d2sflXfkk_CvAbXrcOMYI,2318
14
+ gibson/command/Import.py,sha256=3cMQ4u0IGGqXUG65lQTZpB1vJzfn1SRr4xyTyRh01NA,4215
15
+ gibson/command/List.py,sha256=2_YuQ19CDhrYyLYISM0Gyl1R2LIpNgbcyrKr_Evg7aA,2314
16
16
  gibson/command/Merge.py,sha256=AKhyImy_MH8sy7m9Anh1SKBINvLrRmt91fFE4oVPg7k,1060
17
- gibson/command/Model.py,sha256=rare94DN7Cij4IizBscwl6TBQvQy_RkVt8SgnUBZW1I,1278
18
- gibson/command/Modify.py,sha256=jYx8ojVoecPAX_YasvpGGqq2d0dl2FfCB3WAlSxtdtM,1269
19
- gibson/command/OpenApi.py,sha256=mdjgzDgJTu8aMuI1bojExEAstCQuFzhFCnutNSm9z14,4313
20
- gibson/command/Question.py,sha256=KHFDLI3ItIFg3Qeeamy_zaXSZQyFBXdl3LEr4iq8FOg,3986
21
- gibson/command/Remove.py,sha256=i-ofK_uQfkgrP63vYaBxDTIhzs_-4p0FFaqd3f4fJvo,2435
22
- gibson/command/Rename.py,sha256=VUp8vrj3ugOG9i6CgXw8putbZAUsSw6iC8J1FBB05nQ,2245
23
- gibson/command/Schema.py,sha256=NAOp6RY4apSArPE7ZljT150AIQjpm88C6N_SRIophWo,1291
24
- gibson/command/Show.py,sha256=lGwguywp1lk4-E1T8iMFQR39mqir2rUqNXZES7H4WO4,1405
25
- gibson/command/Test.py,sha256=O0Ro3o_SAtNf0y7VwrVS7b2hrJ_sA-UepOxnfp8MEN4,1285
17
+ gibson/command/Model.py,sha256=vkZEFJdeupGQ2EsaGVHYnzhkGXY0ZiyKY7C70MJbI6Y,1278
18
+ gibson/command/Modify.py,sha256=usqJZOeMftH3DhzGPQmSrviCV8cvyUPRY8WtBy8L56U,1266
19
+ gibson/command/OpenApi.py,sha256=Jyfl8MKdYDCVZEet6uGj7RFUHhAbcBGZ-g3C2SnRSxA,4313
20
+ gibson/command/Question.py,sha256=5pJdVTpv7yi_sT-idwVx2aFniqge28GBFZIrtcatJUY,3997
21
+ gibson/command/Remove.py,sha256=zr0aNj0DZHtMkgjt9vV8Gyp3xu1KZYGtZfOoMmgDj5c,2435
22
+ gibson/command/Rename.py,sha256=xrey4zYgS6y49auS-v-3nsSksiUggDi36on9wlykHYI,2242
23
+ gibson/command/Schema.py,sha256=nTATB1fQ0QS0dTiT0AtWJJGGmqYzmsbhVsk1yqJaQxs,1288
24
+ gibson/command/Show.py,sha256=sn_UULaL6gteX3EH-gU7CNc9eHrG5vhlngKBhqwX_8c,1423
25
+ gibson/command/Test.py,sha256=Uy3l0jXXof-NBTViXa93jTfsJJvvsT8JugSNm0b6gKQ,1282
26
26
  gibson/command/Tree.py,sha256=pqVbebySThqJ-29izerScwaIb4XE40K3cYNA8bUpNkE,3055
27
- gibson/command/Version.py,sha256=LA162K8oPDJAwPEja6ppoHVU8tr7shA1gzkcWxV4XVs,1282
27
+ gibson/command/Version.py,sha256=ZMaLYYX8rR8aVdC85EgKaKV6dhyL9I8F0gqWmlIsZY0,1319
28
28
  gibson/command/WarGames.py,sha256=V0KIpz-Z546qtQaOPdIVHQ6wp2n3r3M3tgKx-GRQzzU,1300
29
- gibson/command/auth/Auth.py,sha256=JScajZ__oSo24jzFa5NccCgc4yKgxn0BI0dXPWE5bA4,1000
29
+ gibson/command/auth/Auth.py,sha256=rkWhAast68jL-_XVRU-3mIx2_ntlgmAJuwYx37gNVEI,1025
30
30
  gibson/command/auth/Login.py,sha256=b43OfV76i6aGdOwj1NK64ZOdYlNyc08g3lZGQ_37KDw,437
31
31
  gibson/command/auth/Logout.py,sha256=V01q4TdbiBqCnIrM6IA4T25fO6ws0UpXp42I3pwHZVM,248
32
- gibson/command/new/Module.py,sha256=XTbfdWKiccEfuqjcCA2Fg1kfl2ngbHGjDhCrbTvevi4,1562
33
- gibson/command/new/New.py,sha256=o-LMZurujp6cp01xKCdHY02F0hakXG3N7qkxKm-ZN58,1214
32
+ gibson/command/new/Module.py,sha256=uTxrWE3NmRDbWzWHzzAs3HW_tWXSX0pGjFqn3N8DMys,1598
33
+ gibson/command/new/New.py,sha256=yAES_nhiZcv3Jo9kb2E_YfAiVAcnRoeE6Ftd1PqQbQ8,1256
34
34
  gibson/command/new/Project.py,sha256=sExmNYDKWMIohAoBiF73nkVubgy6iMleaknXW8fWZJA,657
35
35
  gibson/command/rewrite/Api.py,sha256=sSvAqEJXdgQjYcu0uiM6ndHE3GnfkfVL6eqP2Otkbww,1002
36
36
  gibson/command/rewrite/Base.py,sha256=YJ2a5Hl0f9NXHUBBPvlt-dUIqEPWQz5vH6-1EHmbFbA,640
37
37
  gibson/command/rewrite/Models.py,sha256=eoUpZHpR0qwNgX60EWfcNz49GHmBw_FGfBuHH2ueZqY,799
38
- gibson/command/rewrite/Rewrite.py,sha256=jaoaruSCsOazZmDAytv9GD2YBrnBSonWO4jOd9C1B10,4666
38
+ gibson/command/rewrite/Rewrite.py,sha256=Yn4YlPU62KvubLpZnYSuKOO5mPQOD-H3GcYH6BS0QIo,4683
39
39
  gibson/command/rewrite/Schemas.py,sha256=zZ1gjmOJg77gh70t5y2WkzHWSAvEKx5-gqRN9OcsCXA,802
40
40
  gibson/command/rewrite/Tests.py,sha256=HO1WM6pSToVKsuJn7nUA_I5qrfBN0cgKgBzjlm2Qxt8,799
41
41
  gibson/command/tests/test_command_BaseCommand.py,sha256=hSbBfLFI3RTp_DdEHtm5oOLWoN6drI6ucFJypi7xxV8,364
@@ -62,7 +62,7 @@ gibson/core/Colors.py,sha256=5XJdm9n5Sa75Hv0BYVaGVhnzsgpwfbB2pGXcbGh5EjU,1539
62
62
  gibson/core/CommandRouter.py,sha256=_CN9BVHDbBMy-o0RJ4NjZ8rHbZolqSEKYwWLCNRBMMw,3999
63
63
  gibson/core/Completions.py,sha256=Bsh25vnf0pjpJA6MJNR_2MA2s58Ujj8XolR8fm8AQ_s,1197
64
64
  gibson/core/Configuration.py,sha256=rJq6XFS-vV8elACYmbFdnzzW4PsQb1BjyWuajfx46KQ,15787
65
- gibson/core/Conversation.py,sha256=FjDeaDy7xZqSlY3Sb1VZlAyRnycjSR_8t9-84TvNcsM,8993
65
+ gibson/core/Conversation.py,sha256=ZyWBMUZp4dJ5pkEs0hRwFMsw1_XJJht5T47PvO7pUxo,8997
66
66
  gibson/core/Env.py,sha256=08dZRHzzR0ahrbM4S0bXC7V1xhYQkT8Zefs00qUHf0U,498
67
67
  gibson/core/Memory.py,sha256=Yw6xmqtAsFwd5Q4VgmGDt4U2dUGLyFXZ_nO8c74Oo8E,4005
68
68
  gibson/core/PythonPath.py,sha256=p1q7n_5KnPvA8XbxJyvqC2vrIdEdTiMr6vRU9yj77Cs,1567
@@ -108,8 +108,8 @@ gibson/structure/tests/test_Entity.py,sha256=Gl9f1NcEKdpWCx4W3takFFzp18mLhCYWKrd
108
108
  gibson/tests/test_Env.py,sha256=DPWmP0-aEelducq9bAwv7rKoY2NjWXUeCrzfJDQkn2M,369
109
109
  gibson/tests/test_Memory.py,sha256=YP7owToABAk_-s7fD5UG0HTc4lamDjdA39JUlLnk3Fg,2574
110
110
  gibson/tests/test_utils.py,sha256=r_y-EG05YTCNtL8MWiAK1KmPsmeoMgypKsQC_lVgOtM,559
111
- gibson_cli-0.5.2.dist-info/METADATA,sha256=jMUs0Mfz7ffTyq0b4SQ-AsTqlSvFKCsuzagox03Lzvw,11605
112
- gibson_cli-0.5.2.dist-info/WHEEL,sha256=UvcQYKBHoFqaQd6LKyqHw9fxEolWLQnlzP0h_LgJAfI,91
113
- gibson_cli-0.5.2.dist-info/entry_points.txt,sha256=j5VUvq3AzL21xPvVC24zMoXFt-I5lUWulr66nL3OAPM,50
114
- gibson_cli-0.5.2.dist-info/top_level.txt,sha256=RFaUY7VXGiqkMwo1Rj7pM4kGvxkhhnfo-2LmPpuL_fs,11
115
- gibson_cli-0.5.2.dist-info/RECORD,,
111
+ gibson_cli-0.5.3.dist-info/METADATA,sha256=z2AUmsaQpWtDJZEWVkS2XhEVZErwpfCIfSvdJmYnShQ,11605
112
+ gibson_cli-0.5.3.dist-info/WHEEL,sha256=UvcQYKBHoFqaQd6LKyqHw9fxEolWLQnlzP0h_LgJAfI,91
113
+ gibson_cli-0.5.3.dist-info/entry_points.txt,sha256=j5VUvq3AzL21xPvVC24zMoXFt-I5lUWulr66nL3OAPM,50
114
+ gibson_cli-0.5.3.dist-info/top_level.txt,sha256=RFaUY7VXGiqkMwo1Rj7pM4kGvxkhhnfo-2LmPpuL_fs,11
115
+ gibson_cli-0.5.3.dist-info/RECORD,,