Yaak API Client
repository·main·Indexed 12 days ago
https://github.com/mountain-loop/yaakA high-performance, privacy-focused desktop API client for REST, GraphQL, gRPC, WebSockets, and SSE. It features offline-first workflows, local secret storage, and a CLI for automation and agentic workflows. Includes support for plugin development, dynamic data generation via FakerJS, and an MCP server for integration with Claude Desktop.
What's inside Yaak
- Yaak is a fast, privacy-first, offline-first desktop API client built using Tauri, Rust, and React. It is designed to support a wide range of protocols and provides tools for organizing and securing API development without cloud lock-in or telemetry.
Features of the Yaak HTTP Snippet Plugin
mainThe HTTP Snippet Plugin provides several advanced capabilities for generating accurate code:
- Template Variable Rendering: It renders template variables before generating snippets, ensuring the output reflects real values.
- Body Type Support: Supports JSON,
form-urlencoded,multipart,GraphQL, andraw textbodies. - Authentication Inclusion: Automatically includes authentication headers such as
Basic,Bearer, andAPI Key. - Parameter Inclusion: Includes query parameters and custom headers in the generated code.
Use the Bearer Token Authentication Plugin
mainThe Bearer Token authentication plugin implements RFC 6750 to enable secure API access using tokens, API keys, or other bearer credentials. It automatically adds theAuthorizationheader to your requests in the format:Authorization: <Prefix> <Token>.How JWT Authentication works in Yaak
mainThe JWT plugin manages the lifecycle of a JSON Web Token (RFC 7519) to facilitate secure API communication.
The Token Structure:
- Header: Specifies the token type and the signing algorithm used.
- Payload: Contains the claims (data such as user identity, permissions, or expiration timestamps).
- Signature: A cryptographic hash that ensures the token has not been tampered with.
The Request Flow: When a request is made, the plugin uses your configured algorithm, secret/key, and claims to generate a signed token. This token is then automatically injected into the
Authorizationheader using theBearerscheme.Extending Yaak with Plugins and Templates
mainUsers can customize the Yaak experience through:
- Template Tags: Insert dynamic values such as UUIDs or timestamps into requests.
- Custom Themes: Choose from built-in themes or create your own.
- Plugin System: Create plugins to extend authentication logic, template tags, or the user interface.
Supported OAuth 2.0 Grant Types
mainThe OAuth 2.0 plugin supports four primary grant types. Choose the one that matches your API provider's security model:
- Authorization Code Flow: The most secure and common flow for web applications. Supports optional PKCE (Proof Key for Code Exchange) and automatic token refresh.
- Client Credentials Flow: Used for server-to-server authentication where no user interaction is required.
- Implicit Flow: A legacy flow for single-page applications. It provides direct access token retrieval but does not support refresh tokens.
- Resource Owner Password Credentials Flow: Direct username/password exchange. Use this only with trusted applications. Supports automatic token refresh.
Organizing and Collaborating with Workspaces
mainYaak allows for structured API management through the following features:
- Workspaces: Group requests into workspaces and nested folders.
- Environments: Use environment variables to switch between different stages like
dev,staging, andprod. - Filesystem Mirroring: Mirror workspaces to your local filesystem, enabling version control via Git or synchronization with services like Dropbox.
Supported API Protocols and Features
mainYaak supports multiple communication protocols and data inspection methods:
Supported Protocols:
- REST
- GraphQL
- gRPC
- WebSocket
- Server-Sent Events (SSE)
Key Capabilities:
- Importing: Import existing collections from Postman, Insomnia, OpenAPI, Swagger, or Curl.
- Inspection: Filter and inspect API responses using JSONPath or XPath.
Security and Authentication in Yaak
mainYaak provides several mechanisms to handle sensitive data and authentication:
- Authentication Methods: Supports OAuth 2.0, JWT, Basic Auth, and custom plugins.
- Secret Management: Secure sensitive values using encrypted secrets.
- OS Integration: Stores secrets directly in your operating system's keychain.
JSONPath syntax for filtering and navigation
mainJSONPath uses a dot-notation syntax to navigate and query JSON structures. Use these operators to build your expressions:
$: The root element..: Child element navigation...: Recursive descent (searches through all levels of the hierarchy).*: Wildcard (matches any element).[]: Array indexing, slicing, or filtering.?(): Filter expression (used within brackets to apply logic).
Yaak CLI Syntax and Agent Hints
mainWhen using the CLI, especially within automated scripts or agentic workflows, note the following syntax rules:
- Template Variables: Use
${[ my_var ]}syntax. Note that{{ ... }}is not supported. - Template Functions: Use
${[ namespace.my_func(a='aaa',b='bbb') ]}. - Schema Inspection: Before creating or updating data, inspect the model's JSON Schema using
yaak request schema <model>(e.g.,yaak request schema http). - Non-interactive Deletion: Deletion commands require confirmation. Use the
--yesflag to bypass confirmation in non-interactive environments.
- Template Variables: Use
How AWS Signature Version 4 works
mainSigV4 signs requests by creating a hash of key request components—including the HTTP method, URL, headers, and optionally the payload—using your AWS credentials. The resulting HMAC signature is then injected into the
Authorizationheader along with credential scope metadata.Every request signed via this method must include a timestamp in the
X-Amz-Dateheader. If using temporary credentials, a session token must also be included.Authorization: AWS4-HMAC-SHA256 Credential=AKIA…/20251011/us-east-1/s3/aws4_request, SignedHeaders=host;x-amz-date, Signature=abcdef123456…