Token导航 LogoToken导航TokenDH.com
前端设计敏感数据github未标认证来源可访问许可证需确认审计提醒

outportoutport 命令行

Agent Skill

outport 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

749

周安装

30

GitHub Stars

3

下载量

242
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:outport(outport 命令行)
来源仓库:https://github.com/steveclarke/outport
仓库路径:skills/outport
安装命令:
npx skills add https://github.com/steveclarke/outport --skill outport
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/steveclarke/outport --skill outport

简介

outport 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中围绕仓库状态或代码变更进行整理。
  • 通过 npx skills add 命令从指定 GitHub 仓库安装。
  • 使用前需确认权限范围、维护状态及是否触发联网或文件操作。
  • 建议结合原始 README 核验具体用法和功能边界。

SKILL.md

Outport — Dev Port Manager

Outport allocates deterministic, non-conflicting ports for dev services, assigns .test hostnames, and writes everything to .env files. Every framework reads .env — Rails, Nuxt, Django, Docker Compose — so ports and URLs just work without manual configuration.

Quick Reference

# Project commands
outport init              # Create outport.yml (interactive)
outport up                # Allocate ports, assign hostnames, write .env
outport up --force        # Clear and re-allocate all ports from scratch
outport down              # Remove ports and clean .env files

# Inspect & diagnose
outport status            # Show project status (ports, health, URLs)
outport status --computed # Include computed values
outport ports             # Show ports with live process info (PID, memory, uptime)
outport ports --all       # Full machine scan (Outport + non-Outport ports)
outport ports --down      # Include ports with no running process
outport ports kill <svc>  # Kill process by service name or port number
outport ports kill --orphans  # Kill all orphaned dev processes
outport open              # Open HTTP services in browser
outport open web          # Open a specific service
outport share             # Tunnel HTTP services to public URLs
outport share web         # Tunnel a specific service
outport qr                # Show QR codes for mobile device access
outport qr --tunnel       # Show QR codes with tunnel URLs
outport doctor            # Check system health and project config

# System commands (machine-wide)
outport system start      # Install DNS, CA, and start the daemon
outport system stop       # Stop the daemon
outport system restart    # Re-write plist and restart the daemon
outport system status     # Show all registered projects
outport system status --check  # Show with health checks (up/down)
outport system prune      # Remove stale registry entries
outport system uninstall  # Remove DNS resolver, daemon, and CA

# Instance management
outport rename <old> <new>  # Rename the current instance
outport promote             # Promote the current instance to main

All commands support --json for machine-readable output.

Setting Up a New Project

1. Create outport.yml

Run outport init for interactive setup, or create manually:

name: my-project
services:
  web:
    env_var: PORT
  postgres:
    env_var: DB_PORT
  redis:
    env_var: REDIS_PORT

2. Run outport up

Allocates deterministic ports (hashed from project name + service name) and writes them to .env. Same inputs always produce the same ports.

3. Wire up your project to read from .env

Most frameworks read .env natively or with minimal setup:

  • Docker Compose — reads .env automatically. Use ${DB_PORT:-5432} in compose.yml
  • Rails — use dotenv-rails gem, or reference env vars in config: port: ENV.fetch("DB_PORT", 5432)
  • Nuxt — reads .env natively. Runtime config values can be overridden via NUXT_* env vars
  • Foreman — reads .env automatically
  • Overmind — does NOT auto-load .env. Source it in your start script: if [-f.env]; then set -a; source.env; set +a; fi

4. Commit outport.yml, gitignore .env

outport.yml is project config — commit it so worktrees and teammates inherit it. .env contains allocated ports — gitignore it. Each checkout gets its own.

.test Domains (DNS Proxying)

Running outport system start once enables friendly .test hostnames for your services. After setup, https://myapp.test routes to your app instead of http://localhost:24920.

How it works

outport system start installs three components (requires sudo for DNS and CA trust):

  1. DNS resolver — configures your OS to send *.test queries to a local DNS server on port 15353, which resolves all *.test names to 127.0.0.1. On macOS this is /etc/resolver/test; on Linux it's a systemd-resolved drop-in config.
  2. Reverse proxy — a daemon runs on ports 80 and 443, routes requests by Host header to the correct service port, and auto-updates when you run outport up. WebSocket connections are proxied transparently. Managed by launchd on macOS, systemd on Linux.
  3. Local CA — generates a Certificate Authority for HTTPS. HTTP requests on port 80 are redirected to HTTPS via 307.
outport system start      # Install DNS + CA + daemon (one-time, prompts for sudo)
outport system stop       # Stop the daemon
outport system restart    # Re-write plist and restart the daemon
outport system uninstall  # Remove everything — reverse of start

Configuring.test hostnames

Add hostname to a service to assign it a .test URL:

name: myapp
services:
  web:
    env_var: PORT
    hostname: myapp.test       # → https://myapp.test
  postgres:
    env_var: DB_PORT           # no hostname: port allocation only

