autoverse-cli 0.25.0__tar.gz → 0.26.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.
- {autoverse_cli-0.25.0 → autoverse_cli-0.26.0}/PKG-INFO +42 -1
- autoverse_cli-0.26.0/README.md +43 -0
- {autoverse_cli-0.25.0 → autoverse_cli-0.26.0}/pyproject.toml +3 -2
- {autoverse_cli-0.25.0 → autoverse_cli-0.26.0}/src/autoverse_cli.egg-info/PKG-INFO +42 -1
- {autoverse_cli-0.25.0 → autoverse_cli-0.26.0}/src/autoverse_cli.egg-info/SOURCES.txt +1 -0
- {autoverse_cli-0.25.0 → autoverse_cli-0.26.0}/src/autoverse_cli.egg-info/requires.txt +1 -0
- {autoverse_cli-0.25.0 → autoverse_cli-0.26.0}/src/avrs/app_version.py +1 -1
- {autoverse_cli-0.25.0 → autoverse_cli-0.26.0}/src/avrs/avrs.py +29 -3
- {autoverse_cli-0.25.0 → autoverse_cli-0.26.0}/src/avrs/requests/environment.py +2 -2
- {autoverse_cli-0.25.0 → autoverse_cli-0.26.0}/src/avrs/requests/race_control.py +6 -6
- autoverse_cli-0.26.0/src/avrs/shell_completion.py +121 -0
- autoverse_cli-0.25.0/README.md +0 -3
- {autoverse_cli-0.25.0 → autoverse_cli-0.26.0}/LICENSE +0 -0
- {autoverse_cli-0.25.0 → autoverse_cli-0.26.0}/setup.cfg +0 -0
- {autoverse_cli-0.25.0 → autoverse_cli-0.26.0}/src/autoverse_cli.egg-info/dependency_links.txt +0 -0
- {autoverse_cli-0.25.0 → autoverse_cli-0.26.0}/src/autoverse_cli.egg-info/entry_points.txt +0 -0
- {autoverse_cli-0.25.0 → autoverse_cli-0.26.0}/src/autoverse_cli.egg-info/top_level.txt +0 -0
- {autoverse_cli-0.25.0 → autoverse_cli-0.26.0}/src/avrs/__init__.py +0 -0
- {autoverse_cli-0.25.0 → autoverse_cli-0.26.0}/src/avrs/argparse_help.py +0 -0
- {autoverse_cli-0.25.0 → autoverse_cli-0.26.0}/src/avrs/can_tool.py +0 -0
- {autoverse_cli-0.25.0 → autoverse_cli-0.26.0}/src/avrs/can_tool_util.py +0 -0
- {autoverse_cli-0.25.0 → autoverse_cli-0.26.0}/src/avrs/cfg.py +0 -0
- {autoverse_cli-0.25.0 → autoverse_cli-0.26.0}/src/avrs/launcher.py +0 -0
- {autoverse_cli-0.25.0 → autoverse_cli-0.26.0}/src/avrs/launcher_util.py +0 -0
- {autoverse_cli-0.25.0 → autoverse_cli-0.26.0}/src/avrs/race_cloud.py +0 -0
- {autoverse_cli-0.25.0 → autoverse_cli-0.26.0}/src/avrs/race_cloud_bridge_can.py +0 -0
- {autoverse_cli-0.25.0 → autoverse_cli-0.26.0}/src/avrs/race_cloud_cfg_util.py +0 -0
- {autoverse_cli-0.25.0 → autoverse_cli-0.26.0}/src/avrs/race_cloud_fwd_api.py +0 -0
- {autoverse_cli-0.25.0 → autoverse_cli-0.26.0}/src/avrs/race_cloud_util.py +0 -0
- {autoverse_cli-0.25.0 → autoverse_cli-0.26.0}/src/avrs/requests/change_camera.py +0 -0
- {autoverse_cli-0.25.0 → autoverse_cli-0.26.0}/src/avrs/requests/code_booz.py +0 -0
- {autoverse_cli-0.25.0 → autoverse_cli-0.26.0}/src/avrs/requests/demo.py +0 -0
- {autoverse_cli-0.25.0 → autoverse_cli-0.26.0}/src/avrs/requests/dump_sim_config.py +0 -0
- {autoverse_cli-0.25.0 → autoverse_cli-0.26.0}/src/avrs/requests/fault_injection.py +0 -0
- {autoverse_cli-0.25.0 → autoverse_cli-0.26.0}/src/avrs/requests/get_object_config.py +0 -0
- {autoverse_cli-0.25.0 → autoverse_cli-0.26.0}/src/avrs/requests/get_web_viz_meta.py +0 -0
- {autoverse_cli-0.25.0 → autoverse_cli-0.26.0}/src/avrs/requests/leaderboard.py +0 -0
- {autoverse_cli-0.25.0 → autoverse_cli-0.26.0}/src/avrs/requests/list_sim_objects.py +0 -0
- {autoverse_cli-0.25.0 → autoverse_cli-0.26.0}/src/avrs/requests/log_path.py +0 -0
- {autoverse_cli-0.25.0 → autoverse_cli-0.26.0}/src/avrs/requests/misc.py +0 -0
- {autoverse_cli-0.25.0 → autoverse_cli-0.26.0}/src/avrs/requests/move_to_landmark.py +0 -0
- {autoverse_cli-0.25.0 → autoverse_cli-0.26.0}/src/avrs/requests/npc.py +0 -0
- {autoverse_cli-0.25.0 → autoverse_cli-0.26.0}/src/avrs/requests/request.py +0 -0
- {autoverse_cli-0.25.0 → autoverse_cli-0.26.0}/src/avrs/requests/reset_to_track.py +0 -0
- {autoverse_cli-0.25.0 → autoverse_cli-0.26.0}/src/avrs/requests/rest_request.py +0 -0
- {autoverse_cli-0.25.0 → autoverse_cli-0.26.0}/src/avrs/requests/restart.py +0 -0
- {autoverse_cli-0.25.0 → autoverse_cli-0.26.0}/src/avrs/requests/scenario_control.py +0 -0
- {autoverse_cli-0.25.0 → autoverse_cli-0.26.0}/src/avrs/requests/spawn_object.py +0 -0
- {autoverse_cli-0.25.0 → autoverse_cli-0.26.0}/src/avrs/requests/teleport.py +0 -0
- {autoverse_cli-0.25.0 → autoverse_cli-0.26.0}/src/avrs/requests/toggle_hud.py +0 -0
- {autoverse_cli-0.25.0 → autoverse_cli-0.26.0}/src/avrs/requests/vd.py +0 -0
- {autoverse_cli-0.25.0 → autoverse_cli-0.26.0}/src/avrs/requests/vehicle_input.py +0 -0
- {autoverse_cli-0.25.0 → autoverse_cli-0.26.0}/src/avrs/requests/vehicle_replay.py +0 -0
- {autoverse_cli-0.25.0 → autoverse_cli-0.26.0}/src/avrs/simconfig.py +0 -0
- {autoverse_cli-0.25.0 → autoverse_cli-0.26.0}/src/avrs/simconfig_util.py +0 -0
- {autoverse_cli-0.25.0 → autoverse_cli-0.26.0}/src/avrs/tests.py +0 -0
- {autoverse_cli-0.25.0 → autoverse_cli-0.26.0}/src/avrs/util.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: autoverse-cli
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.26.0
|
|
4
4
|
Summary: The Autoverse CLI
|
|
5
5
|
Author-email: Dan Kamrath <dan.kamrath@autonomalabs.com>
|
|
6
6
|
License: # End-User License Agreement (EULA) of the Autonoma AutoVerse CLI
|
|
@@ -43,8 +43,49 @@ Description-Content-Type: text/markdown
|
|
|
43
43
|
License-File: LICENSE
|
|
44
44
|
Requires-Dist: boto3
|
|
45
45
|
Requires-Dist: cantools
|
|
46
|
+
Requires-Dist: argcomplete
|
|
46
47
|
Dynamic: license-file
|
|
47
48
|
|
|
48
49
|
# Autoverse CLI
|
|
49
50
|
|
|
50
51
|
The new implementation of the Autoverse CLI
|
|
52
|
+
|
|
53
|
+
## Installation
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
pip install autoverse-cli
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Shell Completion
|
|
60
|
+
|
|
61
|
+
To enable tab completion for the `avrs` command, run:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
avrs --install-completion
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Then reload your shell:
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
source ~/.bashrc # or ~/.zshrc, ~/.config/fish/config.fish, etc.
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
For full details, see [SHELL_COMPLETION.md](SHELL_COMPLETION.md).
|
|
74
|
+
|
|
75
|
+
### Supported Shells
|
|
76
|
+
|
|
77
|
+
- Bash
|
|
78
|
+
- Zsh
|
|
79
|
+
- Fish
|
|
80
|
+
- Tcsh
|
|
81
|
+
|
|
82
|
+
### Quick Usage Examples
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
# List all available commands
|
|
86
|
+
avrs <TAB>
|
|
87
|
+
|
|
88
|
+
# Complete subcommand arguments
|
|
89
|
+
avrs launcher <TAB>
|
|
90
|
+
avrs restart <TAB>
|
|
91
|
+
```
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Autoverse CLI
|
|
2
|
+
|
|
3
|
+
The new implementation of the Autoverse CLI
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pip install autoverse-cli
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Shell Completion
|
|
12
|
+
|
|
13
|
+
To enable tab completion for the `avrs` command, run:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
avrs --install-completion
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Then reload your shell:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
source ~/.bashrc # or ~/.zshrc, ~/.config/fish/config.fish, etc.
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
For full details, see [SHELL_COMPLETION.md](SHELL_COMPLETION.md).
|
|
26
|
+
|
|
27
|
+
### Supported Shells
|
|
28
|
+
|
|
29
|
+
- Bash
|
|
30
|
+
- Zsh
|
|
31
|
+
- Fish
|
|
32
|
+
- Tcsh
|
|
33
|
+
|
|
34
|
+
### Quick Usage Examples
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
# List all available commands
|
|
38
|
+
avrs <TAB>
|
|
39
|
+
|
|
40
|
+
# Complete subcommand arguments
|
|
41
|
+
avrs launcher <TAB>
|
|
42
|
+
avrs restart <TAB>
|
|
43
|
+
```
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: autoverse-cli
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.26.0
|
|
4
4
|
Summary: The Autoverse CLI
|
|
5
5
|
Author-email: Dan Kamrath <dan.kamrath@autonomalabs.com>
|
|
6
6
|
License: # End-User License Agreement (EULA) of the Autonoma AutoVerse CLI
|
|
@@ -43,8 +43,49 @@ Description-Content-Type: text/markdown
|
|
|
43
43
|
License-File: LICENSE
|
|
44
44
|
Requires-Dist: boto3
|
|
45
45
|
Requires-Dist: cantools
|
|
46
|
+
Requires-Dist: argcomplete
|
|
46
47
|
Dynamic: license-file
|
|
47
48
|
|
|
48
49
|
# Autoverse CLI
|
|
49
50
|
|
|
50
51
|
The new implementation of the Autoverse CLI
|
|
52
|
+
|
|
53
|
+
## Installation
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
pip install autoverse-cli
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Shell Completion
|
|
60
|
+
|
|
61
|
+
To enable tab completion for the `avrs` command, run:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
avrs --install-completion
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Then reload your shell:
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
source ~/.bashrc # or ~/.zshrc, ~/.config/fish/config.fish, etc.
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
For full details, see [SHELL_COMPLETION.md](SHELL_COMPLETION.md).
|
|
74
|
+
|
|
75
|
+
### Supported Shells
|
|
76
|
+
|
|
77
|
+
- Bash
|
|
78
|
+
- Zsh
|
|
79
|
+
- Fish
|
|
80
|
+
- Tcsh
|
|
81
|
+
|
|
82
|
+
### Quick Usage Examples
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
# List all available commands
|
|
86
|
+
avrs <TAB>
|
|
87
|
+
|
|
88
|
+
# Complete subcommand arguments
|
|
89
|
+
avrs launcher <TAB>
|
|
90
|
+
avrs restart <TAB>
|
|
91
|
+
```
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import logging
|
|
3
3
|
import argparse
|
|
4
4
|
import os
|
|
5
|
+
import argcomplete
|
|
5
6
|
|
|
6
7
|
from argparse import RawDescriptionHelpFormatter
|
|
7
8
|
from argparse import RawTextHelpFormatter
|
|
@@ -12,6 +13,7 @@ from avrs.launcher import *
|
|
|
12
13
|
from avrs.can_tool import *
|
|
13
14
|
from avrs.race_cloud import *
|
|
14
15
|
from avrs.argparse_help import *
|
|
16
|
+
from avrs.shell_completion import install_completion, uninstall_completion
|
|
15
17
|
|
|
16
18
|
from avrs.requests.move_to_landmark import MoveToLandmarkRequest
|
|
17
19
|
from avrs.requests.restart import Restart
|
|
@@ -99,14 +101,23 @@ def main():
|
|
|
99
101
|
action='store_true',
|
|
100
102
|
help='request verbose output')
|
|
101
103
|
|
|
102
|
-
|
|
104
|
+
parser.add_argument(
|
|
105
|
+
'--install-completion',
|
|
106
|
+
action='store_true',
|
|
107
|
+
help='install shell completion for avrs CLI')
|
|
108
|
+
|
|
109
|
+
parser.add_argument(
|
|
110
|
+
'--uninstall-completion',
|
|
111
|
+
action='store_true',
|
|
112
|
+
help='uninstall shell completion for avrs CLI')
|
|
113
|
+
|
|
114
|
+
sps = parser.add_subparsers(required=False, help='sub-command help')
|
|
103
115
|
|
|
104
116
|
cfg = load_cfg('avrs')
|
|
105
117
|
check_app_is_latest()
|
|
106
118
|
|
|
107
119
|
AvrsLauncher(sps, cfg)
|
|
108
120
|
|
|
109
|
-
|
|
110
121
|
MoveToLandmarkRequest(sps, cfg)
|
|
111
122
|
Restart(sps, cfg)
|
|
112
123
|
ResetToTrack(sps, cfg)
|
|
@@ -150,8 +161,23 @@ def main():
|
|
|
150
161
|
if os.environ.get('AVRS_GEN_DOCS', '0') == '1':
|
|
151
162
|
generate_argparse_docs(parser)
|
|
152
163
|
|
|
164
|
+
argcomplete.autocomplete(parser)
|
|
153
165
|
args = parser.parse_args()
|
|
154
|
-
|
|
166
|
+
|
|
167
|
+
# Handle completion installation/uninstallation
|
|
168
|
+
if args.install_completion:
|
|
169
|
+
install_completion()
|
|
170
|
+
return
|
|
171
|
+
|
|
172
|
+
if args.uninstall_completion:
|
|
173
|
+
uninstall_completion()
|
|
174
|
+
return
|
|
175
|
+
|
|
176
|
+
# Handle subcommands
|
|
177
|
+
if hasattr(args, 'func'):
|
|
178
|
+
args.func(args)
|
|
179
|
+
else:
|
|
180
|
+
parser.print_help()
|
|
155
181
|
|
|
156
182
|
if __name__ == '__main__':
|
|
157
183
|
main()
|
|
@@ -5,7 +5,7 @@ class AvrsEnvironmentRequests():
|
|
|
5
5
|
psr = parser.add_parser('environment', help='Edits the environment')
|
|
6
6
|
sps = psr.add_subparsers(required= True, help='')
|
|
7
7
|
AvrsSetTimeOfDayRequest(sps, cfg)
|
|
8
|
-
|
|
8
|
+
AvrsGetEnvironmentMetaRequest(sps, cfg)
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
class AvrsSetTimeOfDayRequest(AvrsApiRequest):
|
|
@@ -21,7 +21,7 @@ class AvrsSetTimeOfDayRequest(AvrsApiRequest):
|
|
|
21
21
|
'TimeOfDay': args.tod
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
class
|
|
24
|
+
class AvrsGetEnvironmentMetaRequest(AvrsApiRequest):
|
|
25
25
|
def __init__(self, parser, cfg):
|
|
26
26
|
AvrsApiRequest.__init__(self, parser, cfg, 'GetEnvironmentMeta', '')
|
|
27
27
|
psr = parser.add_parser('get-meta', help='get metadata about the currently loaded environment')
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
|
|
2
1
|
from avrs.requests.request import AvrsApiRequest
|
|
3
|
-
|
|
4
2
|
class AvrsRaceControlRequest(AvrsApiRequest):
|
|
5
3
|
def __init__(self, parser, cfg):
|
|
6
4
|
AvrsApiRequest.__init__(self, parser, cfg, 'RaceControl', 'Ego')
|
|
7
5
|
psr = parser.add_parser('race-control', help='send different flags to the race control')
|
|
6
|
+
self.sector_number = 3 # Assuming there are 3 sectors; adjust as necessary, constant for now
|
|
8
7
|
|
|
9
8
|
psr.add_argument(
|
|
10
9
|
'--session-type',
|
|
@@ -25,10 +24,11 @@ class AvrsRaceControlRequest(AvrsApiRequest):
|
|
|
25
24
|
help='the id of the car flag to set')
|
|
26
25
|
|
|
27
26
|
psr.add_argument(
|
|
28
|
-
'--sector-flag',
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
27
|
+
'--sector-flag',
|
|
28
|
+
nargs=self.sector_number,
|
|
29
|
+
type=int,
|
|
30
|
+
default=[-1, -1, -1],
|
|
31
|
+
help='the ids of the sector flags to set, provide 3 values for sector 1, sector 2 and sector 3 in that order')
|
|
32
32
|
|
|
33
33
|
psr.add_argument(
|
|
34
34
|
'--object-name',
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import sys
|
|
3
|
+
import subprocess
|
|
4
|
+
from pathlib import Path
|
|
5
|
+
|
|
6
|
+
def get_shell_name():
|
|
7
|
+
"""Detect the current shell from SHELL environment variable or parent process."""
|
|
8
|
+
shell = os.environ.get('SHELL', '')
|
|
9
|
+
if shell:
|
|
10
|
+
return os.path.basename(shell)
|
|
11
|
+
|
|
12
|
+
# Fallback: try to get parent shell
|
|
13
|
+
try:
|
|
14
|
+
parent_pid = os.getppid()
|
|
15
|
+
with open(f'/proc/{parent_pid}/comm', 'r') as f:
|
|
16
|
+
return f.read().strip()
|
|
17
|
+
except:
|
|
18
|
+
return 'bash'
|
|
19
|
+
|
|
20
|
+
def get_shell_config_file():
|
|
21
|
+
"""Get the config file path for the detected shell."""
|
|
22
|
+
shell = get_shell_name()
|
|
23
|
+
home = str(Path.home())
|
|
24
|
+
|
|
25
|
+
if 'zsh' in shell:
|
|
26
|
+
return os.path.join(home, '.zshrc')
|
|
27
|
+
elif 'fish' in shell:
|
|
28
|
+
return os.path.join(home, '.config/fish/config.fish')
|
|
29
|
+
elif 'tcsh' in shell:
|
|
30
|
+
return os.path.join(home, '.tcshrc')
|
|
31
|
+
else: # bash and others
|
|
32
|
+
return os.path.join(home, '.bashrc')
|
|
33
|
+
|
|
34
|
+
def get_completion_command():
|
|
35
|
+
"""Get the shell-specific completion registration command."""
|
|
36
|
+
shell = get_shell_name()
|
|
37
|
+
|
|
38
|
+
# Try to use register-python-argcomplete if available, fall back to register-python-argcomplete3
|
|
39
|
+
# This makes it compatible with both pip-installed and system-package versions
|
|
40
|
+
register_cmd = "register-python-argcomplete"
|
|
41
|
+
|
|
42
|
+
if 'zsh' in shell:
|
|
43
|
+
return f'eval "$({register_cmd} --shell zsh avrs 2>/dev/null || {register_cmd}3 --shell zsh avrs)"'
|
|
44
|
+
elif 'fish' in shell:
|
|
45
|
+
return f'{register_cmd} --shell fish avrs 2>/dev/null | source || {register_cmd}3 --shell fish avrs | source'
|
|
46
|
+
elif 'tcsh' in shell:
|
|
47
|
+
return f'eval "$({register_cmd} --shell tcsh avrs 2>/dev/null || {register_cmd}3 --shell tcsh avrs)"'
|
|
48
|
+
else: # bash
|
|
49
|
+
return f'eval "$({register_cmd} avrs 2>/dev/null || {register_cmd}3 avrs)"'
|
|
50
|
+
|
|
51
|
+
def install_completion():
|
|
52
|
+
"""Install shell completion for the avrs CLI."""
|
|
53
|
+
shell = get_shell_name()
|
|
54
|
+
config_file = get_shell_config_file()
|
|
55
|
+
completion_command = get_completion_command()
|
|
56
|
+
|
|
57
|
+
print(f"Installing shell completion for {shell}...")
|
|
58
|
+
|
|
59
|
+
# Check if completion already installed
|
|
60
|
+
if os.path.exists(config_file):
|
|
61
|
+
with open(config_file, 'r') as f:
|
|
62
|
+
content = f.read()
|
|
63
|
+
if 'register-python-argcomplete' in content and 'avrs' in content:
|
|
64
|
+
print(f"✓ Completion already installed in {config_file}")
|
|
65
|
+
return True
|
|
66
|
+
|
|
67
|
+
# Ensure config file exists
|
|
68
|
+
Path(config_file).parent.mkdir(parents=True, exist_ok=True)
|
|
69
|
+
|
|
70
|
+
# Append completion command
|
|
71
|
+
try:
|
|
72
|
+
with open(config_file, 'a') as f:
|
|
73
|
+
f.write('\n\n# avrs CLI completion\n')
|
|
74
|
+
f.write(completion_command + '\n')
|
|
75
|
+
print(f"✓ Completion installed successfully!")
|
|
76
|
+
print(f"✓ Added to {config_file}")
|
|
77
|
+
print(f"\nTo activate completion in current shell, run:")
|
|
78
|
+
print(f" source {config_file}")
|
|
79
|
+
return True
|
|
80
|
+
except Exception as e:
|
|
81
|
+
print(f"✗ Error installing completion: {e}")
|
|
82
|
+
print(f"\nManually add this line to {config_file}:")
|
|
83
|
+
print(f" {completion_command}")
|
|
84
|
+
return False
|
|
85
|
+
|
|
86
|
+
def uninstall_completion():
|
|
87
|
+
"""Remove shell completion for the avrs CLI."""
|
|
88
|
+
shell = get_shell_name()
|
|
89
|
+
config_file = get_shell_config_file()
|
|
90
|
+
|
|
91
|
+
print(f"Uninstalling shell completion from {config_file}...")
|
|
92
|
+
|
|
93
|
+
if not os.path.exists(config_file):
|
|
94
|
+
print("Config file not found.")
|
|
95
|
+
return False
|
|
96
|
+
|
|
97
|
+
try:
|
|
98
|
+
with open(config_file, 'r') as f:
|
|
99
|
+
lines = f.readlines()
|
|
100
|
+
|
|
101
|
+
# Filter out avrs completion lines
|
|
102
|
+
new_lines = [
|
|
103
|
+
line for line in lines
|
|
104
|
+
if 'register-python-argcomplete' not in line or 'avrs' not in line
|
|
105
|
+
]
|
|
106
|
+
|
|
107
|
+
# Also remove the comment line if it's there
|
|
108
|
+
filtered_lines = []
|
|
109
|
+
for i, line in enumerate(new_lines):
|
|
110
|
+
if line.strip() == '# avrs CLI completion':
|
|
111
|
+
continue
|
|
112
|
+
filtered_lines.append(line)
|
|
113
|
+
|
|
114
|
+
with open(config_file, 'w') as f:
|
|
115
|
+
f.writelines(filtered_lines)
|
|
116
|
+
|
|
117
|
+
print(f"✓ Completion uninstalled successfully!")
|
|
118
|
+
return True
|
|
119
|
+
except Exception as e:
|
|
120
|
+
print(f"✗ Error uninstalling completion: {e}")
|
|
121
|
+
return False
|
autoverse_cli-0.25.0/README.md
DELETED
|
File without changes
|
|
File without changes
|
{autoverse_cli-0.25.0 → autoverse_cli-0.26.0}/src/autoverse_cli.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|