@nila-rw/nila
v0.2.0
Published
CLI for the Nila platform — push and release apps and themes
Readme
@nila-rw/nila
The Nila CLI: build, push and release apps and themes, and connect AI agents to your partner account over MCP.
npm install -g @nila-rw/nila
nila loginSigning in
nila login opens the Nila dashboard in your browser. Sign in there if you
are not already, check the code matches the one in your terminal, and press
Approve. The CLI picks the session up within a few seconds and stores it in
~/.nila/config.json (mode 600). No API key to create, copy or rotate.
$ nila login
Your one-time code: 7KQK-87BN
Opened https://app.nila.rw/device — approve the request there.
Waiting for approval…
Signed in as [email protected] in Studio Labs (owner).- On a machine without a browser (SSH, a container), use
nila login --no-browserand open the printed link on any device. nila whoamishows who you are signed in as, the organisation, and your default app and theme.nila logoutrevokes the session on the server and forgets it locally.- The session lasts a week and renews itself while you use it.
CI never needs a browser: set NILA_TOKEN (and NILA_API_URL, NILA_APP_ID,
NILA_THEME_ID as needed) in the environment, or run
nila login --token <token>. Environment variables win over the stored config.
Apps
nila app create --name "Reviews" # registers it, prints the client secret once, makes it the default
nila app init --template react # scaffold nila.app.json and an admin page
nila app push # validate and upload the draft
nila app deploy # release the draft to installed merchants
nila app list # * marks the default app
nila app use <appId> # switch the defaultThemes
nila theme create --name "Kigali" # registers it and makes it the default
nila theme check # validate schemas, presets and templates locally
nila theme push # upload the folder as the draft
nila theme deploy # release; installed stores get an update prompt
nila theme list
nila theme use <themeId>See docs/themes/cli.md for what check, push
and deploy do in detail.
Webhooks
nila webhook trigger orders/create --store <slug>
nila webhook tailAI agents (MCP)
Nila speaks the Model Context Protocol, so an AI agent can do anything you can do in Nila, as you: run your stores (products, orders, customers, inventory, discounts, themes), build and release partner apps and themes, and — for Nila staff — work in the platform console. There are two ways in; both act with exactly your permissions.
Hosted, for Claude, ChatGPT and other assistants — add
https://api.nila.rw/mcp as a custom connector. The assistant opens Nila's
sign-in and consent pages; nothing to install, no key to paste. See
docs/mcp.md.
Local, for coding agents — nila mcp runs the same tools over stdio with
your nila login session, plus tools that work on folders on your machine:
claude mcp add nila -- nila mcpCursor, Codex, VS Code and most others take the same entry in their MCP config:
{
"mcpServers": {
"nila": { "command": "nila", "args": ["mcp"] }
}
}Without a global install, use "command": "npx", "args": ["-y", "@nila-rw/nila", "mcp"].
| Tool | What it does |
| -------------------------------------- | ---------------------------------------------------------------------- |
| whoami | You, your stores, your partner organisation, your platform role |
| search_api, describe_api_operation | Find any of the API's operations and read its contract |
| call_api | Call it as you (admin calls take the store's slug) |
| init_app, push_app | Scaffold an app folder; upload it as the app's draft — nila mcp only |
| check_theme, push_theme | Validate a theme folder; upload it as the draft — nila mcp only |
Pushing never reaches merchants; the agent is told to show you a release's
impact and wait for your go-ahead before releasing. nila logout cuts the
local agent off; disconnect a hosted one under Settings → Connected apps.
