All notable changes to pm, the PushMetrics command-line tool (pushmetrics-cli on PyPI). Newest first. Dates are the day the version reached PyPI. Upgrade with pipx upgrade pushmetrics-cli.
0.4.2 - 2026-11-17
Changed
pmnow names itself to the server with anX-PushMetrics-Clientheader on every request, and switches workspaces with a POST (on older servers it falls back to the GET it used before). A later PushMetrics server will refuse changes from apmsigned in withpm loginin the browser that does not send this header, so upgrade if you sign in that way;pm login --tokenandPM_API_JWTare not affected.pmaccepts only a plain server address as the API URL:http(s)://host[:port][/path]. A URL with a user name, password, query or fragment is refused, with a message that says where to fix it (--api-url,PM_API_URLor the profile), including one already saved in config.toml.
Fixed
- When the API, or a proxy in front of it, answers an error with an HTML page or plain text instead of JSON,
pmshows the status, for examplefailed: 502 Bad Gateway, instead of the whole response. - When personal access tokens are switched off on the server,
pm login --tokenno longer points at the tokens page. - When a personal access token is rejected,
pm login --tokenandpm whoaminame the server and profile they checked, and how to use another profile, so a token made on another server no longer reads as a bad token. - Piping
pminto a command that stops reading early, such aspm report list | head -5, no longer prints a Python "BrokenPipeError" message.pmstops quietly and exits with code 141, like other command-line tools when the reader goes away. - When a workspace accepts only approved network addresses and this machine is not on one,
pmsays so and what to do (connect through your organization's network or VPN, or ask a workspace admin to add the address), instead of "Personal access tokens are not enabled on this server" or "bearer token rejected".
0.4.1 - 2026-11-15
Changed
pm usage forecastsays "within the included messages" or "still over the included messages" after a what-if, the same words as the forecast line, and lines up the amounts under "Ways to save".pm usage forecast --helpsays--scheduletakes at most 5 rules per command, the most the server tries in one what-if.pm helplistsusage, andpm usage --helpshows the forecast command's whole summary instead of a cut-off one.pm agent status --helpsays it checks the directory in--path, not "this repository".
Fixed
- After a 404,
pmno longer suggests apm <group> listcommand that does not exist.pm usage forecastsays the server does not have the usage forecast yet, andpm whoamiandpm loginsay to check the API URL withpm config list. - When the server cannot work out a
pm usage forecastchange,pmshows its reason on its own, without the request URL. Giving one report two changes names the four options to choose from. - When
pm login --tokenor the token exchange fails,pmshows the server's message instead of the raw response. A 404, which means the API URL is wrong, now says to check it withpm config list, and no longer points at the tokens page.
0.4.0 - 2026-11-15
Added
pm agent setupwrites the PushMetrics instructions for an AI agent into the file your agent reads:CLAUDE.md,AGENTS.md,GEMINI.md,.cursor/rules/pushmetrics.mdcor.github/copilot-instructions.md. Running it again replaces only the PushMetrics block and leaves the rest of the file as it is. It never writes your token; it prints the lines for you to run in the shell that starts your agent, then checks the token withpm whoamiif one is set.pm agent statusshows which agent instruction files in a directory have current PushMetrics instructions, and whether a token is set in this shell. It makes no network call.pm help --jsonprints every command with its arguments and options as JSON, so an AI agent can read whatpmaccepts;pm help <topic> --jsonprints one topic.pm usage forecastshows where this period's message usage is heading against the messages your workspace includes, and ways to save.--pause,--weekdays-only,--half-as-oftenand--schedule <uid>=<RRULE>show what a change to a report's schedules would save, and--remove-blockedwhat removing blocked addresses would save; nothing is changed. A server without the usage forecast answers with an API error.
0.3.0 - 2026-11-13
Added
pm token create NAME --scope readmakes a read-only token: it can read and query metrics views; SQL, runs and changes are refused. Without--scope, tokens have full access as before.pm token create NAME --scope readchecks that the server really made a read-only token. If it did not (a server older than read-only tokens),pmrevokes the token at once, or, if that fails, prints its id and thepm token revokecommand to run. Either way it prints no token and exits with status 1.pm whoamishows the session'stoken_scope(full,read, orunknownon an older server), andpm token listhas aSCOPEcolumn.- When the server refuses a request because the token is read-only,
pmadds a hint that tells an AI agent to stop and ask the person it works for instead of looking for another token.
Fixed
- An API error whose body has Windows line endings, such as a proxy's error page, no longer ends each line with a stray space.
0.2.0 - 2026-11-12
Added
pm schedulelists, creates, updates, pauses, resumes and runs a report's schedules.pm schedule rundelivers to all its destinations: it asks first in a terminal and needs--yesotherwise.pm deliverabilitylists the email addresses the email provider blocks for this workspace and shows one address's history; admins can unblock an address.pm config listshowsPM_CLIENTamong the environment overrides, and the cleaned-up valuepmactually sends when it differs from what you set.
Fixed
- Text from the server in tables and
key: valueoutput no longer carries terminal control characters, so it cannot change your terminal. - Multi-line text from the server, such as report YAML or a database comment, keeps its line breaks but loses other control characters.
0.1.1 - 2026-11-11
Added
PM_CLIENTtells PushMetrics which tool runspm(for exampleciorclaude-code).pmsends it with every request aspm/<version> (client=<name>; py/<version>). It is not a secret and does not change what the token can do.pm config listshows the config home, wherepmkeeps its configuration and tokens (config_homewith--json), and listsPM_CONFIG_HOMEwith the environment overrides. WhenPM_CONFIG_HOMEpoints somewhere other than the default, theNot logged inerror also names the config home.
Changed
- A request refused because the organization has no active subscription now says what to do:
pm needs an active PushMetrics subscription for this workspace's organization. Start a trial or upgrade in the web app. - Help and login text name the token settings page by its new name, Settings > CLI & API.
Fixed
pm config setwritesconfig.tomlin one step, so an interrupted write cannot leave a broken file. A newconfig.tomlis readable only by you, an existing one keeps its permissions, and aconfig.tomlthat is a symbolic link stays a link.- An unreadable or invalid
config.tomlgives an error that names the file and how to fix it, instead of a traceback. pm help metrics-viewno longer fails on Windows when its output is piped or redirected.
0.1.0 - 2026-10-16
Added
- First release of
pm, published on PyPI aspushmetrics-cli, for Python 3.9 or newer. pm login --tokenlogs in with a personal access token, from a hidden prompt or from stdin, and stores it in the operating system's credential store.PM_API_TOKENworks without storing anything and wins over a stored token.pm whoamishows who you are;pm logoutforgets the token.- Command groups for reports and runs (
pm report,pm run), report blocks (pm sql,pm chart,pm email,pm slack,pm sftp,pm tableau,pm slides,pm explore,pm metrics-view,pm block,pm saved-block), and the rest of the workspace (pm database,pm user,pm role,pm folder,pm token,pm workspaceand more).pm helpshows the map of every group. --jsonon every command, before or after the action. Data goes to stdout, messages and errors to stderr.pmexits with 0 on success, 1 when a command fails and 2 when the command line is wrong.- Profiles for several workspaces:
--profile <name>,pm config setandpm config list.