Miru CLI is the command-line interface for Miru.
For MCP server/client setup and AI-agent integration, see Miru MCP Server and Client.
It is intended to work equally well for:
- humans working in a terminal
- shell scripts and automation
- AI agents acting on behalf of a user
The CLI does not have a separate permission model. Every command runs with the same access and scoping rules as the authenticated Miru user.
curl -fsSL https://raw.githubusercontent.com/saeloun/miru-web/main/tools/miru-cli/install.sh | bashThis installs miru into ~/.local/bin/miru using mise and Go 1.24.1.
From the repo:
cd tools/miru-cli
mise exec -- env GOBIN="$HOME/.local/bin" go install ./cmd/mirumise- a Miru user account
- access to a Miru instance, hosted or self-hosted
Log in with email and password:
miru login --email user@example.com --password your-passwordBy default this uses:
https://app.miru.so
For local or self-hosted Miru:
miru login --base-url http://127.0.0.1:9000 --email user@example.com --password your-password
miru config set-base-url --url http://127.0.0.1:9000- The CLI stores its session in
~/.config/miru/config.json - The token is a dedicated CLI bearer token, not the user’s main app token
- The session lasts 7 days
- Every successful CLI request refreshes the expiry for another 7 days
miru logoutrevokes the server-side CLI session and removes local credentials
The local config file lives at:
~/.config/miru/config.json
Current shape:
{
"base_url": "https://app.miru.so",
"token": "..."
}Show current config:
miru config showPrint current CLI token (for MCP/client setup):
miru config token
miru config token --format shellSet a different Miru instance:
miru config set-base-url --url http://127.0.0.1:9000Miru MCP uses the same authenticated CLI token. There is no separate MCP login flow.
Export the active CLI token:
export MIRU_CLI_TOKEN="$(miru config token)"For tools that expect shell assignment format:
miru config token --format shellExample MCP config (Codex):
[mcp_servers.miru]
url = "https://app.miru.so/mcp"
bearer_token_env_var = "MIRU_CLI_TOKEN"For stdio mode from this repo:
cd /path/to/miru-web
MIRU_MCP_TOKEN="$MIRU_CLI_TOKEN" bin/miru-mcpSee Miru MCP Server and Client for protocol details, Pro gating, and tool schemas.
Shows the available command surface.
Prints the installed CLI version.
Shows the current supported command set as JSON.
Fetches the current authenticated user and workspace.
Revokes the CLI session and removes local credentials.
Upgrades the CLI.
Behavior:
- when run from a local Miru checkout, it upgrades from that checked-out repo
- otherwise it upgrades from
github.com/saeloun/miru-web/tools/miru-cli/cmd/miru@latest
Lists projects visible to the authenticated user.
Options:
--search <term>filters projects by search term
Examples:
miru project list
miru project list --search solarUse this command to find the project_id required by miru time create and miru time update.
Lists clients visible to the authenticated user.
Options:
--query <term>optional search term
Examples:
miru client list
miru client list --query solarLists expenses visible to the authenticated user.
The response also includes vendors and categories, which provide the ids needed for miru expense create.
Options:
--query <term>optional search term
Examples:
miru expense list
miru expense list --query travelCreates an expense in the current workspace.
Options:
--amount <amount>required--date <YYYY-MM-DD>required--category-id <id>required--vendor-id <id>optional--description <text>optional--type <business|personal>optional, defaults tobusiness
Examples:
miru expense create --amount 42.25 --date 2026-03-09 --category-id 3 --description "Lunch with client"
miru expense create --amount 125.50 --date 2026-03-09 --category-id 3 --vendor-id 2 --type businessLists the authenticated user’s timesheet entries for a date range.
Options:
--from <YYYY-MM-DD>--to <YYYY-MM-DD>
Example:
miru time list --from 2026-03-01 --to 2026-03-09Creates a timesheet entry for the authenticated user.
Options:
--project-id <id>required--duration <minutes>required--date <YYYY-MM-DD>required--note <text>optional--bill-status <status>optional, defaults tounbilled
Example:
miru time create \
--project-id 2 \
--duration 90 \
--date 2026-03-09 \
--note "Worked on invoice flow" \
--bill-status unbilledExample prompt for daily Jira-to-Miru drafting:
Pull all work I did in Jira today, summarize it hour by hour when the issue history supports that, or collapse it into one full-day summary when it does not. Use `miru project list` to find the best matching Miru project, then draft the exact `miru time create` commands I should run. Do not submit anything until I approve the draft.
If you want the agent to submit after review, use:
Pull all work I did in Jira today, summarize it hour by hour when the issue history supports that, or collapse it into one full-day summary when it does not. Match each block to the best Miru project, show me the draft first, and only after I approve it run the `miru time create` commands.
Updates one of the authenticated user’s own timesheet entries.
Options:
--id <id>required--project-id <id>required--duration <minutes>required--date <YYYY-MM-DD>required--note <text>optional--bill-status <status>optional, defaults tounbilled
Example:
miru time update \
--id 631 \
--project-id 2 \
--duration 45 \
--date 2026-03-09 \
--note "Adjusted after review"Deletes one of the authenticated user’s own timesheet entries.
Options:
--id <id>required
Example:
miru time delete --id 631Lists invoices visible to the authenticated user.
Options:
--query <term>search term--page <page>pagination page--per <count>page size--status <status>invoice status filter
Examples:
miru invoice list
miru invoice list --status draft
miru invoice list --query INV0001 --page 1 --per 20Shows one invoice in detail.
Options:
--id <id>required
Example:
miru invoice show --id 1Creates a draft invoice with one or more line items.
Options:
--client-id <id>required--invoice-number <number>required--issue-date <YYYY-MM-DD>required--due-date <YYYY-MM-DD>required--line-item <name|description|YYYY-MM-DD|rate|minutes>required unless--line-items-jsonor--payload-fileis used--line-items-json <json>optional JSON array for advanced line-item payloads--payload-file <path>optional full invoice JSON payload; the file may contain either{ "invoice": { ... } }or the invoice object--currency <code>optional--reference <text>optional--status <status>optional, defaults todraft--discount <amount>optional--tax <amount>optional--tax-configuration-id <id>optional and repeatable--stripe-enabled <true|false>optional
Examples:
miru invoice create \
--client-id 2 \
--invoice-number INV-CLI-001 \
--issue-date 2026-05-19 \
--due-date 2026-06-18 \
--currency USD \
--line-item "Implementation|API work|2026-05-19|150|120"For generated or agent-authored invoices, a payload file is usually cleaner:
{
"invoice": {
"client_id": 2,
"invoice_number": "INV-CLI-002",
"issue_date": "2026-05-19",
"due_date": "2026-06-18",
"status": "draft",
"invoice_line_items_attributes": [
{
"name": "Implementation",
"description": "API work",
"date": "2026-05-19",
"rate": 150,
"quantity": 120
}
]
}
}miru invoice create --payload-file invoice.jsonSends an invoice email.
Options:
--id <id>required--recipients <email1,email2>required, comma-separated--subject <text>optional--message <text>optional
Example:
miru invoice send \
--id 1 \
--recipients client@example.com,finance@example.com \
--subject "Your invoice from Miru" \
--message "Please review and pay online."Lists payments visible to the authenticated user.
Options:
--query <term>optional search term
Examples:
miru payment list
miru payment list --query INV0003Shows one payment.
Options:
--id <id>required
Example:
miru payment show --id 1miru whoamimiru project list --search solar
miru time create --project-id 2 --duration 30 --date 2026-03-09 --note "CLI entry"miru time list --from 2026-03-09 --to 2026-03-09
miru time update --id 631 --project-id 2 --duration 45 --date 2026-03-09 --note "Adjusted entry"miru invoice create \
--client-id 2 \
--invoice-number INV-CLI-001 \
--issue-date 2026-05-19 \
--due-date 2026-06-18 \
--line-item "Implementation|API work|2026-05-19|150|120"
miru invoice send --id 1 --recipients client@example.com- CLI requests use a dedicated bearer token
- retrieve the current CLI token with
miru config tokenwhen wiring MCP clients - the CLI session is tied to a user and workspace
- all normal authentication and authorization remain in force
client listrespects the authenticated user's normal client visibilityexpense listandexpense createstay restricted to roles already permitted by the appproject list,invoice list/show/send, andpayment list/showall use the same app permissions as the web UItime createis scoped throughProjectPolicy::Scopetime updateandtime deleteare scoped to the authenticated user’s own entries in the current workspace- the CLI cannot impersonate another user when creating time
miru login->POST /api/v1/users/loginmiru logout->DELETE /api/v1/cli/sessionmiru whoami->GET /api/v1/users/_memiru capabilities->GET /api/v1/cli/capabilitiesmiru client list->GET /api/v1/cli/clientsmiru project list->GET /api/v1/projectsmiru expense list->GET /api/v1/cli/expensesmiru expense create->POST /api/v1/cli/expensesmiru invoice list->GET /api/v1/invoicesmiru invoice create->POST /api/v1/invoicesmiru invoice show->GET /api/v1/invoices/:idmiru invoice send->POST /api/v1/invoices/:id/send_invoicemiru payment list->GET /api/v1/paymentsmiru payment show->GET /api/v1/payments/:idmiru time list->GET /api/v1/timesheet_entrymiru time create->POST /api/v1/cli/timesheet_entriesmiru time update->PATCH /api/v1/cli/timesheet_entries/:idmiru time delete->DELETE /api/v1/cli/timesheet_entries/:id
Log in again:
miru login --email user@example.com --password your-passwordPoint the CLI at the correct Miru instance:
miru config set-base-url --url http://127.0.0.1:9000Use:
miru project list
miru project list --search <term>Run:
miru login --email user@example.com --password your-passwordRun:
miru upgradeCurrent supported CLI surface:
- authentication + session:
login,logout,whoami - config:
config show,config token,config set-base-url - discovery:
help,version,capabilities - projects:
project list - clients:
client list - time:
time list,time create,time update,time delete - expenses:
expense list,expense create - invoices:
invoice list,invoice create,invoice show,invoice send - payments:
payment list,payment show
MCP parity:
- MCP tools are namespaced under
miru.*and map directly to the command set above. - Full mapping table: Miru MCP Server and Client