Skip to content
19 changes: 17 additions & 2 deletions bittensor/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@
NewHotkeyCommand,
NominateCommand,
OverviewCommand,
ProfileCommand,
ProfileListCommand,
ProfileShowCommand,
PowRegisterCommand,
ProposalsCommand,
RegenColdkeyCommand,
Expand Down Expand Up @@ -91,6 +94,7 @@
"sudos": "sudo",
"i": "info",
"info": "info",
"profile": "profile",
}
COMMANDS = {
"subnets": {
Expand Down Expand Up @@ -189,6 +193,18 @@
"autocomplete": AutocompleteCommand,
},
},
"profile": {
"name": "profile",
"aliases": ["p"],
"help": "Commands for creating and viewing profiles.",
"commands": {
"create": ProfileCommand,
"list": ProfileListCommand,
"show": ProfileShowCommand,
# "set": ProfileSet,
# "delete": ProfileDelete,
},
},
}


Expand Down Expand Up @@ -226,7 +242,6 @@ def __init__(
"""
# Turns on console for cli.
bittensor.turn_console_on()

# If no config is provided, create a new one from args.
if config is None:
config = cli.create_config(args)
Expand Down Expand Up @@ -311,7 +326,6 @@ def create_config(args: List[str]) -> "bittensor.config":
if len(args) == 0:
parser.print_help()
sys.exit()

return bittensor.config(parser, args=args)

@staticmethod
Expand Down Expand Up @@ -356,6 +370,7 @@ def run(self):
# Check if command exists, if so, run the corresponding method.
# If command doesn't exist, inform user and exit the program.
command = self.config.command

if command in COMMANDS:
command_data = COMMANDS[command]

Expand Down
7 changes: 7 additions & 0 deletions bittensor/commands/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
},
"priority": {"max_workers": 5, "maxsize": 10},
"prometheus": {"port": 7091, "level": "INFO"},
"profile": {"name": "default", "path": "~/.bittensor/profiles/"},
"wallet": {
"name": "default",
"hotkey": "default",
Expand Down Expand Up @@ -94,6 +95,12 @@
from .metagraph import MetagraphCommand
from .list import ListCommand
from .misc import UpdateCommand, AutocompleteCommand
from .profile import (
ProfileCommand,
ProfileListCommand,
ProfileShowCommand
)

from .senate import (
SenateCommand,
ProposalsCommand,
Expand Down
Loading