Hostname rules:

  • Must include the project name (e.g., myapp.test, app.myapp.test)
  • Non-main instances get the instance code appended automatically (see Multiple Instances)

Cookie isolation

Each instance gets its own .test hostname, so browser cookies and sessions are isolated automatically — no incognito windows needed:

myapp [main]   web → 24920   http://myapp.test
myapp [bkrm]   web → 28104   http://myapp-bkrm.test

Config Reference

Project-Level Fields

FieldRequiredDescription
nameyesProject identifier. Used for port allocation and hostname generation.
opennoList of service names that outport open opens by default. When omitted, opens all services with a hostname.

Service Fields

FieldRequiredDescription
env_varyesEnvironment variable name written to .env
hostnameno.test hostname for this service (e.g., myapp.test). Implies HTTP. Non-main instances get the instance code appended.
aliasesnoNamed alternative hostnames (map of label → hostname). Each alias routes to the same port. Requires hostname.
subdomainsnoEnable wildcard subdomain routing (*.myapp.test). All subdomains route to the same port. Requires hostname.
preferred_portnoPort to try first. Falls back to hash-based allocation if already in use
env_filenoWhere to write. String or array. Defaults to .env in project root

Writing to Multiple .env Files

For monorepos, a port often needs to appear in multiple .env files. Use an array for env_file:

services:
  rails:
    env_var: RAILS_PORT
    env_file:
      - backend/.env
      - frontend/.env          # Frontend needs this to construct API URLs

Computed Values

Applications don't just need port numbers — they need URLs. Computed values compute environment variables from your service map and write finished values to .env.

Basic syntax

computed:
  API_URL:
    value: "${rails.url:direct}/api/v1"   # http://localhost:24920/api/v1
    env_file: frontend/.env
  CORS_ORIGINS:
    value: "${web.url}"                   # http://myapp.test (or localhost:PORT)
    env_file: backend/.env
  • ${service_name.field} references service fields
  • env_file is required (no default — you must be explicit)
  • Computed names must not collide with service env_var names

Template Fields

TemplateResolves toUse case
${rails.port}24920Raw port number
${rails.hostname}myapp.test (or localhost if no hostname set)Hostname only
${rails.url}http://myapp.testBrowser-facing URLs (CORS, asset hosts), routed via proxy
${rails.url:direct}http://localhost:24920Server-to-server calls that bypass the proxy
${rails.env_var}PORTEnv var name for the service
${rails.alias.NAME}app.myapp.testAlias hostname by label
${rails.alias_url.NAME}https://app.myapp.testAlias URL by label

When to use url vs url:direct:

  • ${service.url} — for values the browser sends (CORS origins, asset hosts, OAuth redirect URIs). Uses the .test hostname when configured.
  • ${service.url:direct} — for server-to-server calls (API base URLs a backend fetches, WebSocket connections from a Node server). Always uses localhost — no proxy hop.

Standalone variables and bash-style parameter expansion

Computed values support standalone variables and bash-style parameter expansion for instance-aware configuration:

VariableMain instanceWorktree instance (e.g., bxcf)
${project_name}myappmyapp
${instance}*(empty string)*bxcf
${instance:-default}defaultbxcf
${instance:+replacement}*(empty string)*replacement
${instance:+-${instance}}*(empty string)*-bxcf

Common pattern — Docker Compose project name:

computed:
  COMPOSE_PROJECT_NAME:
    value: "${project_name}${instance:+-${instance}}"
    env_file: .env

This produces myapp for the main instance and myapp-bxcf for worktrees, giving each instance isolated Docker containers.

Per-file value overrides

When the same env var needs different values in different files (common in monorepos where multiple apps share a framework convention), use the object syntax for env_file entries:

computed:
  NUXT_API_BASE_URL:
    env_file:
      - file: frontend/apps/main/.env
        value: "${rails.url:direct}/api/v1"
      - file: frontend/apps/portal/.env
        value: "${rails.url:direct}/portal/api/v1"

You can mix plain string entries (which use the top-level value) with object entries in the same list.

Real-world monorepo example

Rails backend with two Nuxt frontends. Backend needs CORS origins from frontend .test URLs. Frontends need the Rails API URL for server-side fetches:

name: myapp
services:
  rails:
    env_var: RAILS_PORT
    hostname: myapp.test
    env_file: backend/.env
  frontend_main:
    env_var: MAIN_PORT
    hostname: app.myapp.test
    env_file:
      - frontend/apps/main/.env
      - backend/.env               # Backend needs this for CORS
  frontend_portal:
    env_var: PORTAL_PORT
    hostname: portal.myapp.test
    env_file:
      - frontend/apps/portal/.env
      - backend/.env               # Backend needs this for CORS

