@q5m-ai/cli
v0.1.4
Published
Native q5m CLI and Pi extension for direct agent-network access.
Maintainers
Readme
q5m CLI
q5m.ai brings agentic workflows to everyday life: a network of AI agents with memory, skills, and tools to take action across the services you already use.
Direct q5m agent-network access for Pi, scripts, and terminal users. The package talks to the q5m API over its native HTTP tool gateway. It does not start MCP or require an OMP runtime.
Install
Node.js 22.19 or newer is required. Setup can be driven from an existing Pi session. Paste this request into Pi:
Install and manage q5m for my shell and this Pi installation. The npm package
is @q5m-ai/cli. Install both the CLI and Pi package, but never ask for, print,
or pass my API key through a tool call. When installation is complete, tell me
to type /reload and then /q5m login so q5m can collect the key in masked Pi UI.Pi will run the equivalent of:
npm install --global @q5m-ai/cli
pi install npm:@q5m-ai/cliType /reload in that Pi session after installation, then authenticate without
leaving Pi:
/q5m loginPaste the API key into q5m's masked input. Login always connects to the
production q5m backend. The key goes directly from the local Pi UI to q5m's
protected configuration. It is never added to the conversation, model context,
tool arguments, logs, or shell history. Create a q5m_... key in
Production q5m Settings.
The installed executable is exactly q5m:
q5m --versionYou can run the two install commands directly instead. Terminal users can also authenticate through the CLI's hidden prompt:
q5m auth login
q5m auth status
q5m auth logoutSaved credentials live in ~/.config/q5m/config.json with mode 0600; the
containing directory uses mode 0700.
Environment variables take precedence over saved configuration:
Q5M_API_KEY: q5m API keyQ5M_API_URL: API origin, defaulthttps://api.q5m.aiQ5M_GROUP_ID: default Home, orpersonalQ5M_CONFIG_HOME: alternate configuration directory
Pi
The same npm package is both the q5m CLI and the Pi extension. On startup,
the extension loads Q's instructions and complete native tool catalog directly
from q5m. Q's catalog tools appear as normal Pi tools. Calling list_tools for
a peer also registers that peer's exact schemas as active tools named:
q5m_<agent>__<tool>For example, a create_event tool on the google-calendar peer becomes q5m_google-calendar__create_event. Read-only q5m tools may run in parallel. Destructive tools require interactive confirmation; Pi rejects them in non-interactive modes.
Use /q5m or /q5m status to inspect connection status, /q5m login to
authenticate through masked Pi UI, /q5m reload after an external configuration
change, and /q5m logout to remove the saved credential. Pi can also load the
extension for one run without installing it:
pi -e npm:@q5m-ai/cliHuman commands
q5m agents
q5m agent q --json # Q's host instructions and tool catalog
q5m agent google-calendar
q5m route "schedule a cycling workout"
q5m tools google-calendar
q5m tool google-calendar create_event \
--input '{"title":"Ride","start":"2026-08-24T08:00:00-07:00"}'
q5m recall "the restaurant we discussed" --limit 5Inspect Q's complete catalog:
q5m catalog
q5m toolsCall any catalog tool by name:
q5m call get_memory --input '{"path":"/profile"}'
q5m call save_memory --input-file request.json
cat request.json | q5m call save_memory --input-file -Interactive terminals receive concise human-readable output. Redirected output is JSON automatically; --json or -j forces JSON explicitly:
q5m agents --json | jq '.[] | .slug'Errors use stable JSON and process exit codes:
{"error":{"code":"not_installed","message":"Agent is not installed","status":403}}0: success1: request, network, or server failure2: command usage or input error3: authentication or authorization failure
Homes
The default Home controls Q's memory, skills, and other Home-scoped tools:
q5m context
q5m context personal
q5m context <group-id>Use --group personal|GROUP_ID to override Q's Home for one command. Peer dispatch normally resolves the Home where that peer is installed. If a peer exists in multiple Homes, use --home personal|GROUP_ID with q5m tool:
q5m tool carpool list_rides --home <group-id> --input '{}'The backend verifies group membership. A stale or spoofed group selector falls back to Personal and cannot widen access.
