Skip to main content

Get started

Mify is an open-source developer productivity tool which generates infrastructure code for your backend service and maintains it as your codebase grow.

It provides infra code for stuff like API, configs, logs, and metrics, allowing you and your team to focus on meaningful code. Services generated by Mify can be deployed easily to any cloud of your choice.

Installing Mify

Before using the CLI you need to install and start Docker which is used for running some code generation tasks, You can refer to Docker's guide for installation. Right now Mify should work on Linux, Mac and WSL.

Here are the steps for installation:

brew tap mify-io/tap
brew install mify-io/tap/mify
Binary downloads
AMD64
Version:
ARM64
Version:
Release information
Changelog
Version:

Or you can get the latest Mify CLI directly from GitHub Releases page.

Creating your first project

After installing Mify CLI call this command:

mify init <project-name>

You will see a directory called <project-name> which is now your workspace where you can add your services. Go into workpace with cd <project-name> and create your first service:

mify add service <service-name>

You will see that this command generated a service in go-services directory. In schemas/<service-name>/api.yaml there is OpenAPI schema which is a starting point for creating service handlers. Run mify generate after changing the schema and new handler will appear at go-services/internal/<service-name>/handlers/path/to/api/service.go.

And if you also run:

mify add frontend <frontend-service-name>

As the name of this command suggests, this will be your project's frontend. After running this command you will find it in a js-services directory.

Running the service

Get into go-services directory and install dependencies:

$ cd go-services
$ go mod tidy

Build and run the service:

$ go run ./cmd/<service-name>

Check out our guides to get more undestanding on how to write services with Mify.

Development prerequisites

At this moment Mify supports Go, Python and ExpressJS based templates for backends, and NuxtJS and React on Typescript for frontends, here's what you need to install before starting developing in your choosen template:

  • Go:

    • Go >= 1.18
  • Python (beta):

    • Python >= 3.8
    • python3-pip
    • python3-venv
  • NuxtJS, React, ExpressJS:

    • Node >= 18.12.1
    • Yarn

Getting the last version

You can always install mify from main branch using Go:

$ go install github.com/mify-io/mify/cmd/mify@latest

Community

Join our Slack channel if have suggestions or if you need any help.