From 96defd5b64737a275bec67542bc097ece5bc1dcf Mon Sep 17 00:00:00 2001 From: Brendan Ryan Date: Sat, 14 Feb 2026 17:50:12 -0800 Subject: [PATCH 1/3] ci: speed up deploy workflow - Add pnpm store caching (cache: pnpm on setup-node) - Run lint/types and tests in parallel jobs - Merge build + deploy into a single job (eliminate redundant checkout, pnpm/node setup, and artifact upload/download) --- .github/workflows/deploy.yml | 92 ++++++++++++++++-------------------- 1 file changed, 41 insertions(+), 51 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 2c3567af..d0626596 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,4 +1,4 @@ -name: Deploy +name: Deploy on: push: @@ -15,23 +15,21 @@ concurrency: cancel-in-progress: true jobs: - ci: + lint: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Set up pnpm - uses: pnpm/action-setup@v4 + - uses: pnpm/action-setup@v4 with: version: 10 - - name: Setup Node.js - uses: actions/setup-node@v4 + - uses: actions/setup-node@v4 with: node-version: "24" + cache: "pnpm" - - name: Install dependencies - run: pnpm install + - run: pnpm install - name: Check code run: pnpm check @@ -39,9 +37,42 @@ jobs: - name: Check types run: pnpm check:types + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: pnpm/action-setup@v4 + with: + version: 10 + + - uses: actions/setup-node@v4 + with: + node-version: "24" + cache: "pnpm" + + - run: pnpm install + - name: Tests run: pnpm test + build-and-deploy: + needs: [lint, test] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: pnpm/action-setup@v4 + with: + version: 10 + + - uses: actions/setup-node@v4 + with: + node-version: "24" + cache: "pnpm" + + - run: pnpm install + - name: Build run: pnpm build env: @@ -49,23 +80,10 @@ jobs: - name: Smoke test (wrangler dev) run: | - # ────────────────────────────────────────────────────────── - # To reproduce locally: - # pnpm build - # pnpm wrangler:dev & - # curl -s -o /dev/null -w '%{http_code}' http://localhost:8788/quickstart/tempoctl -H 'Accept: text/html' - # curl -s -o /dev/null -w '%{http_code}' http://localhost:8788/ -H 'Accept: text/html' - # curl -s -o /dev/null -w '%{http_code}' http://localhost:8788/ -H 'Accept: text/markdown' - # All three should return 200. If any return 500, check wrangler - # logs for the error — usually a missing module or unsupported - # Node.js API. Fix in scripts/patch-cf.ts. - # ────────────────────────────────────────────────────────── - WRANGLER_LOG=$(mktemp) npx wrangler dev --port 8788 > "$WRANGLER_LOG" 2>&1 & WRANGLER_PID=$! - # Wait for wrangler to be ready (up to 30s) for i in $(seq 1 30); do if curl -sf http://localhost:8788/ -o /dev/null 2>/dev/null; then break @@ -115,34 +133,6 @@ jobs: - name: Prune server bundle run: node --experimental-strip-types scripts/prune-server.ts - - name: Upload build - uses: actions/upload-artifact@v4 - with: - name: dist - path: dist/ - - deploy: - needs: ci - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Set up pnpm - uses: pnpm/action-setup@v4 - with: - version: 10 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: "22" - - - name: Download build - uses: actions/download-artifact@v4 - with: - name: dist - path: dist/ - - name: Sanitize branch name if: github.event_name == 'pull_request' id: branch @@ -166,7 +156,7 @@ jobs: script: | const alias = "${{ steps.branch.outputs.alias }}" const url = `https://${alias}-mpp-docs.porto.workers.dev` - const body = `MPP Docs preview: ${url}` + const body = `docs preview: ${url}` const { data: comments } = await github.rest.issues.listComments({ issue_number: context.issue.number, owner: context.repo.owner, @@ -174,7 +164,7 @@ jobs: }) let existing = null for (const comment of comments) { - if (comment.body && comment.body.startsWith('MPP Docs preview:')) { + if (comment.body && comment.body.startsWith('docs preview:')) { existing = comment break } From c25da1b4ab600cdd9f96e5bea391ae1c35eeb200 Mon Sep 17 00:00:00 2001 From: Brendan Ryan Date: Sun, 15 Feb 2026 08:00:28 -0800 Subject: [PATCH 2/3] ci: use frozen-lockfile and pnpm exec wrangler - Add --frozen-lockfile to all pnpm install steps to prevent lockfile drift - Replace npx wrangler with pnpm exec wrangler in smoke test to use pinned devDependency version --- .github/workflows/deploy.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index d0626596..2e9105f0 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -29,7 +29,7 @@ jobs: node-version: "24" cache: "pnpm" - - run: pnpm install + - run: pnpm install --frozen-lockfile - name: Check code run: pnpm check @@ -51,7 +51,7 @@ jobs: node-version: "24" cache: "pnpm" - - run: pnpm install + - run: pnpm install --frozen-lockfile - name: Tests run: pnpm test @@ -71,7 +71,7 @@ jobs: node-version: "24" cache: "pnpm" - - run: pnpm install + - run: pnpm install --frozen-lockfile - name: Build run: pnpm build @@ -81,7 +81,7 @@ jobs: - name: Smoke test (wrangler dev) run: | WRANGLER_LOG=$(mktemp) - npx wrangler dev --port 8788 > "$WRANGLER_LOG" 2>&1 & + pnpm exec wrangler dev --port 8788 > "$WRANGLER_LOG" 2>&1 & WRANGLER_PID=$! for i in $(seq 1 30); do From 910a03cfd9833bb511efdcf3a9ab11445aa1faff Mon Sep 17 00:00:00 2001 From: Brendan Ryan Date: Sun, 15 Feb 2026 10:14:44 -0800 Subject: [PATCH 3/3] rename tempoctl to presto Replace all references of tempoctl with presto across docs, config, and file paths. Add redirects from old tempoctl URLs to presto. --- src/pages/quickstart/index.mdx | 4 +- .../quickstart/{tempoctl.mdx => presto.mdx} | 50 +++++----- src/pages/quickstart/server.mdx | 14 +-- src/pages/sdk/index.mdx | 4 +- src/pages/tools/presto.mdx | 95 +++++++++++++++++++ .../tools/{tempoctl => presto}/examples.mdx | 62 ++++++------ src/pages/tools/tempoctl.mdx | 95 ------------------- vocs.config.ts | 21 ++-- 8 files changed, 174 insertions(+), 171 deletions(-) rename src/pages/quickstart/{tempoctl.mdx => presto.mdx} (68%) create mode 100644 src/pages/tools/presto.mdx rename src/pages/tools/{tempoctl => presto}/examples.mdx (50%) delete mode 100644 src/pages/tools/tempoctl.mdx diff --git a/src/pages/quickstart/index.mdx b/src/pages/quickstart/index.mdx index 0c7d7b15..0e750760 100644 --- a/src/pages/quickstart/index.mdx +++ b/src/pages/quickstart/index.mdx @@ -21,8 +21,8 @@ Pick a starting point based on your role: /> diff --git a/src/pages/quickstart/tempoctl.mdx b/src/pages/quickstart/presto.mdx similarity index 68% rename from src/pages/quickstart/tempoctl.mdx rename to src/pages/quickstart/presto.mdx index 1dd7082e..82da72f8 100644 --- a/src/pages/quickstart/tempoctl.mdx +++ b/src/pages/quickstart/presto.mdx @@ -1,8 +1,8 @@ import { Card, Cards } from 'vocs' -# tempoctl [Make paid HTTP requests from the command line] +# presto [Make paid HTTP requests from the command line] -`tempoctl` is a command-line tool for making HTTP requests with automatic payment support. It handles `402 Payment Required` responses with built-in payment methods and spending controls. Works from scripts, cron jobs, and AI agents. +`presto` is a command-line tool for making HTTP requests with automatic payment support. It handles `402 Payment Required` responses with built-in payment methods and spending controls. Works from scripts, cron jobs, and AI agents. ## Quickstart @@ -19,16 +19,16 @@ $ curl -fsSL https://tempo.xyz/ctl/install.sh | bash Run the login wizard to set up your wallet: ```bash [login.sh] -$ tempoctl login +$ presto login ``` -This creates a new encrypted keystore and saves your configuration to `~/.tempoctl/config.toml`. +This creates a new encrypted keystore and saves your configuration to `~/.presto/config.toml`. :::tip[Quick setup for testing] For quick testing without a keystore, set your private key directly: ```bash [set-key.sh] -$ export TEMPOCTL_PRIVATE_KEY="0x..." +$ export PRESTO_PRIVATE_KEY="0x..." ``` ::: @@ -36,14 +36,14 @@ $ export TEMPOCTL_PRIVATE_KEY="0x..." ### Make your first paid request ```bash [paid-request.sh] -$ tempoctl query -vv https://mpp.tempo.xyz/api/ping/paid +$ presto query -vv https://mpp.tempo.xyz/api/ping/paid ``` :::tip[Live demo server] We host a live demo server at `mpp.tempo.xyz` running on **Tempo testnet**. Use `/api/ping` for free requests and `/api/ping/paid` for paid requests. Get testnet funds at [faucet.tempo.xyz](https://faucet.tempo.xyz). ::: -`tempoctl` automatically: +`presto` automatically: 1. Makes the initial request 2. Detects the `402` Payment Required response @@ -61,13 +61,13 @@ We host a live demo server at `mpp.tempo.xyz` running on **Tempo testnet**. Use Use dry-run mode to see what would happen without actually paying: ```bash [dry-run.sh] -$ tempoctl query -D https://mpp.tempo.xyz/api/ping/paid +$ presto query -D https://mpp.tempo.xyz/api/ping/paid ``` Or inspect the payment requirements before paying: ```bash [inspect.sh] -$ tempoctl inspect https://mpp.tempo.xyz/api/ping/paid +$ presto inspect https://mpp.tempo.xyz/api/ping/paid ``` ### Set spending limits @@ -76,7 +76,7 @@ Protect yourself with a maximum payment amount: ```bash [max-payment.sh] # Reject payments over 1 USD -$ tempoctl query -M 1000000 https://mpp.tempo.xyz/api/ping/paid +$ presto query -M 1000000 https://mpp.tempo.xyz/api/ping/paid ``` ### Common flags @@ -95,31 +95,31 @@ $ tempoctl query -M 1000000 https://mpp.tempo.xyz/api/ping/paid ## Built-in skills -tempoctl ships with built-in support for common AI agents. When used as a skill by AI assistants like Claude, tempoctl enables agents to interact with paid APIs autonomously. +presto ships with built-in support for common AI agents. When used as a skill by AI assistants like Claude, presto enables agents to interact with paid APIs autonomously. ### How it works -AI agents can use `tempoctl` to: +AI agents can use `presto` to: - **Access paid APIs**—Make requests to services that charge per-call - **Query premium data**—Fetch information from paid data providers - **Use commercial tools**—Interact with paid developer services -The agent calls tempoctl like any other commandline tool when it detects a `402` Payment Required response. Payment is handled transparently. +The agent calls presto like any other commandline tool when it detects a `402` Payment Required response. Payment is handled transparently. ### Example: Agent making a paid request When an AI agent needs to access a paid resource, it runs: ```bash [agent-request.sh] -$ tempoctl query https://api.example.com/premium-data +$ presto query https://api.example.com/premium-data ``` The agent receives the response data directly—no manual payment handling required. ## Safety controls -tempoctl includes safeguards for autonomous agent use: +presto includes safeguards for autonomous agent use: ### Spending limits @@ -127,7 +127,7 @@ Set a maximum amount the agent can spend per request: ```bash [spending-limit.sh] # Limit to 0.50 USDC per request -$ tempoctl query -M 500000 https://api.example.com/data +$ presto query -M 500000 https://api.example.com/data ``` ### Dry run mode @@ -135,7 +135,7 @@ $ tempoctl query -M 500000 https://api.example.com/data Agents can preview costs before committing: ```bash [preview-cost.sh] -$ tempoctl query -D https://api.example.com/expensive-endpoint +$ presto query -D https://api.example.com/expensive-endpoint ``` ### Network filtering @@ -143,16 +143,16 @@ $ tempoctl query -D https://api.example.com/expensive-endpoint Restrict payments to specific networks: ```bash -tempoctl query -n tempo-moderato https://api.example.com/data +presto query -n tempo-moderato https://api.example.com/data ``` ### Skill configuration -For AI agent frameworks that support skills, tempoctl can be configured as a tool: +For AI agent frameworks that support skills, presto can be configured as a tool: ```json { - "name": "tempoctl", + "name": "presto", "description": "Make HTTP requests with automatic payment support", "parameters": { "url": { @@ -173,14 +173,14 @@ For AI agent frameworks that support skills, tempoctl can be configured as a too ```bash [query-api.sh] # Query a paid data API -$ tempoctl query https://api.data-provider.com/market-data?symbol=BTC +$ presto query https://api.data-provider.com/market-data?symbol=BTC ``` ### Paid compute ```bash [inference.sh] # Run inference on a paid model -$ tempoctl query -X POST \ +$ presto query -X POST \ --json '{"prompt": "Explain quantum computing"}' \ https://api.ai-provider.com/generate ``` @@ -189,7 +189,7 @@ $ tempoctl query -X POST \ ```bash [analyze-repo.sh] # Use a paid developer tool -$ tempoctl query https://api.dev-tools.com/analyze?repo=myorg/myrepo +$ presto query https://api.dev-tools.com/analyze?repo=myorg/myrepo ``` ## Next steps @@ -199,12 +199,12 @@ $ tempoctl query https://api.dev-tools.com/analyze?repo=myorg/myrepo icon="lucide:code" title="Examples" description="More usage patterns and real endpoints" - to="/tools/tempoctl/examples" + to="/tools/presto/examples" /> diff --git a/src/pages/quickstart/server.mdx b/src/pages/quickstart/server.mdx index 310287ee..5ed65732 100644 --- a/src/pages/quickstart/server.mdx +++ b/src/pages/quickstart/server.mdx @@ -193,26 +193,26 @@ export async function handler(req: IncomingMessage, res: ServerResponse) { ``` -## Testing with tempoctl +## Testing with presto -After your server is running, test it with [tempoctl](/tools/tempoctl): +After your server is running, test it with [presto](/tools/presto): ```bash [test-server.sh] # See the payment challenge -$ tempoctl inspect /resource +$ presto inspect /resource # Make a paid request (requires funded wallet) -$ tempoctl query /resource +$ presto query /resource # Verbose output to see the full 402 flow -$ tempoctl query -vi /resource +$ presto query -vi /resource # Dry run to preview payment without executing -$ tempoctl query -D /resource +$ presto query -D /resource ``` :::tip -Use `tempoctl inspect` to debug your server's challenge response without making any payments. +Use `presto inspect` to debug your server's challenge response without making any payments. ::: ## Next steps diff --git a/src/pages/sdk/index.mdx b/src/pages/sdk/index.mdx index e28be144..4a865d60 100644 --- a/src/pages/sdk/index.mdx +++ b/src/pages/sdk/index.mdx @@ -24,7 +24,7 @@ import { Card, Cards } from 'vocs' diff --git a/src/pages/tools/presto.mdx b/src/pages/tools/presto.mdx new file mode 100644 index 00000000..7c1ea2a5 --- /dev/null +++ b/src/pages/tools/presto.mdx @@ -0,0 +1,95 @@ +# presto [wget for payments] + +`presto` is a non-interactive commandline tool for making HTTP requests with automatic payment support. + +When you request a resource that requires payment, `presto` automatically detects the `402` response, fulfills the payment, and retries—all in a single command. + +## Installation + +**Quick install:** + +```bash [install.sh] +$ curl -fsSL https://tempo.xyz/ctl/install.sh | bash +``` + +**From source:** + +```bash [build-from-source.sh] +$ git clone https://github.com/tempoxyz/presto.git +$ cd presto +$ cargo install --path . +``` + +## Quick start + +```bash [quickstart.sh] +# Log in (first time only) +$ presto login + +# Make a paid request +$ presto query https://mpp.tempo.xyz/api/ping/paid +``` + +:::tip[Live demo server] +We host a live demo server at `mpp.tempo.xyz` running on **Tempo testnet**. Use `/api/ping` for free requests and `/api/ping/paid` for paid requests. Get testnet funds at [faucet.tempo.xyz](https://faucet.tempo.xyz). +::: + +## Configuration + +`presto` uses encrypted keystores for secure wallet management. + +### Example config + +```toml +[evm] +keystore = "/Users/you/.presto/keystores/my-wallet.json" + +# Override RPC URLs +[rpc] +tempo = "https://my-private-rpc.com" +``` + +## Key management + +```bash [key-management.sh] +# List all access keys +$ presto keys list + +# Switch to a different access key +$ presto keys switch 1 + +# Delete an access key +$ presto keys delete 2 +``` + +## Command reference + +| Command | Description | +|---------|-------------| +| `presto query ` | Make an HTTP request with automatic payment | +| `presto login` | Log in and set up your wallet | +| `presto logout` | Log out and clear credentials | +| `presto whoami` | Show the current authenticated identity | +| `presto inspect ` | Inspect payment requirements | +| `presto balance` | Check wallet balance | +| `presto config` | View/manage configuration | +| `presto networks` | List supported networks | + +## Learn more + +import { Card, Cards } from 'vocs' + + + + + diff --git a/src/pages/tools/tempoctl/examples.mdx b/src/pages/tools/presto/examples.mdx similarity index 50% rename from src/pages/tools/tempoctl/examples.mdx rename to src/pages/tools/presto/examples.mdx index e8dd82b4..c2bb87ef 100644 --- a/src/pages/tools/tempoctl/examples.mdx +++ b/src/pages/tools/presto/examples.mdx @@ -1,4 +1,4 @@ -# tempoctl examples [Test against live endpoints] +# presto examples [Test against live endpoints] ## Try it now @@ -6,19 +6,19 @@ We host a live demo server at `mpp.tempo.xyz` running on **Tempo testnet** that ```bash [try-demo.sh] # Free endpoint - no payment required -$ tempoctl query https://mpp.tempo.xyz/api/ping +$ presto query https://mpp.tempo.xyz/api/ping # Paid endpoint - requires 0.10 pathUSD payment -$ tempoctl query https://mpp.tempo.xyz/api/ping/paid +$ presto query https://mpp.tempo.xyz/api/ping/paid # Inspect the payment requirements first -$ tempoctl inspect https://mpp.tempo.xyz/api/ping/paid +$ presto inspect https://mpp.tempo.xyz/api/ping/paid # Dry run to preview what happens -$ tempoctl query -D https://mpp.tempo.xyz/api/ping/paid +$ presto query -D https://mpp.tempo.xyz/api/ping/paid # Verbose output to see the full 402 flow -$ tempoctl query -vi https://mpp.tempo.xyz/api/ping/paid +$ presto query -vi https://mpp.tempo.xyz/api/ping/paid ``` ### Set up with a private key @@ -27,10 +27,10 @@ For testing, you can use a private key directly using an environment variable: ```bash [set-key.sh] # Set your private key (funded on Tempo testnet) -$ export TEMPOCTL_PRIVATE_KEY="0x..." +$ export PRESTO_PRIVATE_KEY="0x..." # Make paid requests -$ tempoctl query https://mpp.tempo.xyz/api/ping/paid +$ presto query https://mpp.tempo.xyz/api/ping/paid ``` :::tip[Get testnet funds] @@ -41,91 +41,91 @@ The demo server runs on Tempo testnet. Fund your wallet at [faucet.tempo.xyz](ht ```bash [basic-requests.sh] # Make a payment request -$ tempoctl query https://mpp.tempo.xyz/api/ping/paid +$ presto query https://mpp.tempo.xyz/api/ping/paid # Verbose output with headers -$ tempoctl query -vi https://mpp.tempo.xyz/api/ping/paid +$ presto query -vi https://mpp.tempo.xyz/api/ping/paid # Save output to file -$ tempoctl query -o output.json https://mpp.tempo.xyz/api/ping/paid +$ presto query -o output.json https://mpp.tempo.xyz/api/ping/paid # JSON output format -$ tempoctl query --json-output https://mpp.tempo.xyz/api/ping/paid +$ presto query --json-output https://mpp.tempo.xyz/api/ping/paid ``` ## Payment controls ```bash [payment-controls.sh] # Preview payment without executing (dry run) -$ tempoctl query -D https://mpp.tempo.xyz/api/ping/paid +$ presto query -D https://mpp.tempo.xyz/api/ping/paid # Require confirmation before payment -$ tempoctl query -y https://mpp.tempo.xyz/api/ping/paid +$ presto query -y https://mpp.tempo.xyz/api/ping/paid # Set maximum payment amount (in atomic units) -$ tempoctl query -M 10000 https://mpp.tempo.xyz/api/ping/paid +$ presto query -M 10000 https://mpp.tempo.xyz/api/ping/paid # Filter to specific networks -$ tempoctl query -n tempo-moderato https://mpp.tempo.xyz/api/ping/paid +$ presto query -n tempo-moderato https://mpp.tempo.xyz/api/ping/paid ``` ## Wallet management ```bash [wallet-management.sh] # Check wallet balance -$ tempoctl balance +$ presto balance # Check balance on specific network -$ tempoctl balance -n tempo-moderato +$ presto balance -n tempo-moderato # Use specific account by name -$ tempoctl query -a my-wallet https://mpp.tempo.xyz/api/ping/paid +$ presto query -a my-wallet https://mpp.tempo.xyz/api/ping/paid # Use specific sender address -$ tempoctl query --from 0x1234... https://mpp.tempo.xyz/api/ping/paid +$ presto query --from 0x1234... https://mpp.tempo.xyz/api/ping/paid ``` ## Inspecting payments ```bash [inspect-payments.sh] # Inspect payment requirements without paying -$ tempoctl inspect https://mpp.tempo.xyz/api/ping/paid +$ presto inspect https://mpp.tempo.xyz/api/ping/paid # View configuration -$ tempoctl config +$ presto config # View config as JSON -$ tempoctl config --output-format json +$ presto config --output-format json ``` ## HTTP options ```bash [http-options.sh] # Custom headers -$ tempoctl query -H "X-Custom: value" https://mpp.tempo.xyz/api/ping/paid +$ presto query -H "X-Custom: value" https://mpp.tempo.xyz/api/ping/paid # POST with data -$ tempoctl query -X POST -d '{"key": "value"}' https://mpp.tempo.xyz/api/ping/paid +$ presto query -X POST -d '{"key": "value"}' https://mpp.tempo.xyz/api/ping/paid # POST with JSON (sets Content-Type automatically) -$ tempoctl query --json '{"key": "value"}' https://mpp.tempo.xyz/api/ping/paid +$ presto query --json '{"key": "value"}' https://mpp.tempo.xyz/api/ping/paid # Follow redirects -$ tempoctl query -L https://mpp.tempo.xyz/api/ping/paid +$ presto query -L https://mpp.tempo.xyz/api/ping/paid # Set timeout -$ tempoctl query -m 30 https://mpp.tempo.xyz/api/ping/paid +$ presto query -m 30 https://mpp.tempo.xyz/api/ping/paid ``` ## Output control ```bash [output-control.sh] # Quiet mode (suppress non-essential output) -$ tempoctl query -q https://mpp.tempo.xyz/api/ping/paid +$ presto query -q https://mpp.tempo.xyz/api/ping/paid # Show only HTTP headers -$ tempoctl query -I https://mpp.tempo.xyz/api/ping/paid +$ presto query -I https://mpp.tempo.xyz/api/ping/paid # Disable colors -$ tempoctl query --color never https://mpp.tempo.xyz/api/ping/paid +$ presto query --color never https://mpp.tempo.xyz/api/ping/paid ``` diff --git a/src/pages/tools/tempoctl.mdx b/src/pages/tools/tempoctl.mdx deleted file mode 100644 index edcf26a8..00000000 --- a/src/pages/tools/tempoctl.mdx +++ /dev/null @@ -1,95 +0,0 @@ -# tempoctl [wget for payments] - -`tempoctl` is a non-interactive commandline tool for making HTTP requests with automatic payment support. - -When you request a resource that requires payment, `tempoctl` automatically detects the `402` response, fulfills the payment, and retries—all in a single command. - -## Installation - -**Quick install:** - -```bash [install.sh] -$ curl -fsSL https://tempo.xyz/ctl/install.sh | bash -``` - -**From source:** - -```bash [build-from-source.sh] -$ git clone https://github.com/tempoxyz/tempoctl.git -$ cd tempoctl -$ cargo install --path . -``` - -## Quick start - -```bash [quickstart.sh] -# Log in (first time only) -$ tempoctl login - -# Make a paid request -$ tempoctl query https://mpp.tempo.xyz/api/ping/paid -``` - -:::tip[Live demo server] -We host a live demo server at `mpp.tempo.xyz` running on **Tempo testnet**. Use `/api/ping` for free requests and `/api/ping/paid` for paid requests. Get testnet funds at [faucet.tempo.xyz](https://faucet.tempo.xyz). -::: - -## Configuration - -`tempoctl` uses encrypted keystores for secure wallet management. - -### Example config - -```toml -[evm] -keystore = "/Users/you/.tempoctl/keystores/my-wallet.json" - -# Override RPC URLs -[rpc] -tempo = "https://my-private-rpc.com" -``` - -## Key management - -```bash [key-management.sh] -# List all access keys -$ tempoctl keys list - -# Switch to a different access key -$ tempoctl keys switch 1 - -# Delete an access key -$ tempoctl keys delete 2 -``` - -## Command reference - -| Command | Description | -|---------|-------------| -| `tempoctl query ` | Make an HTTP request with automatic payment | -| `tempoctl login` | Log in and set up your wallet | -| `tempoctl logout` | Log out and clear credentials | -| `tempoctl whoami` | Show the current authenticated identity | -| `tempoctl inspect ` | Inspect payment requirements | -| `tempoctl balance` | Check wallet balance | -| `tempoctl config` | View/manage configuration | -| `tempoctl networks` | List supported networks | - -## Learn more - -import { Card, Cards } from 'vocs' - - - - - diff --git a/vocs.config.ts b/vocs.config.ts index 06e174c1..4e9ded74 100644 --- a/vocs.config.ts +++ b/vocs.config.ts @@ -16,9 +16,12 @@ export default defineConfig({ redirects: [ { source: "/docs", destination: "/overview" }, { source: "/specifications", destination: "/specs" }, - { source: "/quickstart/pget", destination: "/quickstart/tempoctl" }, - { source: "/tools/pget", destination: "/tools/tempoctl" }, - { source: "/tools/pget/examples", destination: "/tools/tempoctl/examples" }, + { source: "/quickstart/pget", destination: "/quickstart/presto" }, + { source: "/quickstart/tempoctl", destination: "/quickstart/presto" }, + { source: "/tools/pget", destination: "/tools/presto" }, + { source: "/tools/pget/examples", destination: "/tools/presto/examples" }, + { source: "/tools/tempoctl", destination: "/tools/presto" }, + { source: "/tools/tempoctl/examples", destination: "/tools/presto/examples" }, { source: "/payment-methods/tempo/stream", destination: "/payment-methods/tempo/session", @@ -74,7 +77,7 @@ export default defineConfig({ { text: "Overview", link: "/quickstart" }, { text: "Client", link: "/quickstart/client" }, { text: "Server", link: "/quickstart/server" }, - { text: "tempoctl CLI", link: "/quickstart/tempoctl" }, + { text: "presto CLI", link: "/quickstart/presto" }, ], }, { @@ -403,11 +406,11 @@ export default defineConfig({ ], }, { - text: "tempoctl CLI", - collapsed: true, - items: [ - { text: "Reference", link: "/tools/tempoctl" }, - { text: "Examples", link: "/tools/tempoctl/examples" }, + text: "presto CLI", + collapsed: true, + items: [ + { text: "Reference", link: "/tools/presto" }, + { text: "Examples", link: "/tools/presto/examples" }, ], }, ],