# API Skill Web App

[English](https://unpkg.com/apiskill@latest/docs/web.md) / [中文](https://unpkg.com/apiskill@latest/docs/web.zh.md) / [한국어](https://unpkg.com/apiskill@latest/docs/web.ko.md) / [日本語](https://unpkg.com/apiskill@latest/docs/web.ja.md)

## Start

After installing from npm:

```bash
npm install -g apiskill
apiskill run web
```

Web, CLI, and MCP use the same user-writable `~/.apiskill/cache` directory by default. `--cwd` changes only the working directory. For an isolated cache, set the same absolute `APISKILL_CACHE_DIR` for all three processes. When developing this repository, you can also use:

```bash
npm install
npm run dev
```

Open the local URL printed by the terminal.

Cache Settings in the upper-right corner shows the active session location and changes the saved default. Existing files are never moved or deleted. Restart Web to use the new location; Update Cache Location on a version shows the source and destination before copying while retaining the source file.

## Import Sources

The web app supports four import paths:

- Direct OpenAPI/Swagger JSON or YAML URL.
- Swagger UI, Knife4j, or Redoc page crawl.
- Local JSON/YAML file upload.
- Curl command that returns an OpenAPI/Swagger document.
- Blank document creation when no upstream documentation exists yet.

Imported documents are written to `cache/versions/`, and `cache/latest-import.json` points to the active latest version.

## Create A Document From Scratch

Use the New Document button to create a blank OpenAPI 3.0 document with a title, version, and optional description. The new document becomes the active cached version immediately. You can then use Add/Edit/Delete API actions to let an AI assistant or developer build the API contract incrementally without importing external documentation first.

## MOCK Server

After API document data exists, click Start MOCK Service. The web backend starts a local MOCK API server from the current document paths, HTTP methods, and response schemas. Calling a matching API returns random JSON data. When no usable API data exists yet, the page prompts you to import, crawl, or create a document first.

## Browse And Inspect APIs

Use the search controls to filter endpoints by keyword, tag, method, or request-body presence. Open endpoints as tabs to inspect:

- Request parameters.
- Request body fields.
- Response fields.
- AI-ready Markdown context.
- Raw OpenAPI JSON.

## Manage Versions And Manual APIs

Use the version manager to switch or delete cached versions. Use Add/Edit/Delete API actions to maintain local manual operations when the upstream OpenAPI document is incomplete, when you need a temporary local contract, or when the whole document is being authored from zero.

Manual operations are stored in the same versioned cache as imported documents, so the CLI and MCP server can query them immediately.
