
Api.live 发布 v0.1:可把代码仓库中每个 API 端点转为可运行请求
来源标题:Api.live – Point it at a repo, get every endpoint as a runnable request
Api.live 发布 v0.1 免费版,能将代码仓库中的每个 API 端点转换为可运行的请求。该产品提供 Mac 应用、CLI 和 MCP server,在本机运行,无需账号、不上云,也不采集遥测数据,密钥保存在 git-ignored 文件中。此外,它还支持 Flow 编排、模拟、健康检查、抓包和负载测试。
以下正文同步自 Hacker News 最新,版权归原站所有,已转换为易读排版。
The complete API suite. One app, one CLI, one MCP server. v0.1, free.
Runs on your machine
No account
No cloud
Zero telemetry
Secrets stay in git-ignored filesSecrets git-ignored
Download the Mac app Take the tour
Homebrew npm Linux / Windows
Claude Code Any MCP client
$
brew install --cask apilivehq/tap/api-live
Open
$
brew install apilivehq/tap/api-live-cli
checkout.flow ready
Requests Flows Health Simulate Capture Load Design
Flows 4
checkout.flow
refunds.flow calls checkout
partner-webhook.flow
shared/login.flow used by 3
basics/ 23 lessons
StepsAPL
.apilive/flows/checkout.flow
Steps run top to bottom · click a blank to change itRun
1Start the simulator
2Mock POST /charge answers 200 {"charge_id": "ch_{{ random::alnum::8 }}"}
3Send POST {{ env.BASE_URL }}/auth/login as login
JSON body {"email": "[email protected]", "password": "{{ env.PASSWORD }}"}
4Check status is 200
5Save token = body.accessToken, mask it in reports
6Run 20 copies at the same time
Send POST {{ env.BASE_URL }}/orders with header Idempotency-Key: {{ key }}, bearer token
Check status is one of 201, 409
7The simulator received POST /charge exactly 1 time
+Add a step
Send a request
Copy in a request from your collection
Check the response
Save a value
Run at the same time ×N copies for races
Check what the simulator received
Listen for webhooks
Loop: repeat N times
If a condition holds
More step types… 50+
Resultsrunning
✓Start the simulator:4790
✓Mock POST /charge1 route
✓Send POST /auth/login200 · 41 ms
✓Check status is 200200
✓Save tokenmasked
✓Run 20 copies1 × 201 · 19 × 409
✓Simulator received POST /charge1 of 1
Passed7 steps, 2.1 s. Saved as checkout.flow.
Flows 4
checkout.flow
refunds.flow calls checkout
partner-webhook.flow
shared/login.flow used by 3
basics/ 23 lessons
StepsAPL
.apilive/flows/checkout.flow
flow "Checkout: one order, one charge" sim start sim route POST /charge -> 200 {"charge_id": "ch_{{ random::alnum::8 }}"}
POST {{ env.BASE_URL }}/auth/login as login json {"email": "[email protected]", "password": "{{ env.PASSWORD }}"} expect status 200 save token = body.accessToken secret token
set key = "{{ faker::uuid }}" parallel 20: POST {{ env.BASE_URL }}/orders as order auth bearer {{ token }} header Idempotency-Key: {{ key }} json {"sku": "SKU-1042", "quantity": 1} expect status in [201, 409]
expect sim POST /charge count 1
load GET {{ env.BASE_URL }}/products vus 200 for 30s as perf expect load.p99 < 200
Run0.0 s
Simulator listening127.0.0.1:4790
POST /auth/login200 41 ms
parallel 2020 × POST /orders
1 × 201 19 × 409
sim POST /charge count1 ✓
load GET /products200 vus
p99 — ms— req/s0/30 s
load.p99 < 200143 ms ✓
Passed0 failed, 37.4 s. Written to history.
storefront staging ▾
auth/
POST login.yaml
orders/
POST create-order.yaml
GET get-order.yaml
products/
GET list.yaml
discovered/ 42 from api index
.apilive/collections/storefront/
POST {{ env.BASE_URL }}/orders Send
ParamsHeaders 2BodyAuth bearerChain 1ScriptsDocs
{ "sku": "SKU-1042", "quantity": 1{{ range::1-5 }}, "idempotency_key": "{{ faker::uuid }}" }
Randomize "quantity"
{{ uuid }}
{{ faker::email }}
{{ range::1-5 }}a number each run
{{ seq::1001 }}counts up
{{ csv.quantity }}from users.csv
{{ env.QTY }}
Saved values
{{ order_id }}
Sending… 201 Created · 38 ms · 412 B · HTTP/2 · 10.0.4.12:443
BodyHeaders 9CookiesTimelineAs cURL
{ "id": "ord_8f3k2v", "status": "pending", "amount": 125.5, "currency": "EUR", "charge_id": "ch_q7m2xk1p" }
Last Known Good (201 · 2 h ago) · Bodies identical ✓ · Restore · Diff
Chain
Values pulled out of this response for the next request.
staging.yaml is committed. staging.secrets.yaml is git-ignored.
Public hosts are capped at 2,000 req/s by default. Localhost and private networks are never capped.
$ api daemon watching 3 monitors checkout next run in 4m 32s
checkout passed38.4 s · 9 checks · staging
Capture
ForwardReverse
Listening127.0.0.1:8888
Record onlyapi.example.com
Certificatetrusted
Sessions
today 18:03 0 calls
yesterday 11:40 231 calls
Recording ● live
MethodPathStatusTimeHost GET/products?limit=2020061 msapi.example.com POST/auth/login20044 msapi.example.com GET/cart20012 msapi.example.com POST/orders20138 msapi.example.com GET/orders/ord_8f3k2v20015 msapi.example.com GET/orders/ord_8f3k2v20014 msapi.example.com · polling ×3 POST/v1/charges200212 msapi.stripe.com
Promote
To flowTo simulationTo requestsTo OpenAPIHAR
checkout-from-capture.flow 6 steps · base URL → {{ env.BASE_URL }} token and order id chained 3 polls collapsed into poll … until status == "paid" api.stripe.com → simulation stripe.yaml
Replay against staging 6 of 6 answers match · ignoring *.id
openapi.yaml 3.1
POST /auth/login
GET /products
POST /orders
GET /orders/{id}
POST /charge
Schemas
Order
Product
Error
POST /orders Create an order
Tagsorders
Securitybearer
Parametersheader Idempotency-Key · string · required
Request bodyapplication/json · sku string · quantity integer ≥ 1
Responses
201Order createdOrderexample: JSON, used by the simulator 409Duplicate idempotency keyErrorexample added · the simulator answers with it Add the status codes this operation returns…
Whole spec
Operations5
Schemas3
Lint
0 errors2 warnings
GET /products has no 4xx response
Order.amount has no format
Coverage
POST /orderscovered by checkout.flow
Codes seen1 of 2
Spec changed+ 409 on POST /orders since the last green runapi spec diff
storefront staging ▾
auth/
orders/
products/
discovered/ 42
POST v1/payments/charge
GET v1/payments/{id}
POST v1/refunds
GET api/products
… 38 more
.apilive/collections/discovered/
Smart indexing ~/code/storefront
●Read 1,284 files · respects .gitignore · no code is run
✓Languages: TypeScript, Rust, Python · 28 supported
✓Frameworks: Next.js 16 routes · Axum 18 · FastAPI 8
✓Specs: api/openapi.yaml, OpenAPI 3.1, 5 operations, merged
✓Shapes: 42 of 42 endpoints typed · params + body · required marked
✓Wrote 42 requests, ready to send Open
POST /v1/payments/chargefrom services/payments/routes.ts · DTO ChargeRequest
Authorization: Bearer {{ env.TOKEN }} Idempotency-Key: {{ uuid }}
{ "amount": 1250, "currency": "EUR", "customer_id": "cus_8f3k2v", "description": "Order SKU-1042", "capture": true }
amountintegerrequiredminimum 1 · minor units
currencystringrequiredenum: EUR, USD, GBP
customer_idstringrequiredformat: id
descriptionstringoptionalomitted unless you ask
Hover a field to see its type and whether it's required or optional. Fill: Required · Required + optional
Languages 28
TypeScriptJavaScriptPythonRustGoJavaKotlinScalaGroovyC#F#PHPRubyElixirErlangSwiftDartC++ClojureHaskellOCamlJuliaCrystalZigNimLuaPerlRGleam
Frameworks 125
ExpressNestJSNext.jsFastifyHonoKoatRPCSvelteKitNuxtFastAPIFlaskDjangoDRFSpringQuarkusMicronautKtorASP.NETGinEchochiFiberAxumActixRocketRailsSinatraLaravelSymfonyPhoenixVaporPlayAkka+ 92 more
Also read
OpenAPI 3.0 and 3.1, Swagger 2.0, JSON or YAML, multi-file $refs. Route prefixes from config: Spring context-path, NestJS global prefix, ASP.NET PathBase, Laravel apiPrefix. Re-indexes when files change and never overwrites a request you edited.
$ api flow run all --tag smoke --junit flows.xml --html flows.html checkout passed 9 checks 38.2 s refunds passed 6 checks 4.1 s partner-webhook degraded 5 checks 7.8 s passed after 1 retry 3 flows, 20 checks, 0 failed. Wrote flows.xml and flows.html.
$ api index Read 1,284 files. Found 42 routes: Axum 18, Next.js 16, FastAPI 8. Wrote 42 requests to .apilive/collections/discovered/
$ api daemon # monitors, headless, on a server watching 3 monitors · checkout next in 4m 32s
$ api mcp # 61 tools over stdio { "mcpServers": { "api.live": { "command": "api", "args": ["mcp"] } } }
MCP tools 61
run_flow
load_flow
save_flow
run_request
run_load_test
start_mock
add_mock_route
mock_hits
index_codebase
compare_history
get_last_known_good
run_monitor
… 49 more
Flows can be passed inline, so an agent writes a test, runs it and reads every expected-versus-actual without saving a file.
50+ step types composed like functions. Build it from sentences or write it as text. One engine, one file in git.
50+ step typesSend, check, save, branch, loop, poll, race, wait for a webhook, call another flow, run under load.
Race and idempotency tests in one rowRun N copies at once, then ask the simulator what it received. A catalogue of 36 edge cases and 38 templates to start from.
Baselines with classified diffsA known-good response lives next to the flow, in git. Every run diffs it semantically: schema, value, order, status, timing.
Export to 20 test frameworksKarate, REST Assured, pytest, Jest, Playwright, Cypress, k6, Go, RSpec, PHPUnit, Rust, Robot Framework and more.
Reusable like codecall another flow, def functions, import them from a shared file.
2 / 10 · Smart index · in Requests, or api index
It reads your routers, controllers and OpenAPI specs and writes a ready-to-send request for every endpoint. It indexes the code, never runs it. Nothing leaves your machine.
28 languages, 125 frameworksTypeScript to Gleam, Express to Phoenix. Respects .gitignore; reads OpenAPI 3.0 / 3.1 and Swagger 2.0 too.
Every endpoint, with its real payloadPath, query, header, cookie and body, each field typed from your code: type, format, enum, min and max, pattern.
Required vs optional, inferredFrom the idiom you used: Go binding:"required", Python Optional[…], Pydantic Field, OpenAPI required lists.
Values that fill themselves inRealistic by name and format: a uuid is a uuid, an email an email. The body validates against its own schema. Optional fields only when you ask.
Never clobbers your editsRe-indexing watches for new routes and refreshes only the files you haven't touched.
One line per action, 70+ functions, real control flow, and a simulator and load engine built into the language.
The simulator lives inside the testsim start, sim route, sim wait for the webhook, expect sim … count 1.
Secrets never sit on disk in clearsecret token masks it in every report. Resolvers for 1Password, Vault, AWS, Azure, GCP, Bitwarden and the OS keychain.
Checks that understand your API17 formats, JSON Schema straight from your OpenAPI $ref, sorted / unique / every, soft checks, snapshots with ignore rules.
Load in the same fileload … vus 200 for 30s as perf, then expect load.p99 < 200.
Flows from recorded trafficA HAR, your history or a capture becomes a flow: noise filtered, polling collapsed, ids and tokens chained for you.
Files in your repo, environments as one table, a history that knows what good looks like.
Environments as a spreadsheetVariables × environments with an All column; production asks before POST or DELETE.
Last Known GoodEvery 2xx is snapshotted. When it breaks, restore the exact request or diff against the good answer.
Schema validation on every responsePoint a request at a schema in your openapi.yaml. A failure names the field.
Chaining and real scriptsJSONPath, header or regex into variables. Pre and post scripts in Node or Bun, pm.* included.
Import anything, export codePostman, Bruno, Insomnia, HAR, OpenAPI, .http, Hurl and cURL in. 22 code targets out.
Randomize with intentRight-click any value: faker, ranges, sequences, CSV columns, DLP-safe card numbers.
Each simulation is a service on its own port. Templated, stateful, chaotic, and generated from what you already
正文由 探How 从来源站点 RSS 同步,内容未经改写;遇到排版缺失或需要图片、视频时请以原文为准。