multiAI Summary Pending

tauri-app-localhost

Serve your Tauri v2 frontend via a localhost server using the localhost plugin for frameworks requiring a server. Use when your frontend framework needs a local HTTP server, separating dev/production localhost behavior, or controlling port exposure.

223 stars

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/tauri-app-localhost/SKILL.md --create-dirs "https://raw.githubusercontent.com/partme-ai/full-stack-skills/main/skills/tauri-skills/tauri-app-localhost/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/tauri-app-localhost/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How tauri-app-localhost Compares

Feature / Agenttauri-app-localhostStandard Approach
Platform SupportmultiLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Serve your Tauri v2 frontend via a localhost server using the localhost plugin for frameworks requiring a server. Use when your frontend framework needs a local HTTP server, separating dev/production localhost behavior, or controlling port exposure.

Which AI agents support this skill?

This skill is compatible with multi.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

## When to use this skill

**ALWAYS use this skill when the user mentions:**
- Serving frontend via localhost in a Tauri app
- Local server exposure and port configuration
- Dev vs production localhost behavior differences

**Trigger phrases include:**
- "localhost", "local server", "localhost plugin", "port", "serve frontend"

## How to use this skill

1. **Install the localhost plugin**:
   ```bash
   cargo add tauri-plugin-localhost
   ```
2. **Register the plugin** with a specific port in your Tauri builder:
   ```rust
   tauri::Builder::default()
       .plugin(tauri_plugin_localhost::Builder::new(3030).build())
   ```
3. **Configure the frontend URL** in `tauri.conf.json` for production:
   ```json
   { "build": { "frontendDist": "../dist" } }
   ```
4. **Bind only to 127.0.0.1** to prevent external access to the local server
5. **Separate dev-mode access** (Vite dev server on port 5173) from production (localhost plugin on a fixed port)
6. **Audit access patterns** to ensure minimal exposure in production builds

## Outputs

- Localhost plugin configuration with fixed port
- Dev vs production server separation
- Security checklist for minimal exposure

## References

- https://v2.tauri.app/plugin/localhost/

## Keywords

tauri localhost, local server, port, serve frontend, dev server