The command line h2i comes in the npm package @davixlabs/h2i-mcp. It runs Davix H2I tools on files and folders on your computer, and the same program is also the helper that lets AI apps work on your local files (MCP). It needs Node.js 18 or newer.
Sign in
npx -y @davixlabs/h2i-mcp login
npx -y @davixlabs/h2i-mcp login --no-browser # on a server: shows a code and an address
A browser window opens on the Davix H2I website; check the name “Davix H2I helper” and press Allow access. Your sign-in is stored on your computer, readable only by you, and stays valid for 90 days without use by default. logout ends it on the computer and on the server. For scripts and servers you can set DAVIX_H2I_TOKEN instead.
Commands
The examples write h2i. If you have not installed the package (npm install -g @davixlabs/h2i-mcp), write npx -y @davixlabs/h2i-mcp in its place; h2i-mcp is the same command.
h2i ops resize # find an operation
h2i run images.resize photo.png --param width=1600 # run it on a file
h2i run pdfs.merge a.pdf b.pdf --out merged.pdf # several files in, one result
h2i folder images.optimize ./photos --out-dir ./small --recursive
opssearches the operations, which are read live from the server so the list is never out of date.runsends one or more files to an operation and saves the result next to the original (named likephoto.davix.png) or where you say with--out. An existing file is never replaced unless you add--overwrite.folderruns an operation on every matching file of a folder, with--out-dirinto another folder, with--recursiveinto sub-folders and with--ext jpg,pngonly for those file types.setupadds Davix H2I to the AI apps on your computer (--clientpicks one app,--alland--yesskip the question,--printonly shows what it would write);doctorchecks Node, the connection, your sign-in and each app’s settings;whoamishows where your sign-in comes from and when it expires;logoutends it.
Files are sent untouched, and the helper checks that the copy on the server is identical before it works on it.
Requirements
The command line uses your Davix H2I account, so the tools and limits of your plan apply. Using it as the helper for AI apps needs a plan that includes MCP.
Prefer code? Use the Node SDK.
Checked against the helper README and the npm registry.
