Repository navigation
v3.0.0
Ortie 3 aligns on the other Pimalaya CLIs. The configuration wizard and the hooks are gone: provider accounts are pasted from the README, and the storage write command does what a hook did. Every --json output is camelCase, described by json-schema, and every failure carries a stable code. New commands revoke a token, catch a handed-off redirection, list, show and check accounts, and serve the token lifecycle to AI agents over MCP without ever handing out the token.
MIGRATION.md lists what to act on when upgrading from 2.x, and from 1.x.
Added
-
Added
token revoke, revoking at the newendpoints.revocationthe stored refresh token, or the access token when none is stored (RFC 7009).--jsonprints{"revoked": "refresh-token"}or{"revoked": "access-token"}. The storage is left as it is. -
Added
auth listen, catching the redirection of a flow a non-interactive or--jsonauth gethanded off, then completing it asauth resumedoes.The
auth gethandoff object gainsredirectUri. With neither--redirect-urinorendpoints.redirection,auth listenexits 2 codedusage-invalid, pointing at the redirect URIauth getprinted; on anendpoints.redirectionthat is not an http URI on a loopback host it exits 1 codedredirection-unsupported. -
Added
--handoff <PATH>toauth listenandauth resume, reading the objectauth get --jsonprints from a file, or from stdin for-, in place of--stateand--pkce, whose values other local users can read on the command line.ortie --json auth get > flow.jsonthenortie auth listen --handoff flow.jsonfinishes a flow. It conflicts with both flags and serves the authorization code grant alone, refused codedusage-invalid, exit 2, on another;--handoff -is refused inside a session, codedstdin-taken. -
Added
ortie mcp, a Model Context Protocol server over stdio running the grants of one account for an agent.Its tools answer receipts and metadata, never a token: the state, the PKCE verifier and the device code stay in the server, which stores the token once the user consents.
Without a flag only
token_inspectandauth_statusare listed.--allow-writeaddsauth_get,auth_resumeandtoken_refresh, and--allow-revoke, which needs it, addstoken_revoke. -
Added
account list, listing the accounts of the configuration with their grant,{"accounts": [{"name", "default", "grant"}]}under--json. -
Added
account show, printing every property of one account as the configuration loads it, the-clayers merged and the defaults filled in, reaching nothing.The text is
Account: <name>then one aligned field per property, labelled by its configuration key (client-id,endpoints.token,storage.read.command), a list one value per line;--jsonprints{"account": {"name", ...}},tlsleft out when no TLS key is set. A raw secret is never printed:client-secret.raw: <redacted>, or{"raw": null, "redacted": true}. -
Added
account check, checking thatstorage.read.commandprints a token, that the token is usable, and that each endpoint the grant uses answers, one row each, exiting 3 when one fails.Each row prints as soon as it is checked, a
check-finishedevent ({"event", "account", "check", "ok", "code", "error", "tls"}under--json, a sentence such asReaching the token endpoint… OKon a terminal), then the report, a blank line apart; the text report counts the checks that passed and lists each failed one and why.--jsonends with{"account", "checks": [{"check", "ok", "code", "error", "tls"}]}, the rowsstorage,token, thenendpoints.<key>. The token row fails on an expired token with no way to renew it, codedtoken-expired. Each endpoint is sent aHEADrequest carrying no credential, the redirection none; anhttpsone's row carriestls, the TLS configured. -
Added the
tls.cert,tls.client.certandtls.client.keyaccount fields: a PEM certificate to trust beside the platform store, and a PEM client certificate and its key presented to a server asking for one (mutual TLS). -
Added the
resourcesaccount field, the RFC 8707 resource indicators sent on the authorization request and the code exchange. -
Added the handoff of an interrupted wait: SIGINT, SIGTERM or SIGHUP reaching an interactive
auth getwhile it waits for the redirection prints theauth resumecommand, state and verifier included, then exits 130.A REPL session keeps its behaviour: the signal ends it with 130, no handoff printed.
-
Added the
ortie-account-list,ortie-account-show,ortie-account-check(andortie-account-check.events),ortie-auth-listen,ortie-auth-resume,ortie-token-refresh,ortie-token-revokeandortie-errorschemas tojson-schema, and those ofcompletion,manualandjson-schemaitself. -
Added a stable
codeto the failure object--jsonprints, for the failures a caller acts on; any other failure prints"code": null.The codes are
permission-denied(access_denied,authorization_declined, a bare 403),rate-limited(a bare 429),grant-invalid(invalid_grant),client-invalid(invalid_client),client-unauthorized(unauthorized_client) andscope-invalid(invalid_scope).Then
device-code-expired,state-mismatch,token-missing,token-expired,endpoint-missing,redirection-unsupported,account-missing(no account of the name-agave),account-default-missing,account-default-several,stdin-takenandusage-invalid.The
ortie-errorschema, the MCP failures and theerroranswers ofauth_statuscarry the code too. -
Added config.sample.toml to the release archives and the Nix package, as share/doc/ortie/config.sample.toml, which install.sh copies under its prefix.
Changed
-
BREAKING: Changed
--jsonkeys to camelCase; the configuration keeps its kebab-case keys. -
BREAKING: Changed
token refresh,auth resumeand a token-issuingauth getto print the receipt{account, expiresIn, withRefreshToken}under--json, instead of a{"message": …}sentence; the text names the account too,Access token of account example successfully refreshed (expires in 1h). -
BREAKING: Changed the
auth gethandoff objects to dropinteractive, which only told whether stdout was a terminal; a handoff file carrying it is still read. -
BREAKING: Changed
token inspect --jsonto printissuedAtas an RFC 3339 instant in UTC, andexpiresAt, the instant the token expires, in place ofexpires_in, the lifetime granted at issue.expiresAtlies in the past once the token expired, and isnullwhen the store holds no issue time, the text then readingExpires: unknownwhere it readin <lifetime>. -
BREAKING: Changed the durations of the text output (
token inspect, the issued-token receipt, theauth getdevice request) to a friendly form balanced up to days of 24 hours:2d 4hwhere2days 4hwas printed,400dwhere1year 1month 4days 7h 26m 24swas. The JSON is unchanged. -
BREAKING: Changed a command line the grammar refuses under
--jsonto print on stdout the failure object codedusage-invalid, instead of clap's text on stderr; it still exits 2.Without
--json, clap's rendering stays on stderr. A bareortie --jsonis refused the same way, "A command is required, see --help", where it printed the help. -
BREAKING: Changed the refusals Ortie makes after parsing the command line to exit 2 coded
usage-invalid, as clap's own refusals do, instead of exit 1 with no code.This covers
auth listenon a device or client credentials account or on a--redirect-urithat is not an http URI on a loopback host (the same fault inendpoints.redirectionexits 1 codedredirection-unsupported) or given no redirection at all,auth resumeon a client credentials account,--state,--pkceor--redirect-urion a device account, an empty device code, and a redirected URI that does not parse. -
BREAKING: Changed
ortie replto print its errors on stdout, interactive or piped, asortie-errorobjects under--json.On a terminal, a line that does not parse keeps clap's message on stderr. In a
--jsonsession the help goes to stderr, so stdout carries one JSON value per line, and a refused line is codedusage-invalid. -
BREAKING: Changed
ortie replto split its lines as a shell does, quotes, escapes and#comments included, and to take any command of the binary, where it took thetokenandauthtrees alone.It infers subcommand prefixes as the command line does and takes
--jsonon a line, for that line only. A line setting-a,-cor a log flag is refused naming it, and areplormcpline is refused codedusage-invalid. -
BREAKING: Changed
auth getto print the authorization link, or the verification URI and user code, without opening a browser. -
BREAKING: Changed
auto-refreshto default to true:token showrefreshes an expired token unless the account setsauto-refresh = false. -
BREAKING: Changed
-cto take one path per occurrence, repeated to merge several files (-c public.toml -c private.toml).A
:is no longer read as a delimiter, which cut Windows paths such asC:\Users\me\config.tomlat the drive letter. -
BREAKING: Changed the configuration loading to read every existing default path as a layer, each deep-merged on top of the ones before, so $HOME/.ortierc overrides $HOME/.config/ortie/config.toml where only the first file found was read.
-
BREAKING: Changed
-a defaultto take the account nameddefault, where it took the account markeddefault = true; omit-ato take that one. -
BREAKING: Changed
tlsto the table every Pimalaya CLI reads,tls.provider(rustls,native-tls) andtls.rustls.crypto(ring,aws); the stringtls = "rustls-ring"is refused as a value of the wrong type. -
BREAKING: Changed every configured URL to take an ASCII host only, an internationalised one written in Punycode (
https://xn--bcher-kva.exampleforbücher.example). -
Changed the
client-certificateaccount field toclient-cert, matchingtls.certandtls.client.cert;client-certificateis still read. -
Changed
token showto end the token with a newline, like every text output;$(ortie token show)and Pimalaya's secret commands strip it. -
Changed the text output of
token inspectandauth getto alignedLabel: valuefields, one scope per line, and the links and commands to copy to a two-space indent. -
Changed piped
--jsonoutput to print one value per line. -
Changed every
json-schemaschema to carry an$idnaming the contract version, and to require the keys a command always prints. -
Changed the help, usage and logs to carry no colour, and the help to print each paragraph on one line, for the terminal to fold.
-
Changed the help of a REPL command to name the binary (
Usage: ortie token show [OPTIONS]), and a text error in a session to hint at restarting it with--log-level. -
Changed
token getandauth continueto hidden aliases oftoken showandauth resume. -
Changed the order of the standard commands to
completion,manual,json-schema. -
Changed the default cargo features to
rustls-ringandvendored, a build withnative-tlslinking a vendored OpenSSL unless it passes--no-default-features. -
Changed config.sample.toml to one flat
[accounts.example]table holding every field and its values, the defaults active.It ends with a commented custom section for an application of your own. The Google, Microsoft and Fastmail accounts moved to the README, one block to paste per account:
google, whose client is left blank,microsoft-graph,microsoft-imap-smtpandfastmail, on Pimalaya's applications. -
Changed the wait for the redirection to end only on the redirect of its flow.
A request to the loopback port that does not echo the state, goes to another path, is not a
GETor carries neither a code nor an error is answered404 Not Found, and the wait goes on. The page answered to the redirect no longer claims a success. -
Changed
--pkceto refuse a verifier that is not 43 to 128 unreserved characters (RFC 7636 section 4.1), without echoing it, and--statean empty state. -
Changed a token, device authorization or revocation endpoint answering an error status without an OAuth error body to fail naming the HTTP status.
-
Changed an OAuth refusal to name its code as the server spelled it,
(code invalid_grant)instead of(code InvalidGrant); a code Ortie does not know reads(unregistered code). -
Changed a token response to take
expires_inas a numeric string too, and a missingtoken_typeasBearer. -
Changed the client secret sent as HTTP Basic credentials to be form-encoded first (RFC 6749 section 2.3.1); a secret made of letters, digits and
*-._~is unchanged on the wire.
Fixed
-
BREAKING: Fixed several accounts marked
default = truetaking one at random: they are refused, naming them, with both ways of picking one. -
Fixed a failing storage command reporting its stdout, where the token is:
token inspect,account checkand the MCP tooltoken_inspectprinted the token a failing read command wrote, and a write command echoing its input did the same.Both are reported by their stderr, or their program and exit status, the read command with a hint to run it yourself.
-
Fixed a refresh refused
invalid_grantbecause another process of the same account refreshed first, on a server rotating refresh tokens: Ortie reads the storage once more and takes the token stored meanwhile. A REPL or MCP session recovers the same way. -
Fixed a failed storage write after a refresh leaving the session on the old refresh token, which a rotating server had already invalidated.
-
Fixed a refresh
token showmakes on its own failing with a bare connection error: it reads "Refresh access token error", the connection error as its cause. -
Fixed an
httpsloopback redirection counted as captured, though the listener speaks plain HTTP:auth getandauth listenwaited for ever and MCPauth_getansweredredirectCaptured: true. It is finished throughauth resume,auth listenrefusing it. -
Fixed a configured
httploopback redirection naming no port, such ashttp://localhost, binding port 80: it binds an ephemeral port, soauth getand the MCP server catch the redirection. -
Fixed an interactive
auth getfreeing the ephemeral redirect port between building the request and waiting for the redirect, and printing the state and the PKCE verifier of a flow it finishes itself. -
Fixed the
auth resumecommand printed byauth getdropping a generated redirect URI, and its-aand-c(#16).The code was exchanged without the
redirect_uriits authorization request carried (RFC 6749 section 4.1.3), or against the default account. -
Fixed the commands
auth getprints on Windows, double quoted for cmd and PowerShell instead of single quoted. -
Fixed the device
auth resumecommandauth getprints not running on a device code starting with-: it puts--before the code. -
Fixed MCP
auth_resumedropping the pending flow on a URI that does not parse or does not echo its state: the flow stays pending for the right URI, the refusal codedstate-mismatchfor a state andusage-invalidfor a URI that does not parse. -
Fixed the device grant panicking, waiting without end or polling without pause on a lifetime or an interval the server chose.
The lifetime is capped at one hour and the interval kept between 1 and 60 seconds, the bounded values being the ones the
auth getdevice handoff reports asexpiresInandinterval. -
Fixed an OAuth 2.0 endpoint able to make Ortie buffer an endless response, spin on a connection closed mid-body, or panic: response heads are capped at 64 KiB and bodies at 256 MiB.
-
Fixed the state and the PKCE code verifier never repeating a character, which lowered their entropy.
-
Fixed a token storage holding nothing failing with a JSON parse error: it fails coded
token-missing, telling to runauth get. -
Fixed a credential command prompting for a password (
client-secret.commandbehind a pinentry orsystemd-ask-password) hanging the run: it reads the terminal when Ortie runs in one. -
Fixed a secret command that fails printing its output: it is named, with a hint to run it yourself, and a refused secret no longer echoes its value.
-
Fixed the text error report writing the control characters of its causes raw to the terminal: each line is sanitized, the suggestions naming
--jsonwhen a character was replaced. -
Fixed the text output printing the token type, the scopes, the user code and the verification URIs as the server wrote them, control and bidi characters included.
-
Fixed a TOML parse error of the configuration printing its source line.
-
Fixed
--log-filecreating the file under the umask and following a symbolic link: it is created at 0600 and a link is refused. -
Fixed a
--log-fileOrtie cannot open panicking with exit 101: the failure object is printed and the exit status is 1. -
Fixed the manual pages printing
vv<version>. -
Fixed
token inspectoutput missing its final newline. -
Fixed the REPL help describing its commands with internal notes.
-
Fixed install.sh saving an HTTP error page as the archive and letting
tarfail on it: it stops on the error. -
Fixed the Nix package calling the hidden
manualsandcompletionsaliases, shipping no JSON Schemas and linking a changelog page that does not exist.
Removed
-
BREAKING: Removed the
configurecommand and itswizardalias, with the offer to run it a missing configuration made.An account starts from config.sample.toml instead: without a configuration, a terminal gets a welcome with the commands creating one, copied from the shipped sample or downloaded, and a script or
--jsonan error naming the path. Theortie-configurekey leavesjson-schema. -
BREAKING: Removed dynamic client registration (RFC 7591), which only the wizard ran; the README's Fastmail account carries a registered client instead.
-
BREAKING: Removed the hooks (
hooks.on-issueandhooks.on-refresh) and thenotifycargo feature; ahookstable is refused as any unknown key.storage.write.commandreceives the token JSON on every issue and refresh, so a command chained after it does what a success hook did. -
BREAKING: Removed the
ORTIE_CONFIGenvironment variable; pass-c "$ORTIE_CONFIG"instead.