Commands
sereto.cli.commands
¶
WorkingDir
¶
Helper class for REPL implementing the cd
command.
Attributes:
Name | Type | Description |
---|---|---|
old_cwd |
Path
|
The previous working directory. |
Source code in sereto/cli/commands.py
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
|
change(dst)
¶
Change the current working directory to the new location.
Also saves the previous location for future reference.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dst
|
Path
|
The new working directory |
required |
Raises:
Type | Description |
---|---|
SeretoPathError
|
If the provided path is not an existing directory. |
Source code in sereto/cli/commands.py
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 |
|
go_back()
¶
Change the current working directory to the previous location.
Source code in sereto/cli/commands.py
76 77 78 |
|
repl_cd(settings, project_id)
¶
Switch the active project in the REPL.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
settings
|
Settings
|
The Settings object. |
required |
project_id
|
TypeProjectId | Literal['-']
|
The ID of the project to switch to. Use '-' to go back to the previous working directory. |
required |
Raises:
Type | Description |
---|---|
SeretoValueError
|
If the project ID is invalid. |
SeretoPathError
|
If the project's path does not exist. |
Source code in sereto/cli/commands.py
113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 |
|
repl_exit()
¶
Exit from the Read-Eval-Print Loop (REPL).
Source code in sereto/cli/commands.py
145 146 147 148 |
|
repl_toggle_debug()
¶
Toggle the debug mode.
Source code in sereto/cli/commands.py
151 152 153 154 155 156 157 |
|
sereto_ls(settings)
¶
List all projects in the user's projects directory.
Print a table with the details to the console.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
settings
|
Settings
|
The Settings object. |
required |
Source code in sereto/cli/commands.py
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
|
sereto_repl(cli)
¶
Start an interactive Read-Eval-Print Loop (REPL) session.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
cli
|
Group
|
The main CLI group. |
required |
Source code in sereto/cli/commands.py
160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 |
|