-
Notifications
You must be signed in to change notification settings - Fork 89
CLI documentation
$ mbox activate NAME
Activate a or more components
Arguments:
NAME | Repo/Component Name |
Options:
--tool | Use the specified dependency management tool |
Flags:
--all | All Components |
Example:
# Activate all components in the `repo1`
$ mbox activate repo1
# Activate the component named `component1` in the `repo1`
$ mbox activate repo1/component1
$ mbox add NAME [TARGET_BRANCH] [BASE_BRANCH]
Add a repo into current feature
Arguments:
NAME | Repo Name/URL/Path |
TARGET_BRANCH | [Optional] Merge to the target branch |
BASE_BRANCH | [Optional] Check from the base branch. Defaults same as TARGET_BRANCH |
Options:
--component | Activate a component, only for `URL`/`PATH` |
--mode | Use `copy`/`move`/`worktree` to handle local path |
--product-json | Repo-related product info |
--tool | Use the specified dependency management tool |
Flags:
--activate-all-components | Activate all components. Default value will be true if add a repo, while default value will be false if add a component. Use `mbox config dependency_manager.activate_all_components_after_add_repo true/false` to change the default behavior. |
--checkout-from-commit | Checkout the feature branch from the commit instead of the latest base branch. It only works in a feature. |
--keep-local-changes | Keep local changes when add a local repository with copy/move mode. |
--recurse-submodules | After the clone is created, initialize all submodules within, using their default settings. |
Example:
# Copy a relative path into current feature, and keep the local changes.
$ mbox add ../repo1 --mode copy --keep-local-changes
# Download a remote url into current feature
$ mbox add [email protected]:xx/xxx.git
# Download a repository with a name, the name maybe a component name or a repository name
$ mbox add AFNetworking
$ mbox bundle
Redirect to Bundler with MBox environment
Example:
# Install gems with bundler
$ mbox bundle install
$ mbox config [NAME] [VALUE]
Get/Set Default Configuration
Arguments:
NAME | [Optional] Config Name |
VALUE | [Optional] Config Value |
Flags:
-d | --delete | Delete configuration to restore default value. |
-g | --global | Apply to global configuration. |
--rc | Apply to `~/.mboxrc`. | |
-w | --workspace | Use workspace setting |
Example:
# Get a value from gloal configuration
$ mbox config key --global
# Show all configs
$ mbox config
# Set a configuration in global configuration
$ mbox config key value --global
# Delete a configuation in global configuration
$ mbox config key --delete
$ mbox container disuse NAME
Deactive container in current feature
Arguments:
NAME | Container Name |
$ mbox container list
List available containers in current feature
Example:
# List all containers in current feature:
$ mbox container list
List avaliable containers:
MBoxReposDemo Bundler
$ mbox container use NAME
Active container in current feature
Arguments:
NAME | Container Name |
$ mbox deactivate NAME
Deactivate a or more components
Arguments:
NAME | Repo/Component Name |
Example:
# Deactivate all components in the `repo1`
$ mbox deactivate repo1
# Deactivate the component named `component1` in the `repo1`
$ mbox deactivate repo1/component1
$ mbox depend [NAME]
Show/Change dependencies
Arguments:
NAME | [Optional] The dependency name |
Options:
--branch | Set git branch |
--commit | Set git commit |
--git | Set git url |
--path | Set local path |
--source | Set source |
--tag | Set git tag |
--tool | Use the specified dependency management tool |
--version | Set version |
Flags:
--binary | Use binary version |
--reset | Reset to default version |
--show-all | Show all dependencies |
--show-changes | Show changed dependencies by MBox and other tools. |
--source | Use source version |
Example:
# Change a dependency version
$ mbox depend AFNetworking --version 2.0
# Show all changed dependencies
$ mbox depend
AFNetworking: version 2.0
$ mbox doc
Output all commands
Options:
--output-path | Output to the file |
Flags:
--markdown | Output with markdown format |
$ mbox env
Show MBox Environment
Options:
--only | Only show information. Avaliable: ROOT/SYSTEM/PLUGINS |
$ mbox exec
Exec command line in MBox Environment
Example:
# echo the `pwd` in workspace
$ mbox exec pwd
# echo environment variable
$ mbox exec printenv
$ mbox feature clean
Clean merged feature
$ mbox feature export [NAME]
Export a json from feature
Arguments:
NAME | [Optional] The feature name will be exported. |
$ mbox feature merge
Create a MR to target branch
Flags:
--force | Force create the MR if there are some changes not be committed |
--forward | Create the MR with repos which forward target branch |
$ mbox feature finish
Finish current feature
Flags:
--force | Force remove current feature if there are some changes |
$ mbox feature free
Switch to the Free Mode
feature
$ mbox feature import STRING
Import a json/url as a feature
Arguments:
STRING | Feature JSON/URL |
Options:
--name | Use the name to override the name from the json |
Flags:
--check-branch-exists | Check if the feature branch exists |
--keep-changes | Create a new feature with local changes |
--recurse-submodules | After the clone is created, initialize all submodules within, using their default settings. |
$ mbox feature list
List all features
$ mbox feature remove [NAME]
Remove a feature
Arguments:
NAME | [Optional] Feature Name |
Flags:
--all | remove all feature, will not remove current feature and FreeMode |
--force | Force remove the feature if there are unmerged commits |
--include-repo | remove cached repo if the repo is not used by other features |
$ mbox feature start NAME
Create a new feature, or continue a exist feature
Arguments:
NAME | Feature Name |
Options:
--dependencies | Create a new feature with a custom dependency list. It is a JSON String, eg: {"Aweme": {"version": "1.0"}} |
--prefix | Create a new feature with a custom branch prefix. Default is `feature/`, use `--prefix=` to disable it. |
--repos | Create a new feature with a custom repo list. It is a JSON String, eg: {"Aweme": "develop"} or {"Aweme": {"base": "0ABCD", "base_type": "commit", "target_branch": "develop"}} |
Flags:
--checkout-from-remote | Create a new feature branch from remote base branch, it will fetch remote. Defaults is true if current is in a feature. |
--clear | Create a new feature with a empty workspace |
--keep-changes | Create a new feature with local changes |
--pull | Pull remote branch after finish |
--recurse-submodules | After the clone is created, initialize all submodules within, using their default settings. |
$ mbox fork [PATHS [...]]
Quckly open git repository in the Fork app.
Arguments:
PATHS | [Optional] Specific Path |
$ mbox gem
Redirect to Gem with MBox environment
$ mbox git COMMAND
Execute git command for every repo
Arguments:
COMMAND | The command will be executed |
Options:
--no-repo | Exclude a repo, use this option multiple times to exclude multiple repos |
--repo | Specify a repo, use this option multiple times to specify multiple repos |
$ mbox git config COMMAND
Execute git command for every repo
Arguments:
COMMAND | The command will be executed |
Flags:
--workspace | use the workspace config file |
$ mbox git hooks
Show/Set the git hooks for workspace
Flags:
--disable | Enable workspace hooks |
--enable | Enable workspace hooks |
$ mbox git-sheet fetch
Perform git fetch for every repo
$ mbox git-sheet pull
Perform git pull for every repo
$ mbox git-sheet push
Perform git push for every repo
$ mbox git-sheet status
Show git status for every repo
$ mbox go [NAME]
Quickly open path or workspace.
Arguments:
NAME | [Optional] Specific workspace file to open |
$ mbox init [PLUGIN_GROUP [...]]
Init Workspace
Arguments:
PLUGIN_GROUP | [Optional] A plugin set. Available: android/flutter/ios/macos/plugin/ruby |
Options:
--name | To set the new MBox workspace (folder) name. |
--plugin | Config the plugin. It could be used many times to config more plugins. |
$ mbox kerberos destroy [USEREMAIL]
Detroy all tickets
Arguments:
USEREMAIL | [Optional] User Name, Defaults: [email protected] |
Flags:
--keychain | Remove password from keychain |
$ mbox kerberos init [USEREMAIL]
Acquire initial tickets
Arguments:
USEREMAIL | [Optional] User Name, Defaults: [email protected] |
Flags:
--password | User Password |
$ mbox kerberos list [EMAIL]
List Kerberos credentials
Arguments:
[Optional] User Email |
$ mbox kerberos renew [USEREMAIL]
Acquire renew tickets
Arguments:
USEREMAIL | [Optional] User Name, Defaults: [email protected] |
$ mbox login [TIMEOUT]
Login MBox
Arguments:
TIMEOUT | [Optional] Maximum waiting time for Login |
$ mbox logout
Logout MBox
$ mbox merge [NAME]
Merge other feature
/target branch
into current feature
Arguments:
NAME | [Optional] Merge the Feature into current feature |
Options:
--no-repo | Exclude a repo, use this option multiple times to exclude multiple repos. |
--repo | Specify a repo, use this option multiple times to specify multiple repos. |
Flags:
--dry-run | Do everything except actually merge. |
$ mbox new NAME [BRANCH]
Create a project in workspace
Arguments:
NAME | Project Name |
BRANCH | [Optional] Create the branch |
$ mbox open [PATHS [...]]
Open specific path in MBox Environment
Arguments:
PATHS | [Optional] Specific Path |
Flags:
--logdir | Open log folder |
$ mbox plugin build [NAME [...]]
Build the development plugin(s)
Arguments:
NAME | [Optional] Plugin Names, otherwise will release all plugins. |
Options:
--output-dir | The directory for the output |
--stage | The build stage Avaliable: Launcher/Resource/Electron/Native/Ruby |
Flags:
--clean | Clean output directory. Defaults: YES if no stage options. |
--force | Force release exists version |
--test | Run the unit test. Defaults: YES |
$ mbox plugin dev TEMPLATE [NAME]
Use a template to develop a MBox Plugin
Arguments:
TEMPLATE | Plugin Template. Avaliable: Launcher/Resource/Electron/Native/Ruby |
NAME | [Optional] Plugin Name (eg: MBoxCore) |
$ mbox plugin disable [NAME [...]]
Disable plugins by name.
Arguments:
NAME | [Optional] Plugin names |
$ mbox plugin enable [NAME [...]]
Enable plugins by name.
Arguments:
NAME | [Optional] Plugin names |
$ mbox plugin install [NAME [...]]
Install Plugin
Arguments:
NAME | [Optional] Names of Plugins. Empty(Default) indicate that install all plugins needed. |
Flags:
--update | Update plugin if needed. |
$ mbox plugin launch [NAME [...]]
Run a plugin launcher
Arguments:
NAME | [Optional] Launcher names |
Options:
--role | Set current role, defaults to environment variable `MBOX_ROLES` |
--script | Run the script name Avaliable: check/install/uninstall/upgrade |
$ mbox plugin list
List all plugins
$ mbox plugin next-version [NEW-VERSION]
Increments the version numbers
Arguments:
NEW-VERSION | [Optional] Set a version instead of Increments. |
$ mbox plugin release [NAME [...]]
Release a/some development plugin(s)
Arguments:
NAME | [Optional] Plugin Names, otherwise will release all plugins. |
$ mbox plugin search NAME
Search plugins on the Plugin Market
Arguments:
NAME | Plugin name |
$ mbox plugin test [NAME [...]]
Test the native plugin(s)
Arguments:
NAME | [Optional] Plugin Names, otherwise will test all plugins. |
Options:
--file | Only run specific test file |
--method | Only run specific test method |
$ mbox plugin uninstall [NAME [...]]
Uninstall Plugins
Arguments:
NAME | [Optional] Names of Plugins |
Flags:
--all | Uninstall all plugins in user directory |
$ mbox pod
Redirect to Bundler with MBox environment
Example:
# Install gems with bundler
$ mbox bundle install
$ mbox product add [NAME] [PLATFORM]
Add Product
Arguments:
NAME | [Optional] Product Name or AppID or URL |
PLATFORM | [Optional] Platform Name Avaliable: iOS/Android/Flutter |
Options:
--json | Product information string |
$ mbox product remove [NAME]
Remove Product
Arguments:
NAME | [Optional] Product Name or AppId |
$ mbox product sync [NAME]
Sync Product
Arguments:
NAME | [Optional] Product Name or AppId |
$ mbox product update [NAME]
Update Product, it will redeploy dynamic repository if exists.
Arguments:
NAME | [Optional] Product Name or AppID |
$ mbox remove NAME [...]
Remove project from workspace
Arguments:
NAME | Repo Name |
Flags:
--all | Remove all repos |
--force | Force remove repo if modified |
--include-repo | Remove repo from `.mbox/repos` |
$ mbox repo search NAME
Manage Repos
Arguments:
NAME | The name to search |
Flags:
--only-search-remote | Search repo on remote |
$ mbox setup
Setup Command Line Tool
Options:
--bin-dir | Output the executable bin to specific directory. Default value: `/usr/local/bin` |
Flags:
--zsh | Install autocompletion support for zsh |
$ mbox status [NAME]
Show Status
Arguments:
NAME | [Optional] Show Other Feature |
Options:
--only | Only show information. Avaliable: root/feature/repos/dependencies/containers/products |
Flags:
--sync | Sync config and repos |
$ mbox stree [PATHS [...]]
Quckly open git repository in the SourceTree app.
Arguments:
PATHS | [Optional] Specific Path |
$ mbox tower [PATHS [...]]
Quckly open git repository in the Tower app.
Arguments:
PATHS | [Optional] Specific Path |
$ mbox update
Upgrade MBox Application
Flags:
--beta | Upgrade to the beta version |
--force | Force download the latest version |
--stable | Upgrade to the stable version |
$ mbox yarn repo
Operation for a single repo.
$ mbox yarn repos info
Show package information about your repos.
Fork it and send a pull request.
- Contact us with Lark
- Send an email to [email protected]
- Create an issue