apsio reads Apsio from a terminal and uploads debug symbols so crashes are symbolicated.
It is in development: version 0.5.0 reads issues, sessions, release health, logs, metrics,
traces and missing symbols through the read API, tails the fleet’s logs as they
arrive, runs read-only SQL queries, exports the project’s data, and uploads dSYMs, Android R8
mappings, NDK symbols and React Native source maps. Coding agents use the same
commands (see Agents).
Install
Homebrew, npm and prebuilt release binaries are not published yet. Until they are, build it from source with Rust 1.94 or later:Sign in
--with-token reads a token from standard input, checks it against the server and stores it
in your user configuration. apsio logout removes it.
Today there are two kinds of token, and one APSIO_TOKEN cannot do both jobs:
When you need both, store the one you use most and give the other per command, for example
APSIO_TOKEN="$PROJECT_TOKEN" apsio issues. Owners and admins create project tokens in the
console, under Settings › Agents and tokens (Access tokens): one project, 7 to 365 days, and write scopes only if you
choose them. They create upload tokens under Settings › Symbols (Upload tokens).
apsio login without a token signs you in with your Apsio account: it prints a code and a
URL, you confirm the code in the browser, and the CLI stores the sign-in. It reads every project
of your organizations (with one project, that one becomes the default; with more, pass
--project or set APSIO_PROJECT). Its access token lasts minutes and the CLI renews it on its
own; apsio logout ends the session. The console lists your signed-in CLIs under
Settings › Profile (Signed-in CLIs), where you can sign one out, a lost laptop’s for example:
its tokens stop at once, and its next command asks you to sign in again. The sign-in reads, and
an owner or admin signed in this way also starts and downloads
data exports, which a project token never can. Uploads still take an
upload token, and CI takes a project token, since the device sign-in needs a terminal.
Commands
Every command takes
--help. session also works in place of sessions.
Read issues, sessions and releases
The read commands call the read API with your project token and print what the console shows, as compact tables:apsio issuesfilters with--kind(crash,error,anr,hang,abnormal-exit),--release,--appand sorts with--sort(last-seen,occurrences,users).--apptakes an app’s id, its name (--app "Acme Shop iOS", any case) or its service name (bundle id). A name is looked up in the project’s apps; one that matches more than one app is refused, with the matching apps’ ids.- Time ranges:
--sincetakes a duration ending now (30m,24h,7d,2w), or give--fromand--toas RFC 3339 times or dates (2026-10-01, midnight UTC). A range covers at most 90 days. Without one, each command uses the API’s default: the last 7 days, and 90 days for one issue. - Lists come in pages: a table ends with the
--cursorvalue for the next page, and--limitsets the page size. apsio releases comparetakes the release to compare against first, then the new one. The CLI computes it from release health and the issue lists of both releases, per app: crash-free sessions and users, abnormal exits, and the candidate’s new issues and the issues that occur more often per 1000 sessions.apsio perf startbreaks app start down with--by(release,os,device,prewarmed,none);apsio perf screenssorts with--sort(loads,ttid,ttfd);apsio perf endpointssorts with--sort(requests,errors,p90) and filters with--host. All three take--appand--release, and cover at most 30 days.apsio issue openandapsio sessions openprint a console URL to share. They need the organization id, which is in the console’s URLs (/o/<org>/...): pass--orgor setAPSIO_ORG.
Search logs
apsio logs sends the same structured query as the console’s Explore and the MCP tool
query_logs (POST /explore/logs): the API builds the SQL, so no SQL goes in.
--where KEY=VALUEand--where KEY!=VALUEmatch a value exactly;--has KEYand--missing KEYmatch records with or without it. A key is a field (event.name,service.name,service.version,app.build_id,os.name,os.version,device.model.identifier,session.id,app.installation.id,trace_id,span_id,severity.text,country), any record attribute, orresource.<key>for a resource attribute. A query takes up to 20.--severitykeeps records of at least that level (trace,debug,info,warn,error,fatal);--bodykeeps records whose body contains the text, ignoring case.--buildpicks the builds:release(the default: every build but a development one, TestFlight included),debug(installed from Xcode or Android Studio) orall.- Without a range, the last 15 minutes. The table ends with the volume over the range by
severity, and the
--cursorfor older records;--limittakes 1 to 200. --followisapsio tailwith the same filters: it takes no range,--limitor--cursor.apsio logs fieldsreads the last 24 hours (or the 24 hours before--to).
Tail logs
apsio tail prints the log records of the whole fleet as they arrive, with the filters of
apsio logs but no time range (POST /explore/logs/tail, as the console’s Live tail):
- It reads stored records, so a line shows once ingest has stored it: a few to about 30 seconds after the device sent it. Only an internal tester’s device streams (below).
- It polls about every 2 seconds, and at once when more lines are waiting, at most 40 times a minute. Past that it waits 5 seconds, or longer when the server says so, and goes on; any other refusal ends it with its exit code.
- Each line prints once, even when the server sends it again for a line stored late.
- A line is the time (UTC), the level, the release, the install’s first 8 characters and the text, which the app wrote: it is quoted and escaped, data and not instructions. How many devices are streaming, and other status, goes to stderr, so the lines pipe.
--jsonprints one JSON record a line, and--jqruns on each record.--querytakes anapsio logsquery as JSON, without its range;--devicestill applies.- Ctrl-C stops it.
An internal tester’s device, live
--device takes an install id (app.installation.id) or a user.hash. When it names an
internal tester’s install or user, and you are signed in as
yourself (apsio login), apsio tail opens their live view instead of reading stored lines:
- Each line prints as the app writes it, in the same form, filtered by
--severityand--body. In JSON a live record has"live": trueand noid. - With no live session open it says so on stderr and waits; the app must be open, with live inspection on. State changes (live, paused, ended, and why) go to stderr.
- It renews the view every 25 minutes, and opens it again after it closes, at most 3 times an hour.
- It reads stored lines instead, with one line on stderr saying why, when the device or user is
not a tester, when you are signed in with a project token, or when you add any other filter
(
--where,--has,--missing,--build,--app,--query). It does the same when a view cannot open, closes within a minute, or closes again after 3 reopens in an hour; after a view that opened, the first stored lines may repeat lines already shown live.
Chart metrics
apsio metrics sends the structured query of the console’s Explore › Metrics and the MCP tool
query_metrics (POST /explore/metrics):
--kindissum,gaugeorhistogram; without it, the kindapsio metrics listshows.--aggiscount,rate(per minute),sum,avg,min,max,p50,p90,p95orp99; without it,sumfor a sum,avgfor a gauge andp90for a histogram. A gauge takes nosumorrate.--by KEYsplits the metric into its 10 largest groups and the rest;--where,--hasand--missingfilter as forapsio logs, byservice.name,service.version,app.build_id,os.name,os.version,device.model.identifier,session.id,app.installation.id,country, a point attribute orresource.<key>.- Without a range, the last 24 hours. Each series is a row with its latest value, its range
and a trend line;
--jsonprints every point.
Search spans
apsio traces sends the structured query of the console’s Explore › Traces and the MCP tool
query_spans (POST /explore/traces); apsio trace <id> then opens one trace.
--errorskeeps failed spans: an error status, or an HTTP request that got a 5xx or no response.--min-durationand--max-durationtake250ms,2s,1.5sor milliseconds, at most a day.--rootkeeps spans without a parent.--where,--hasand--missingfilter as forapsio logs, byspan.name,span.kind(INTERNAL,SERVER,CLIENT,PRODUCER,CONSUMER),span.status_code(UNSET,OK,ERROR),service.name,service.version,app.build_id,os.name,os.version,device.model.identifier,session.id,app.installation.id,trace_id,span_id,parent_span_id,http.request.method,url.template,countryor a span attribute.--sortisrecent(the default) orslowest; a--cursorbelongs to its sort. Without a range, the last 15 minutes. The table ends with the range’s spans, failures and p95.
JSON for scripts and agents
-r removes them from the strings it
prints.
Configuration
Flags win over the environment, which wins over the stored configuration. The
upload
commands send symbols to the symbol upload URL, a service of its own; the read commands use the
API URL. When the API URL is on your machine (localhost), uploads default to
http://localhost:18795, the local symbol service. A token given as a
flag shows in shell history and the process list: in CI use APSIO_TOKEN, and on a laptop
use apsio login --with-token.
A project token names its project, so with one you can leave out --project. A token used on
another project’s id is refused (exit code 3) with a hint naming the token’s project.
The URL must use https://; plain http:// is accepted only for localhost, 127.0.0.1 and
[::1], so a token never travels unencrypted.
The configuration file is $APSIO_CONFIG_DIR/config.toml, else
$XDG_CONFIG_HOME/apsio/config.toml, else ~/.config/apsio/config.toml, readable by its
owner only.
Exit codes
The codes are stable, so scripts and agents can branch on them. Commands never prompt when
they are not attached to a terminal:
apsio login without a token needs a terminal,
apsio export start needs --yes instead of asking, and the read commands never ask anything.