Ract is a conversational CLI tool written in Rust, designed to simplify the development process by providing an all-in-one solution for:
- Integrating dependencies
- Setting up environments
- Generating project templates
- Running and packaging projects
With minimal arguments and an intuitive dialog-based interface, Ract supports frameworks like GenUI and Makepad, making your development workflow smooth and efficient. π
Note
Your computer may prompt security questions, please select Allow
You can configure ract as a global command in the following wayοΌ
# copy download ract to /usr/local/bin
sudo cp /path/to/download/ract /usr/local/bin/ract/ract
# add permission
sudo chmod 755 /usr/local/bin/ract
sudo chmod 755 /usr/local/bin/ract/ract
# confirm permission
sudo chown -R $(whoami) /usr/local/bin/ract
# echo to .zshrc
echo 'export PATH="/usr/local/bin/ract:$PATH"' >> ~/.zshrc
source ~/.zshrc
# get version
ract --version
put path/to/ract
into System Env
Initialize or reset the CLI. Ract will generate:
.env
chain/
chain/env.toml
ract init
Output:
π Start to init ract...
β
Chain init successfully!
π Init ract successfully!
Check if required tools and dependencies are installed. Options include:
- Basic: [cargo, rustc, git]
- Underlayer: [makepad (gen_ui, makepad)]
- All: Combines both basic and underlayer tools.
ract check
Interactive dialog example:
π₯³ Welcome to use ract checker!
? Which you need to check?
> Basic
Underlayer
All
Install required tools and dependencies for development. Available options:
- Rust tools:
rustc
,cargo
- Version control:
git
- Makepad-specific tools: Includes components like
gen_components
,wasm_build
, and more.
ract install
Interactive dialog example:
π₯³ Welcome to use ract Install!
πΈ Select the tools to install:
- rustc
- cargo
- git
- makepad tools (default or custom options)
? What tools you want to (re)install?
> [ ] rustc|cargo
[ ] git
[x] makepad
Set or update environment variables and CLI configurations.
ract config
Interactive dialog example:
π₯³ Welcome to use ract config!
πΈ env: Set the `path` for the chain env.toml file
πΈ chain_env_toml: Set the rust dependency for GenUI toolchain
> Which env file do you want to config? chain_env_toml
> Get or Set Config? set
> Which one do you want to config? makepad-widgets
> Path: /Users/shengyifei/projects/makepad/makepad
π Config finish!
Ract will build a Makepad or GenUI project template based on the configuration entered by the user
create will help you check current env states
ract create
Interactive dialog example:
β€οΈ WELOCME TO GENUI, ract is a build tool for you!
> Which project you want to create? makepad
> Project name: test1
> Authors name: John
> ...
π Your project has been created successfully!
Run Makepad or GenUI projects.
ract run
Start Makepad Studio for GUI projects.
ract studio
Build and run a WASM project directly from the CLI.
ract wasm
Interactive dialog example:
π₯³ Welcome to use ract wasm!
πΈ Port for the web studio 8888
π¦ wasm is being packaged
π wasm is being started...
Starting webserver on 127.0.0.1:8888
Package a project using cargo-packager
.
ract pkg
Interactive dialog example:
π₯³ Welcome to use ract packager!
πΈ gpiler will check and install `cargo-packager` if not present.
πΈ Basic packaging configuration is auto-generated.
? Select how to package the project: init
π Package resources have been generated!
- Initialization: Automatically generate
.env
and environment templates. - Toolchain Check: Verify if all dependencies are installed.
- Interactive Installation: Install only the tools you need.
- Environment Configuration: Flexible configuration of environment paths.
- Project Running: Run Makepad or GenUI projects with a single command.
- WASM Support: Build and serve WASM projects in the browser.
- Project Packaging: Streamlined packaging for distribution.
- Watcher: Monitor changes for automatic reload.
- Logger: Advanced logging system for debugging.
- Cross-platform Packaging: Simplify builds for multiple platforms.
- Documentation: Include a comprehensive book for learning Makepad and GenUI.
Ract makes your Rust-based development with Makepad and GenUI easier, faster, and more efficient. π
Feel free to contribute or share feedback to help us improve! π