@mimik/create-mim
v1.0.2
Published
Creates a new mimik edge microservice.
Readme
@mimik/create-mim
Scaffold a new mim (micro intelligence module) project for the mimOE runtime.
Requirements
- Node.js 18+ (tested on Node 22)
- macOS, Linux, or Windows
Quick start
npx @mimik/create-mim create my-agent
cd my-agent
npm install
npm run buildThat creates an AI agent mim (the default template). Run npx @mimik/create-mim list to see other templates.
Usage
Create a new mim
npx @mimik/create-mim create <project-name> [-t <template>] [-d "<description>"]| Flag | Description |
|----------------------|--------------------------------------------------------------|
| -t, --template | Template to scaffold from. Default: ai-agent. |
| -d, --description | Description written into the generated package.json. |
The command creates ./<project-name>/ from the chosen template. It refuses to overwrite an existing directory.
List available templates
npx @mimik/create-mim listTemplates
| Template | When to use it |
|--------------|----------------|
| ai-agent | (Default) AI agent built on @mimik/agent-kit with MCP tools. Needs an inference service — set INFERENCE_MODEL, INFERENCE_BASE_URI, INFERENCE_API_KEY in config/start-example.json before deploying. |
| api-first | Swagger-driven microservice. Edit config/swagger.yml to define endpoints and schemas; controllers live in src/controllers/. |
After scaffolding
cd <project-name>
npm install
npm run build # webpack → build/index.js
./scripts/deploy.sh --build --redeploy # deploy to a local mimOE nodeFor an ai-agent project, edit config/start-example.json to point at your inference service before the first deploy.
Generated project layout
ai-agent
my-agent/
├── .gitignore
├── .eslintignore
├── eslint.config.js
├── webpack.config.js
├── package.json
├── config/
│ ├── default.yml
│ └── start-example.json # env vars for deploy (inference service, API keys)
├── scripts/
│ ├── init.sh # download / install the local mimOE runtime
│ ├── start-mimoe.sh # start the local mimOE node
│ └── deploy.sh # build, package, and deploy the mim
├── src/
│ ├── agent.js # agent persona + LLM config
│ ├── index.js # HTTP entry point (mimikModule.exports)
│ ├── polyfills.js # ES5 polyfills for the Duktape runtime
│ └── tools.js # MCP tool definitions — edit to add your tools
└── test/
└── local.http # VS Code REST Client requestsapi-first
my-api/
├── .gitignore
├── .eslintignore
├── eslint.config.js
├── webpack.config.js
├── package.json
├── CLAUDE.md
├── config/
│ ├── default.yml
│ ├── start-example.json
│ └── swagger.yml # source of truth for endpoints & schemas
├── scripts/ # init.sh, start-mimoe.sh, deploy.sh
├── src/
│ ├── index.js
│ ├── polyfills.js
│ ├── controllers/ # one file per swagger x-swagger-router-controller
│ ├── processors/ # business logic
│ ├── lib/ # helpers
│ └── securityHandlers/ # auth handlers (e.g. bearer)
└── test/
└── local.httpLicense
MIT © mimik technology inc.
