LLM API Scope (apiscope)
a tool for LLM agents to read and cache structured documents from remote.
install
use pipx for isolated installation:
pipx install llm-api-scope
how it works
apiscope has two ideas: a registered source, and a tree you navigate by address.
text is the default output; --json prints the data layer instead.
manage
apiscope add registers a source with a name, a location, and a type.
apiscope remove deletes it.
apiscope list shows what is registered, filtered by type.
a source link is registered once; a repeated link fails, even under another name or type. a private source in the home configuration uses an absolute path, and a project source uses a path relative to the project root.
six document types share one command surface:
filesystemreads a local file or directoryreporeads a directory inside a git repositoryopenapireads an OpenAPI specificationrfcreads an IETF documentllmstxtreads a site index that lists documentation pagesarxivreads one arXiv paper by its canonical identifier
apiscope add docs https://example.test/docs/llms.txt --type llmstxt
apiscope add api https://github.com/example/api.git/docs@main --type repo
apiscope add paper 1706.03762 --type arxiv
apiscope list all
use
apiscope sync fetches sources into a local cache.
apiscope view shows the cached structure, and apiscope read reads one node.
view and read share the same address: a source name plus an optional route.
apiscope sync all
apiscope view docs
apiscope read docs 1.2
every source projects into one tree.
an ordinary node has children; a leaf has none.
a view line is - [index] key: description, where the index is a tree address.
an index from view always works with read.
skill
apiscope skill prints or installs a combined command reference and strategy guide for AI agents.
run apiscope skill show to print it, or apiscope skill install to install it under ~/.agents/skills/apiscope.
agents read this once at onboarding instead of running --help repeatedly.
configuration
apiscope reads three configuration layers in order.
the global file is ~/.apiscope/config.json.
the project file is .apiscope/config.json, and the local file is .apiscope/local.json.
--global uses the global layer only and skips project discovery.
the public setting holds the default source ttl in days.
the local setting holds the proxy and the no_proxy bypass list.
{
"setting": {
"public": {"doc_ttl": 7},
"local": {
"proxy": "http://proxy.example.test:8080",
"no_proxy": "internal.example.test,localhost"
}
}
}
the HTTP client uses only the configured [proxy] and [no_proxy] and ignores environment proxy variables.
for repository operations, apiscope passes configured proxy settings to git and gh; when [proxy] is unset, it does not set or clear their proxy.
[no_proxy] is a comma-separated list of hosts, domains, or * that bypasses the configured proxy.
the cache lives in the app directory of the selected layer, and the rest of its rules sit under ## commands.
commands
add
register a source:
apiscope add <name> <source> --type <type> [--ttl <days>]
arxiv accepts a canonical identifier such as 1706.03762 or hep-th/9901001; append vN for a fixed version. URL forms are not accepted.
remove
delete a source:
apiscope remove <name>
list
list registered sources:
apiscope list <selector> [--limit <n>] [--offset <n>]
the selector is one of all, filesystem, repo, openapi, rfc, llmstxt, or arxiv.
sync
fetch sources into the cache:
apiscope sync <selector> [<name>] [--force]
the selector is the same as in list, and the optional name narrows the range to one source.
a source refreshes when its cache is older than its ttl, and --force ignores the ttl.
repo clones with shallow depth, and a subpath selects files with a sparse checkout.
llmstxt reads the index page, caches the markdown version of each page, and skips a page that only serves HTML.
arxiv prefers structured HTML, falls back to TeX source, and does not parse PDF-, PostScript-, or DVI-only submissions.
view
show the cached structure of an address:
apiscope view <address> [--depth <n>]
depth caps the levels below the scope; the default is unlimited.
read
read one node:
apiscope read <address> [<index>]
the index is optional when the address already points at a leaf.
bookmark
save a named reference and reopen it later:
apiscope bookmark add <id> <mode> <target>... --description <text>
apiscope bookmark list [<group>]
apiscope bookmark use <id>
apiscope bookmark remove <id>
apiscope bookmark prune [--invalid]
mode is file, view, read, or group; a group takes five to nine member ids. bookmarks live in a global file and a project file, and the project wins.
skill
print or install the agent skill:
apiscope skill show
apiscope skill install [<target>]
install defaults to ~/.agents/skills/apiscope.
future
- read academic papers from arxiv
- more formal document formats as the need arises
license
MIT
Metadata
Release files for llm-api-scope 0.12.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| llm_api_scope-0.12.4.tar.gz | 86.8 kB | Without provenance | Details for llm_api_scope-0.12.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| llm_api_scope-0.12.4-py3-none-any.whl | Python 3 | none | any | Details for llm_api_scope-0.12.4-py3-none-any.whl |
Total release size: 221.7 kB
Release files / llm_api_scope-0.12.4.tar.gz
| Download URL | llm_api_scope-0.12.4.tar.gz |
|---|---|
| Size | 86.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6ed1885d395d6b2c653885641485c8849a1dbb86ca4f036de3e632dd635a2371
|
|
BLAKE2b-256 checksum How to use checksums |
f975d8dc65d7e6cc85b7f3051053c487401c57f611f6653488dca0390ec24357
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
pdm/2.29.2 CPython/3.14.8 Linux/6.17.0-1022-azure
|
Release files / llm_api_scope-0.12.4-py3-none-any.whl
| Download URL | llm_api_scope-0.12.4-py3-none-any.whl |
|---|---|
| Size | 134.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ca91af3b46089c59e62e226efb61a2f55f473916f692820d862c2c49cecb6217
|
|
BLAKE2b-256 checksum How to use checksums |
563a81dd0c061617f4d8d214c35ecdbf4e919210f5dc021da4e11020739e6e50
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
pdm/2.29.2 CPython/3.14.8 Linux/6.17.0-1022-azure
|
Security for llm-api-scope 0.12.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.