← Back to Blog

From クリップボード to API: 4 Developer Workflows You Can Automate on Mac

Developers copy structured input all day: JSON payloads, stack traces, trace IDs, commit hashes, and test events. Most of it is headed somewhere else—a local API, webhook, issue tracker, or observability service. L2Cache Custom Actions turn that repeated copy-switch-paste sequence into a deliberate, one-click workflow.

A Custom Action receives the selected clip through standard input, runs a user-configured command locally, and places successful standard output back on the clipboard. The command can stay entirely on the Mac, contact a localhost service, or intentionally call an external endpoint.

L2Cache does not send clipboard content to a cloud LLM by default. Built-in AI uses Apple インテリジェンス or local Ollama. Content leaves the Mac only when a user creates and invokes a Custom Action that calls an external service.

selected clip → stdin → user-configured command → stdout → clipboard

These are user-invoked actions—not background triggers, scheduled jobs, or commands that silently run on everything you copy. For configuration instructions and smaller transformation recipes, see the complete Custom Actions guide.

Why the clipboard works as automation input

The clipboard already connects the IDE, browser, terminal, log viewer, database client, and internal tools you use every day. A scriptable action makes that temporary data useful without requiring a bespoke integration for every application.

Because actions can be scoped to content types, a JSON request action can appear for JSON clips while a trace lookup appears only where it is relevant. The action receives the original text through stdin, avoiding the need to interpolate arbitrary copied content into executable shell syntax.

Workflow 1: Replay copied JSON against a local API

A request fails in staging. Copy the JSON payload from a log, select it in L2Cache, and invoke a “POST to Local API” action. The development server response becomes the new clipboard value, ready to inspect or paste into a test.

curl \
  --fail-with-body \
  --silent \
  --show-error \
  --connect-timeout 3 \
  --max-time 15 \
  -H "Content-Type: application/json" \
  --data-binary @- \
  http://localhost:3000/api/orders

--data-binary @- reads the request body directly from standard input. The connection and total timeouts prevent an unavailable development service from holding the action indefinitely, while --fail-with-body keeps useful API error output.

The same pattern can exercise a local GraphQL endpoint, webhook receiver, schema validator, mock server, or project-specific transformation service. Because this example targets localhost, it does not transmit the payload to a cloud service.

Workflow 2: Submit a deliberate test event to a webhook

Copy a JSON fixture, wrap it in your team’s event envelope with jq, and submit it to a development event endpoint:

jq -c '{
  source: "l2cache-custom-action",
  event: "developer.test",
  payload: .
}' |
curl \
  --fail-with-body \
  --silent \
  --show-error \
  --connect-timeout 5 \
  --max-time 20 \
  -H "Content-Type: application/json" \
  --data-binary @- \
  https://events.example.com/development

This general pattern can call a webhook receiver, staging analytics collector, deployment-marker endpoint, incident timeline, or an HTTP bridge for an event platform. L2Cache does not claim native integrations with those systems—the Custom Action invokes the API or installed CLI you configure.

Data boundary: This command transmits the selected clip because it calls an external URL. Replace the fictional endpoint with an authorized development destination, and review that service’s access controls, retention, and privacy policy before invoking the action.

Do not embed bearer tokens in the saved action. Prefer an already authenticated provider CLI, a Keychain-backed helper, or your organization’s approved secret-management workflow.

Workflow 3: Turn a copied error into a GitHub issue

Copy a sanitized stack trace or failed-test report, then invoke an action backed by the authenticated GitHub CLI:

gh issue create \
  --title "Bug report from clipboard" \
  --body-file -

--body-file - tells gh to read the issue body from standard input. Authentication and repository selection stay with the GitHub CLI instead of being embedded in the Custom Action. On success, the created issue URL is command output and becomes available on the clipboard.

Teams can extend this with issue templates, labels, or a small local script that derives a title from the first line. The same architecture can invoke an authorized Jira, Linear, or internal issue-tracker API, but the user remains responsible for that service’s command, credentials, and permissions.

Before submitting: Check stack traces and logs for tokens, customer data, internal hostnames, and proprietary source. Sensitive clip types do not expose Custom Actions in L2Cache, but users should still review any content deliberately sent to an external system.

Workflow 4: Look up a copied trace ID

Copy a trace or request identifier from an error and query a development observability endpoint. The matching JSON response returns to the clipboard for a ticket, terminal session, or debugging note.

curl \
  --fail-with-body \
  --silent \
  --show-error \
  --connect-timeout 5 \
  --max-time 15 \
  --get \
  --data-urlencode "trace_id@-" \
  https://observability.example.com/api/development/traces

--data-urlencode "trace_id@-" reads and URL-encodes the identifier from standard input. Similar read-only actions can look up a build ID, commit SHA, service owner, deployment version, pull-request checks, or feature-flag state.

Use development endpoints in public examples and retain normal authorization and approval controls for production systems. A clipboard action should reduce navigation—not bypass operational safeguards.

Optional AI is another destination, not the default

The same pattern can send selected code or logs to local Ollama or, when a user intentionally configures it, a cloud LLM endpoint. Possible uses include explaining a stack trace, drafting tests, reviewing a SQL query, or converting JSON into a typed model.

Cloud AI is not required for Custom Actions, and L2Cache does not send clipboard content to a cloud LLM by default. An external AI provider receives content only when the user creates and invokes a command that calls it. For the built-in local model options, see Apple インテリジェンス and local Ollama in L2Cache.

Local and external actions have different boundaries

DestinationDoes content leave the Mac?Example
Local shell toolNojq, Ruby, or an internal CLI
Localhost serviceNo cloud transmissionDevelopment API on localhost
External API or webhookYes, when invokedTest event or observability endpoint
Cloud LLMYes, when explicitly configured and invokedA provider selected by the user

“The command executes locally” does not mean “the data always stays local.” Network behavior is determined by the command the user writes. See the L2Cache privacy policy for the application’s default data practices.

Build safer Custom Actions

For command details, consult the primary documentation for curl, jq, and GitHub CLI issue creation.

よくある質問

Can L2Cache Custom Actions call any HTTP API?

A Custom Action can run a shell command, including curl or an installed CLI, so it can contact an HTTP endpoint that the Mac and configured credentials can access. L2Cache does not provide a native integration for every service; the user defines the command.

Does L2Cache automatically send clipboard content to the cloud?

No. L2Cache does not send clipboard content to a cloud LLM by default. A selected clip leaves the Mac only when the user deliberately creates and invokes a Custom Action that contacts an external endpoint.

Can I test a localhost API without sending data to the cloud?

Yes. A curl action targeting localhost can send copied request data to a development service running on the same Mac and return the response to the clipboard.

Are Custom Actions automatic triggers?

No. They are user-configured, user-invoked actions. They do not silently run for every clipboard change or on a schedule.

Where should API keys be stored?

Do not hardcode secrets in a saved command. Prefer an authenticated vendor CLI, a Keychain-backed helper, or your organization’s approved secret-management workflow with least-privilege credentials.

Can a Custom Action invoke a cloud LLM?

Yes, when the user deliberately configures a command for that provider and invokes it. The service then receives the selected content under its own privacy and retention terms. Local Ollama is available for workflows that should stay on the Mac.

Turn repeated clipboard steps into one deliberate action

Keep local workflows local, or connect selected clips to the development tools and endpoints you choose. Explore more in the developer clipboard guide.

L2Cacheをダウンロード for Mac