Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,18 @@ pybot version
pybot list templates
pybot list components

# Create a project in the robot directory
pybot new robot --template magicbot
# Change to the directory where you want the project
mkdir robot
cd robot

# Create a project in the current directory
pybot new magicbot
# or
pybot new robot --template command
pybot new command
# or
pybot new robot --template xrp
pybot new xrp
# or
pybot new robot --template sysid
pybot new sysid

# Add components to an existing MagicBot project
pybot add component gyro
Expand All @@ -47,6 +51,9 @@ pybot add component logger
pybot add component tankdrive
```

Running `pybot new` without a template creates a MagicBot project in the current
directory.

The MagicBot starter template targets Python 3.14 and RobotPy 2026. Its RobotPy
simulation test is the MVP compatibility proxy for roboRIO operation; physical
deployment remains unverified until a roboRIO is available.
Expand Down
12 changes: 4 additions & 8 deletions src/pybot_sdk/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,13 +156,8 @@ def build_parser() -> argparse.ArgumentParser:
commands.add_parser("update", help="install the latest pybot-sdk release")
new = commands.add_parser("new", help="create a RobotPy project")
new.add_argument(
"project_directory",
"template",
nargs="?",
default=Path("."),
type=Path,
)
new.add_argument(
"--template",
choices=TEMPLATE_NAMES,
default="magicbot",
)
Expand Down Expand Up @@ -200,8 +195,9 @@ def main(argv: list[str] | None = None) -> int:
elif args.command == "update":
return update_sdk()
elif args.command == "new":
destination = Path.cwd()
try:
create_project(args.project_directory, args.template)
create_project(destination, args.template)
except (OSError, ValueError) as error:
print(f"pybot: {error}", file=sys.stderr)
return 2
Expand All @@ -212,7 +208,7 @@ def main(argv: list[str] | None = None) -> int:
"command": "Command Based Robot",
"sysid": "SysId Robot",
}
print(f"Created a {labels[args.template]} project at {args.project_directory}")
print(f"Created a {labels[args.template]} project at {destination}")
return 0
elif args.command == "add" and args.add_command == "component":
try:
Expand Down
Loading
Loading