PageSourceSearch

https://docs.mia-platform.eu/assets/js/f0980f3a.9b521cb7.js

js mia-platform.eu collected 2026-10-02 06:03:20 UTC 11,651 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkmia_platform_docs=self.webpackChunkmia_platform_docs||[]).push([["11001"],{384838(e,n,l){l.r(n),l.d(n,{metadata:()=>s,default:()=>d,frontMatter:()=>t,contentTitle:()=>a,toc:()=>c,assets:()=>r});var s=JSON.parse('{"id":"runtime-components/tools/mlp/setup","title":"Setup","description":"Installation","source":"@site/versioned_docs/version-15.1.0/runtime-components/tools/mlp/20_setup.md","sourceDirName":"runtime-components/tools/mlp","slug":"/runtime-components/tools/mlp/setup","permalink":"/docs/runtime-components/tools/mlp/setup","draft":false,"unlisted":false,"tags":[],"version":"15.1.0","sidebarPosition":20,"frontMatter":{"id":"setup","title":"Setup","sidebar_label":"Setup"},"sidebar":"marketplace","previous":{"title":"Overview","permalink":"/docs/runtime-components/tools/mlp/overview"},"next":{"title":"Generate","permalink":"/docs/runtime-components/tools/mlp/generate"}}'),o=l(474848),i=l(28453);let t={id:"setup",title:"Setup",sidebar_label:"Setup"},a,r={},c=[{value:"Installation",id:"installation",level:2},{value:"Linux and MacOs",id:"linux-and-macos",level:3},{value:"Homebrew",id:"homebrew",level:4},{value:"Go",id:"go",level:4},{value:"Binary Download",id:"binary-download",level:4},{value:"Docker",id:"docker",level:4},{value:"Windows",id:"windows",level:3},{value:"Installation of WSL",id:"installation-of-wsl",level:4},{value:"Install <code>mlp</code>",id:"install-mlp",level:4},{value:"Shell Autocompletion",id:"shell-autocompletion",level:2},{value:"<code>bash</code>",id:"bash",level:3},{value:"<code>zsh</code>",id:"zsh",level:3},{value:"<code>fish</code>",id:"fish",level:3}];function h(e){let n={a:"a",code:"code",h2:"h2",h3:"h3",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.h2,{id:"installation",children:"Installation"}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.code,{children:"mlp"})," can be installed in different ways, you can choose the one that better fits your needs and the operating system\nyou are using:"]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.a,{href:"#linux-and-macos",children:"Linux and MacOs"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.a,{href:"#homebrew",children:"Homebrew"})}),"\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.a,{href:"#go",children:"Go"})}),"\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.a,{href:"#binary-download",children:"Binary Download"})}),"\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.a,{href:"#docker",children:"Docker"})}),"\n"]}),"\n"]}),"\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.a,{href:"#windows",children:"Windows (with WSL)"})}),"\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.a,{href:"#shell-autocompletion",children:"Shell Autocompletion"})}),"\n"]}),"\n",(0,o.jsx)(n.h3,{id:"linux-and-macos",children:"Linux and MacOs"}),"\n",(0,o.jsx)(n.h4,{id:"homebrew",children:"Homebrew"}),"\n",(0,o.jsxs)(n.p,{children:["If you have ",(0,o.jsx)(n.a,{href:"https://brew.sh",title:"The Missing Package Manager for macOS (or Linux)",children:"Homebrew"})," installed on your system ",(0,o.jsx)(n.code,{children:"mlp"})," is only a command away:"]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-sh",children:"brew install mia-platform/tap/mlp\n"})}),"\n",(0,o.jsxs)(n.p,{children:["This method will also automatically setup the shell completions for ",(0,o.jsx)(n.code,{children:"bash"}),", ",(0,o.jsx)(n.code,{children:"zsh"})," and ",(0,o.jsx)(n.code,{children:"fish"}),"."]}),"\n",(0,o.jsx)(n.h4,{id:"go",children:"Go"}),"\n",(0,o.jsxs)(n.p,{children:["If you have ",(0,o.jsx)(n.a,{href:"https://go.dev",title:"Build simple, secure, scalable systems with Go",children:"Golang"})," installed with a version >= 1.13 in your system and you have the ",(0,o.jsx)(n.code,{children:"$GOPATH"}),"env set, you can\ninstall ",(0,o.jsx)(n.code,{children:"mlp"})," like this:"]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-sh",children:"go install github.com/mia-platform/[email protected]\n"})}),"\n",(0,o.jsxs)(n.p,{children:["Or like this if the ",(0,o.jsx)(n.code,{children:"install"})," command is not available"]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-sh",children:"go get -u github.com/mia-platform/[email protected]\n"})}),"\n",(0,o.jsx)(n.h4,{id:"binary-download",children:"Binary Download"}),"\n",(0,o.jsxs)(n.p,{children:["You can install ",(0,o.jsx)(n.code,{children:"mlp"})," with the use of ",(0,o.jsx)(n.code,{children:"curl"})," or ",(0,o.jsx)(n.code,{children:"wget"})," and downloading the latest packages available on GitHub\nchoosing the correct platform and operating system:"]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-sh",children:"curl -fsSL --proto '=https' --tlsv1.2 https://github.com/mia-platform/mlp/releases/download/v2.6.0/mlp-linux-amd64 -o /tmp/mlp\n"})}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-sh",children:"wget -q --https-only 
1--secure-protocol=TLSv1_2 https://github.com/mia-platform/mlp/releases/download/v2.6.0/mlp-linux-amd64 -O /tmp/mlp\n"})}),"\n",(0,o.jsxs)(n.p,{children:["After you have downloaded the file you can validate it against the ",(0,o.jsx)(n.a,{href:"https://github.com/mia-platform/mlp/releases/download/v2.6.0/checksums.txt",title:"mlp checksums",children:"checksum"})," running the command:"]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-sh",children:"sha256sum /tmp/mlp\n"})}),"\n",(0,o.jsxs)(n.p,{children:["After you have validated that the downloaded file is correct, move the binary in your ",(0,o.jsx)(n.code,{children:"/usr/local/bin"})," folder"]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-sh",children:"sudo install -g root -o root /tmp/mlp /usr/local/bin\n"})}),"\n",(0,o.jsx)(n.h4,{id:"docker",children:"Docker"}),"\n",(0,o.jsx)(n.p,{children:"If you want to run the cli in its environment or you want to test the cli you can use the Docker image:"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-sh",children:"docker run ghcr.io/mia-platform/mlp:v2.6.0\n"})}),"\n",(0,o.jsx)(n.h3,{id:"windows",children:"Windows"}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.code,{children:"mlp"})," is not directly compatible with Windows, even if you have Go installed compilation on this OS\nis not possible due to current technical restrictions."]}),"\n",(0,o.jsxs)(n.p,{children:["However, it is still possible to use ",(0,o.jsx)(n.code,{children:"mlp"})," with Windows Subsystem for Linux (WSL), as explained here below."]}),"\n",(0,o.jsx)(n.h4,{id:"installation-of-wsl",children:"Installation of WSL"}),"\n",(0,o.jsxs)(n.p,{children:["If you don't have WSL on your system, follow the ",(0,o.jsx)(n.a,{href:"https://learn.microsoft.com/en-us/windows/wsl/install",title:"How to install Linux on Windows with WSL",children:"official guide"})," to get it."]}),"\n",(0,o.jsxs)(n.p,{children:["Once WSL is installed, to open a Linux bash terminal, press Start+R, enter ",(0,o.jsx)(n.code,{children:"bash"})," in the text box and press OK."]}),"\n",(0,o.jsxs)(n.h4,{id:"install-mlp",children:["Install ",(0,o.jsx)(n.code,{children:"mlp"})]}),"\n",(0,o.jsxs)(n.p,{children:["You can now install mlp with any of the methods explained above for Linux,\nwe suggest the ",(0,o.jsx)(n.a,{href:"#binary-download",children:"binary installation"})," since it's the most straightforward."]}),"\n",(0,o.jsx)(n.h2,{id:"shell-autocompletion",children:"Shell Autocompletion"}),"\n",(0,o.jsx)(n.p,{children:"If you have chosen to use an installation method different from the brew one, you will have to setup the\ncommands autocompletion for your shell following one of these guides:"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.a,{href:"#bash",children:(0,o.jsx)(n.code,{children:"bash"})})}),"\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.a,{href:"#zsh",children:(0,o.jsx)(n.code,{children:"zsh"})})}),"\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.a,{href:"#fish",children:(0,o.jsx)(n.code,{children:"fish"})})}),"\n"]}),"\n",(0,o.jsx)(n.p,{children:"When you update the command remember to relaunch the command for your shell to update the completion definition\nand get the latest command and/or flags that has been added."}),"\n",(0,o.jsx)(n.h3,{id:"bash",children:(0,o.jsx)(n.code,{children:"bash"})}),"\n",(0,o.jsxs)(n.p,{children:["The ",(0,o.jsx)(n.code,{children:"bash"})," autocompletion needs the ",(0,o.jsx)(n.a,{href:"https://github.com/scop/bash-completion",title:"Programmable completion functions for bash",children:(0,o.jsx)(n.code,{children:"bash-completion"})})," package installed on your system."]}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Warning:"})," for working correctly you need the ",(0,o.jsx)(n.code,{children:"bash-completion"})," V2 that is compatible only with Bash 4.1+,\nplease be sure to have the correct versions installed on your system before running the command."]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-sh",children:"mlp completion bash >/usr/local/etc/bash_completion.d/mlp\n"})}),"\n",(0,o.jsxs)(n.p,{children:["After done this you must restart your shell environment or launch ",(0,o.jsx)(n.code,{children:"exec bash"})," for reloading the configurations\nand enable the autocompletion."]}),"\n",(0,o.jsx)(n.h3,{id:"zsh",children:(0,o.jsx)(n.code,{children:"zsh"})}),"\n",(0,o.jsxs)(n.p,{children:["For setting up the ",(0,o.jsx)(n.code,{children:"zsh"})," completion, you must enable it. You can use the following command:"]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-sh",children:'echo "autoload -U compinit; compinit" >> ~/.zshrc\n'})}),"\n",(0,o.jsxs)(n.p,{children:["Or use something like ",(0,o.jsx)(n.a,{href:"https://ohmyz.sh",title:"Oh My Zsh is a delightful, open source, community-driven\nframework for managing your Zsh configuration",children:(0,o.jsx)(n.code,{children:"oh-my-zsh"})})," that will enable it by default. Once you have done it you can launch the\nfollowing command to create the file needed by ",(0,o.jsx)(n.code,{children:"zsh"}),":"]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-sh",children:"mlp completion zsh > /usr/local/share/zsh/site-functions/_mlp\n"})}),"\n",(0,o.jsxs)(n.p,{children:["After done this you must restart your shell environment or launch ",(0,o.jsx)(n.code,{children:"exec zsh"})," for reloading the configurations and\nenable the autocompletion."]}),"\n",(0,o.jsx)(n.h3,{id:"fish",children:(0,o.jsx)(n.code,{children:"fish"})}),"\n",(0,o.jsxs)(n.p,{children:["To enable the autocompletion in ",(0,o.jsx)(n.code,{children:"fish"})," you have to run this command:"]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-sh",children:"mlp completion fish > ~/.config/fish/completions/mlp.fish\n"})}),"\n",(0,o.jsxs)(n.p,{children:["After done this you must restart your shell environment or launch ",(0,o.jsx)(n.code,{children:"exec fish"})," for reloading the configurations and\nenable the autocompletion."]})]})}function d(e={}){let{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(h,{...e})}):h(e)}},28453(e,n,l){l.d(n,{R:()=>t,x:()=>a});var s=l(296540);let o={},i=s.createContext(o);function t(e){let n=s.useContext(i);return s.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:t(e.components),s.createElement(i.Provider,{value:n},e.children)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.