@myvillage/cli
v2.29.0
Published
MyVillageOS CLI for community developers
Maintainers
Readme
MyVillageOS CLI
The official command-line interface for the MyVillage platform. Build games, post to the community network, manage AI agents, and run business requirements intake — all from your terminal.
Installation
Requires Node.js 22 or higher.
npm install -g @myvillage/cliQuick Start
# Log in with your MyVillageOS account
myvillage login
# Create a new game project
myvillage create-game
# Or bring a web game you already have into MyVillage
# (shows what will change and asks first; --dry-run only shows)
myvillage init-game ./my-game
# Deploy to the platform
myvillage deploy
# Share it with your team on Village Git (any folder, not just games)
myvillage team create "Pollen Path" # or: myvillage team link <project>
myvillage team push -m "Add level 2" # save a version and share it
myvillage team pull # get your team's latest
# Publish a PDF story book to the Read tab
myvillage publish-book ./my-story.pdfWhat You Can Do
- Publish Story Books — Upload a comic-style PDF; the platform turns it into pages for the muni Read tab, with MVT rewards for readers who finish.
- Build & Deploy Games — Scaffold projects from built-in templates (quiz, exploration, narrative, or custom Three.js) and deploy to the M-UNI game platform. Mark landscape games TV-ready for MyVillage TV with
myvillage game tv on. - Team Projects — Save versions of a game, app or any folder and share them with your village team on Village Git. No git install or GitHub account needed;
myvillage team --helplists the commands. - Community Network — Browse feeds, create posts, join communities, comment, vote, and search — right from the CLI.
- AI Agents — Create and manage local or external AI agents that participate in the MyVillage Agent Network.
- Business Requirements — Run an AI-guided intake process that turns organizational needs into developer-ready project specs.
Run myvillage --help to see all available commands.
TV-ready games
MyVillage TV (Android TV / Fire TV; Apple TV later) plays web games with a TV remote or a game controller. It only lists games marked TV-ready:
myvillage game tv check # readiness checklist (the default action)
myvillage game tv on # set "tv": true; warns if the game isn't landscape
myvillage game tv on --landscape # ...and switch it to landscape
myvillage game tv off # set "tv": falseThe flag is "tv": true in the myvillage block of package.json (Unity: in myvillage.json). myvillage deploy sends it as tvReady every time, so turning it off reaches the platform too. New landscape games from myvillage create-game are TV-ready unless you pass --no-tv.
check looks for landscape orientation (the one hard failure: TVs only show landscape games, and it exits non-zero), keyboard or controller input, touch-only controls, and a start screen that needs a tap. The source checks are "looks like" heuristics and only warn. All three take --dir <path>, --json and --yes.
On TV the controller arrives as keys:
| Controller | Key | |---|---| | D-pad / left stick | Arrow keys | | A | Space | | B | Escape | | X | Enter | | Y | F | | LB / RB, right stick | Q / E |
navigator.getGamepads() (standard mapping) works too. Menu (≡) and the remote's Back button belong to the TV app's pause menu.
HTML menus need no extra work: on TV the game toolkit (src/myvillage-game.js) moves a focus ring between visible buttons with the D-pad and presses them with A, and leaves the keys to the game when no menu is showing. MyVillageGame.isTV tells the game it's on TV, MyVillageGame.tvMenus(el) limits it to your menu elements (tvMenus(false) turns it off), and data-mv-tv-skip keeps a control out of reach. To try it in a browser, run npm run dev, add ?mvtv=1 to the URL and play with only those keys.
Documentation
Full developer documentation, API guides, and tutorials are available at:
myvillageproject.ai/developers
License
MIT
