A Bevy CLI is a long-outstanding feature request, with even more discussion and analysis. Let's start building it!
Rather than being a single-purpose tool to accomplish a specific task, the vision is to create a single CLI entry point for tasks that best fit the CLI format.
Under the hood, the editor can then call the CLI for many of its tasks, avoiding duplication of effort and providing a mechanism for basic automation.
A number of ideas for functionality that would fit well in the Bevy CLI have been floated:
Requirements:
cargo
alone should work fine to get to Hello WorldHunches:
clap
cratecargo-generate
for templatesTemplates are the most important requirement here: useful for game jams, editor starter projects and tutorials. We should tackle this first, as it lays out a foundation while being relatively straightforward.
We should start this in the BevyFlock
community organization, and then transfer the repository to the bevyengine
organization once the initial architecture has been blessed.
We should follow the same structural rules as the editor here:
Once it's adopted, CLI-powered asset preprocesing is the next most important need: Bevy doesn't have any good alternative right now.
The prototype as of release 0.1.0
supports the following features:
The bevy new
command lets you easily scaffold a new Bevy project using a custom template or a minimal template provided by Bevy.
Templates are just GitHub repositories and can be specified with the -t
flag.
If the template is omitted, the default minimal template will be chosen.
bevy new my-project
To use a specific template, provide the full GitHub URL
bevy new my-project -t https://github.com/TheBevyFlock/bevy_new_2d
Additionally, any repo prefixed with bevy_new_
from the TheBevyFlock will be usable via its shortcut form i.e. -t 2d
will use the template bevy_new_2d.
bevy new my-project -t 2d
The CLI makes it easy to build and run web apps made with Bevy, using bevy build web
and bevy run web
. It takes care of compiling the app to Wasm, creating JavaScript bindings and serving it on a local web server to test it out. Necessary tools will also be installed automatically.
For more information see the Bevy Web Initiative HackMD
The CLI has 1st-party support for bevy_lint
. It must be installed first using the installation guide, but then you can run the linter with the lint
subcommand:
bevy lint
This command uses the same arguments as cargo check
:
bevy lint --workspace --all-features
You can view a full list of supported options with:
bevy lint -- --help
or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Syncing