computed:
  # Server-to-server API URLs (bypass proxy — use direct localhost)
  NUXT_API_BASE_URL:
    env_file:
      - file: frontend/apps/main/.env
        value: "${rails.url:direct}/api/v1"
      - file: frontend/apps/portal/.env
        value: "${rails.url:direct}/portal/api/v1"

  # Backend CORS (browser-facing — use .test hostnames)
  CORE_CORS_ORIGINS:
    value: "${frontend_main.url},${frontend_portal.url}"
    env_file: backend/.env

  # Backend asset host (browser-facing)
  SHRINE_ASSET_HOST:
    value: "${rails.url}"
    env_file: backend/.env

After outport up, every service has the right ports AND the right URLs. No hardcoded values survive.

Framework Env Var Conventions

When setting up computed values, knowing how frameworks map env vars to config is essential:

FrameworkConventionExample
NuxtNUXT_ prefix maps to runtimeConfigNUXT_API_BASE_URL overrides runtimeConfig.apiBaseUrl
Rails (AnyWayConfig)PREFIX_ATTR maps to config classCORE_CORS_ORIGINS overrides CoreConfig.cors_origins
Rails (Shrine)Same AnyWayConfig patternSHRINE_ASSET_HOST overrides ShrineConfig.asset_host
DjangoTypically reads os.environ directlyName vars however your settings.py expects
Docker ComposeReads .env automatically${DB_PORT:-5432} in compose.yml

The computed values feature is most powerful when it writes env vars that match these framework conventions — the framework reads the value natively and no config code changes are needed.

.env File Format

Outport writes managed variables in a fenced block at the bottom of each .env file:

# Your own variables — Outport never touches these
SECRET_KEY=abc123
RAILS_ENV=development

# --- begin outport.dev ---
DB_PORT=21536
RAILS_PORT=24920
NUXT_API_BASE_URL=http://localhost:24920/api/v1
# --- end outport.dev ---

On each outport up, the fenced block is replaced with current values. Variables removed from outport.yml disappear from the block. Everything outside the block is preserved.

Multiple Instances

Outport detects git worktrees automatically. Each worktree gets unique ports and its own .test hostname — no configuration needed:

# Main checkout
$ outport up
my-app [main]
  rails  RAILS_PORT → 24920  http://my-app.test
  web    MAIN_PORT  → 21349

# Worktree — different ports, different hostname, zero conflicts
$ cd ../my-app-feature && outport up
  Registered as my-app-bkrm. Use 'outport rename bkrm <name>' to rename.
my-app [bkrm]
  rails  RAILS_PORT → 20192  http://my-app-bkrm.test
  web    MAIN_PORT  → 21133

Computed values are recomputed per instance — CORS origins, API URLs, and all other computed values automatically use that instance's ports and hostnames. Two full instances run simultaneously with no port collisions, no hostname collisions, and no manual configuration.

Manage instances with:

outport rename bkrm my-feature   # Rename an instance
outport promote                   # Promote current instance to main

Integrating with Setup Scripts

Run outport up early in your project's setup flow — after .env file creation but before services start. Make it optional so developers without Outport aren't blocked:

# In bin/setup or similar
if command -v outport > /dev/null 2>&1; then
  outport up
else
  echo "Outport not found — using default ports"
  echo "Install: brew install steveclarke/tap/outport"
fi

Common Tasks

Port conflict with another project

Run outport up in both projects. Outport's registry ensures no collisions across all registered projects.

Ports are stale from an old allocation

Run outport up --force to clear and re-allocate.

Freeing ports from a project you're done with

Run outport down to remove from registry and free all ports.

Adding a new service to an existing project

Add it to outport.yml and run outport up. Existing allocations are preserved — only the new service gets a port.

Agent needs to know the project's URLs

Run outport status --json for structured output with ports, health, and URLs.

Services moved to different ports than expected

Check outport system status to see all allocations. If another project holds the ports you want, run outport down in it first, then outport up --force in yours.

Accessing dev services from a phone

Run outport qr to display a QR code encoding the LAN URL for each HTTP service. Scan with your phone on the same Wi-Fi to open the app. Use outport qr --tunnel while outport share is running to get a QR for the public tunnel URL instead. QR codes are also available in the dashboard at outport.test.

Sharing a service with someone outside your network

Run outport share to tunnel all HTTP services to public Cloudflare URLs. Requires cloudflared (brew install cloudflared). Press Ctrl+C to stop.

Something isn't working

Run outport doctor to check DNS, daemon, certificates, registry, and project config. Each check shows pass/fail with a fix suggestion.

.test domain not resolving

Run outport doctor to diagnose. Common causes: daemon not running (outport system start) or DNS resolver missing (outport system start).

Bugs & Feature Requests

Report bugs or request new features at https://github.com/steveclarke/outport/issues

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

38.42%
按下载量换算93

Claude

30.9%
按下载量换算75

Cursor

20.03%
按下载量换算48

Gemini CLI

8.59%
按下载量换算21

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills