The swiss knife AI toolkit for software development
hexlane is a unified CLI interface for interacting with external systems. It ships with three built-in tools — http (Web APIs), sql (PostgreSQL, MySQL, SQL Server, Oracle), and fs (local filesystem) — and supports custom tools for any other integration target. It is designed to be used by humans and AI agents alike, through the same commands, against the same registered systems.
The core idea is a shared library of named operations: typed, parameterized actions that any caller — human or AI — can discover, run, and extend. An AI agent with terminal access can answer questions and perform tasks expressed in natural language, translating them into hexlane commands. The model reasons; hexlane executes — credential-free from the model's perspective.
Two roles work in concert:
- Developers register integrations, environments, and credentials — defining what systems can be accessed and how authentication works.
- AI agents and humans operate within that perimeter: discovering available operations, composing new ones at runtime via CLI or natural language prompt, and executing them safely with named parameters.
Operations are persistent. Every operation defined — by a human or an agent — becomes a reusable, discoverable building block for future sessions. The agent's operational knowledge compounds over time.
Developers already have tools for talking to APIs and databases. The question is whether those tools work for AI agents too — and whether they do it safely.
| Raw scripts / curl | MCP servers | hexlane | |
|---|---|---|---|
| Discovery | None | Per-server schema | op list across all systems |
| Credentials | Exposed in env vars or shell history | Varies by server | Vault-encrypted, never model-visible |
| Operations | Write a new script each time | Static, defined at server build time | User-defined via CLI or natural language prompt — persist across sessions |
| Reusability | Ephemeral | Hardcoded per server | Operations persist and compound over sessions |
| Setup | Ad-hoc | Server process + client config | One CLI, one YAML per system |
| Human + AI | Human-oriented | Agent-oriented | Both, same interface |
MCP servers and hexlane solve different problems and work well together. MCP is a protocol for exposing tools to models; hexlane is a runtime that gives those tools a secure, discoverable, and extensible way to interact with your actual systems.
Standard tool use is stateless — the agent figures out how to call a system, does it once, and forgets. hexlane changes that.
Operational memory. Every op add — whether typed by a developer or generated by an agent from a natural language prompt — writes a named, typed, validated operation into the integration. That operation is immediately available via op list and op show in every future session. The agent doesn't re-discover, re-authenticate, or re-invent. It builds on what came before.
Credential isolation. The agent never sees tokens, passwords, or connection strings. It only sees the output of the operations it runs — API responses and query results. Credentials are acquired, cached, and renewed automatically by hexlane's vault.
Structured output. The --machine flag returns TOON-formatted output designed for model consumption — structured, predictable, easy to parse and reason over.
Cross-system reasoning. Because hexlane unifies HTTP and SQL under the same interface, an agent can query a database and call an API in the same workflow, correlate the results, and surface inconsistencies — without writing any glue code.
When hexlane is available to an AI agent, natural language requests become executable workflows across multiple systems — no glue code, no credential handling, no one-off scripts.
Example 1 — Cross-system investigation
"Use hexlane to pull the transaction record for TXN-9921 from the database and check its current status on the payments API — I want to know if the two are consistent."
The agent queries the transactions database for the raw record, calls the payments API with the same transaction ID, and compares the state reported by each system — flagging any discrepancy between them.
Example 2 — Cross-referencing data across services
"Use hexlane to get all orders placed in the last 7 days with status failed, then for each one fetch the customer's name and contact email from the customers API and give me a single joined view."
The agent queries the orders database filtered by date and status, then calls the customers API once per result to fetch the profile. It returns a correlated table — no manual joins, no credential handling.
Example 3 — Detecting inconsistencies between systems
"Use hexlane to find all subscription plans marked as inactive in our database that are still showing as available in the billing API — I suspect there's a sync problem."
The agent queries the database for inactive plans, calls the billing API for each to check visibility, and produces a list of entries that are out of sync across both systems — giving the human a concrete starting point to investigate.
Credentials are never visible to the AI model or stored in plain text. The vault is the only place secrets live.
- All credentials (tokens, DB passwords) are encrypted with AES-256-GCM and stored in
~/.hexlane/vault/on the local machine - The encryption key is derived from a passphrase using scrypt (CPU/memory-hard KDF) — the passphrase itself is never written to disk
- The passphrase is stored in the OS secret store after first use: macOS Keychain, Windows Credential Manager, or Linux libsecret (GNOME Keyring / KWallet). In CI or headless environments, set
HEXLANE_VAULT_PASSPHRASEas an environment variable - When an AI model invokes hexlane, it only sees operation output (API responses, query rows) — never the credentials used to obtain them
- Audit logs record every credential acquisition and API/DB call (credential IDs only, no secret values)
- Node.js 20+
git clone https://github.com/filipeesch/hexlane
cd hexlane
npm install
npm link # installs the `hexlane` binary globally via npm linkThe fastest way to try hexlane is with the GitHub example — it uses public endpoints, so no credentials or setup are needed.
# 1. Initialize hexlane (run once — sets up local storage and vault passphrase)
hexlane init
# 2. Register the GitHub integration
hexlane integration add --file examples/github.yaml
# 3. See what operations are available
hexlane op list
# 4. Preview a request before running it
hexlane op run github/get-user --param username=torvalds --dry-run
# 5. Run it
hexlane op run github/get-user --param username=torvalds
# 6. Use filters — list open issues, 10 per page
hexlane op run github/list-issues \
--param owner=torvalds --param repo=linux \
--param state=open --param perPage=10No vault passphrase, no credential set, no token needed — the public credential kind bypasses auth entirely.
| Feature | Description |
|---|---|
| Built-in tools | http for Web APIs, sql for relational databases (PostgreSQL, MySQL, SQL Server, Oracle), fs for local filesystems — plus support for custom tools |
| Named operations | Typed, parameterized actions — discovered and run by humans and AI agents alike via op list / op run |
| Runtime op authoring | New operations created at any time via op add or natural language prompt; immediately persistent and discoverable |
| Integration-based architecture | One YAML file groups targets and operations for an external system; register with integration add |
| Template engine | Path, query, headers, and body rendered from declared parameters using {{ name }} syntax |
| Multi-engine SQL | PostgreSQL, MySQL, SQL Server, Oracle; injection-safe :name parameter binding |
| Pluggable credential acquisition | http, shell, static strategies; bearer, header, query_param auth injection |
| Automatic renewal | Credentials cached in the vault, proactively renewed before expiry via renewal_policy |
| Public targets | credential.kind: public bypasses the vault entirely for open APIs — no setup required |
| AES-256-GCM vault | All secrets encrypted at rest; passphrase managed by OS keychain |
| Credential isolation | The AI model only sees operation output — never tokens, passwords, or connection strings |
| Structured audit log | Every credential acquisition and HTTP/SQL call recorded (credential IDs only, no secret values) |
| AI-optimised output | --machine flag returns TOON-formatted output designed for model consumption |
Tip — editor integration: See examples/hexlane.instructions.md for a ready-to-use instruction snippet that tells your AI assistant to reach for hexlane automatically instead of suggesting raw curl or ad-hoc scripts.
See examples/github.yaml for a fully working integration file using public GitHub endpoints.
| Topic | Description |
|---|---|
| Operations | Define, discover, and run named operations; template syntax; AI tips |
| Credentials | Credential lifecycle, static tokens, static DB connections, vault architecture |
| Integration Config | Integration YAML reference — targets, credential kinds, strategies, auth injection |
| HTTP | Ad-hoc http call reference |
| SQL | Ad-hoc sql query reference |
| File System | fs tool — read, write, search, rollback against a directory target |