Skip to main content

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.

five document types share one command surface:

  • filesystem reads a local file or directory
  • repo reads a directory inside a git repository
  • openapi reads an OpenAPI specification
  • rfc reads an IETF document
  • llmstxt reads a site index that lists documentation pages
apiscope add docs https://example.test/docs/llms.txt --type llmstxt
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.

{
  "setting": {
    "public": {"doc_ttl": 7},
    "local": {"proxy": "http://proxy.example.test:8080"}
  }
}

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>]

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, or llmstxt.

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, a blobless filter, and sparse checkout. llmstxt reads the index page, downloads the pages it lists, and skips a failed page.

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.

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.9.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for llm-api-scope 0.9.0
File Size Uploaded
llm_api_scope-0.9.0.tar.gz 56.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for llm-api-scope 0.9.0
File Interpreter ABI Platform
llm_api_scope-0.9.0-py3-none-any.whl Python 3 none any Details

Total release size: 145.4 kB

Release files / llm_api_scope-0.9.0.tar.gz

Download URL llm_api_scope-0.9.0.tar.gz
Size 56.7 kB
Tags Source
SHA-256 checksum
How to use checksums
3280832d2fb4876d775b98f3626c004fe3628fb043308ec9fa432ebd0f81f7cc
BLAKE2b-256 checksum
How to use checksums
30e3fcd7eceb186018d2c5659e408cd5ae049370874ed260216c9c106e5dd981
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via pdm/2.29.2 CPython/3.14.7 Linux/6.17.0-1022-azure

Release files / llm_api_scope-0.9.0-py3-none-any.whl

Download URL llm_api_scope-0.9.0-py3-none-any.whl
Size 88.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0f13fe6965321191cff68c23269043ccce941a56aca6d7444ebe8b6c89a2ea52
BLAKE2b-256 checksum
How to use checksums
d5bc4f45d0c87409c1ac360cf0a73bf3cc52b43363411570e3fecb217dae997a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via pdm/2.29.2 CPython/3.14.7 Linux/6.17.0-1022-azure

Release history Release notifications | RSS feed

This release

0.9.0 This release

2 release files

0.8.0

2 release files

0.7.0

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page