Metadata-Version: 2.1
Name: mod-cli
Version: 0.1.2
Summary: a CLI Tool for Mojo Package Manager
Author: Henry.Huang
Author-email: hhglory@outlook.com
Requires-Python: >=3.10,<4.0
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: jinja2 (>=3.1.2,<4.0.0)
Requires-Dist: loguru (>=0.7.2,<0.8.0)
Requires-Dist: rich (>=13.7.0,<14.0.0)
Requires-Dist: tomlkit (>=0.12.3,<0.13.0)
Requires-Dist: typer[all] (>=0.9.0,<0.10.0)
Description-Content-Type: text/markdown

# Mod = (Mojo Dep)

English | [简体中文](README_CN.md)

## Intro

- [Mojo](https://docs.modular.com/mojo/) Package Manager Tool
- like:
    - Rust: `Cargo`
    - Python: `Pip/Poetry/PDM`
    - Go: `Dep + Vendor`

## Quick Start

- ✅ requirements:
    - mojo 0.6+
    - python 3.10+
    - git

```ruby
mojo -v            
mojo 0.6.1 (876ded2e)

python --version                                                                                                                                          07:27:03
Python 3.10.9

```

- ✅ install `mod`:

```ruby

pip install mod-cli

# or
poetry add mod-cli --dev

```

- ✅ Usage: (Using the `mod` command)
    - [x] `mod new`: create a new mojo project
        - `--lib`: Create a library project.
        - `--bin`: Create an application (executable binary).
    - [ ] `mod init`: Create a new mojo package in an existing directory
    - [ ] `mod build`: build a `mojopkg`
    - [ ] `mod install`: download mojo dependencies to `target/deps`
    - [ ] `mod hack`:
        - `mod hack build`: build `target/deps` dependencies into `mojopkg`
        - `mod hack install`: install `target/deps` dependencies to `mojo standard library path
        - `mod hack uninstall`: uninstall `target/deps` dependencies
        - `mod hack clean`: Clean the mojopkg (binary library) generated by compiling target/deps.
    - [ ] `mod run`: Run a mojo file.
    - [ ] `mod test`: Run unit tests.
    - [ ] `mod add`: Add a dependency.
    - [ ] `mod remove`: Remove a dependency.
    - [ ] `mod list`: List all dependencies.
    - [ ] `mod search`: Search for dependencies (fuzzy search).
    - [ ] `mod sync`: Sync dependencies.
    - [ ] `mod lint`: Code style check.
    - [ ] `mod publish`: Publish a mojo project.
    - [ ] `mod workspace`: Manage monorepo workspaces.
        - `mod workspace init`: Initialize a workspace.
        - `mod workspace list`: List workspaces.
        - `mod workspace add`: Add a workspace.
        - `mod workspace remove`: Remove a workspace.
    - [ ] `mod self`: Manage itself.
        - `mod self update`: Update the mod command itself.
    - [x] `mod help`: Show help information.

```ruby

mod --help


```

## Manual

- `mod cmds`

### ✅ Create a new project

- like `cargo new` style:

```ruby
# new a libary
mod new your/path/to/project --lib

# new a app
mod new your/path/to/project --bin
```

### ❎ Build Mojo Package

- ❎ TODO

```ruby

mod build

```

# References

- https://taskfile.dev
- typer: https://typer.tiangolo.com

> package manager

- [python + poetry](https://python-poetry.org/)
- [python + pdm](https://pdm-project.org/latest/)
- [rust + cargo](https://doc.rust-lang.org/cargo/)
- [golang + dep](https://github.com/golang/dep)
