Skip to content
Skillv1.0.0

flyio-install-auth

Install flyctl CLI and configure Fly.io authentication with API tokens. Use when setting up a new Fly.io project, configuring deploy tokens, or initializing the Machines API for edge compute deploymen

by jeremylongshore(0) 0 installs
Free
Sign in to install

Free account. Installing gives you the manifest plus copy-paste snippets.

See reviews

About

Imported from jeremylongshore/tons-of-skills-marketplace (skills/.curated/flyio-install-auth/SKILL.md). Install upstream with npx skills add jeremylongshore/tons-of-skills-marketplace --skill flyio-install-auth. Copyright stays with the author (MIT).

Fly.io Install & Auth

Overview

Install flyctl CLI and configure authentication for Fly.io edge compute platform. Two auth methods: interactive login (opens browser) and API tokens (CI/CD and Machines API). The Machines API base URL is https://api.machines.dev.

Output

Record the authentication method, secret-manager reference, minimum scope, validation time, owner, and rotation/revocation procedure. Never put a token, header, machine response, or organization data in the receipt.

Examples

Use an app-scoped staging deploy token injected by the CI environment, verify a read-only status check, then revoke it and confirm it can no longer access the app. Keep only redacted evidence of the scope and result.

Prerequisites

  • Fly.io account at fly.io
  • macOS, Linux, or WSL2

Instructions

Step 1: Install flyctl

# macOS / Linux
curl -L https://fly.io/install.sh | sh

# Or via Homebrew
brew install flyctl

# Verify
fly version

Step 2: Authenticate

# Interactive login (opens browser)
fly auth login

# Or with token (CI/CD)
fly auth token  # Get current token
export FLY_API_TOKEN="fo1_your_token_here"

# Verify auth
fly auth whoami

Step 3: Create API Token for Machines API

# Create deploy token (scoped to an app)
fly tokens create deploy -a my-app

# Create org-level token
fly tokens create org

# Use with Machines API
curl -s -H "Authorization: Bearer $FLY_API_TOKEN" \
  https://api.machines.dev/v1/apps | jq '.[].name'

Step 4: Verify Machines API Access

const FLY_API = 'https://api.machines.dev';

async function verifyFlyAccess() {
  const res = await fetch(`${FLY_API}/v1/apps`, {
    headers: { 'Authorization': `Bearer ${process.env.FLY_API_TOKEN}` },
  });
  const apps = await res.json();
  console.log(`Connected. Found ${apps.length} apps.`);
  apps.forEach((app: any) => console.log(`  ${app.name} (${app.organization.slug})`));
}

Token Types

Token Type Scope Lifetime Use Case
User token All orgs/apps Until revoked Development, personal
Deploy token Single app Until revoked CI/CD per app
Org token All apps in org Until revoked Org-wide automation
Machines token API access Until revoked Machines API calls

Error Handling

Error Cause Solution
Error: not authenticated No token set Run fly auth login or set FLY_API_TOKEN
401 Unauthorized Invalid/expired token Regenerate with fly tokens create
Could not find app Wrong app name Check with fly apps list
flyctl not found CLI not installed Run install script above

Resources

Next Steps

After auth, proceed to flyio-hello-world for your first deployment.

Use it

Copy one of these into your project. Installing also returns the manifest and these snippets.

yaml
targets:
  - https://api.opensmartroute.ai/api/v1/registry/jeremylongshore-tons-of-skills-marketplace-flyio-install-auth/manifest   # or paste the manifest below

Manifest

An Open Capability Manifest: the router reads it to know what this does, what it costs and when to pick it.

jeremylongshore-tons-of-skills-marketplace-flyio-install-auth.ocm.jsonjson
{
  "ocm": "1",
  "id": "jeremylongshore-tons-of-skills-marketplace-flyio-install-auth",
  "kind": "skill",
  "name": "flyio-install-auth",
  "description": "Install flyctl CLI and configure Fly.io authentication with API tokens. Use when setting up a new Fly.io project, configuring deploy tokens, or initializing the Machines API for edge compute deployments. Trigger: \"install fly.io\", \"setup flyctl\", \"fly.io auth\", \"fly.io API token\".",
  "publisher": "jeremylongshore",
  "version": "1.0.0",
  "capabilities": {
    "domains": [
      "coding"
    ],
    "tags": [
      "skill-md",
      "saas",
      "edge-compute",
      "flyio",
      "skills-sh"
    ],
    "languages": [
      "en"
    ]
  },
  "quality_prior": 0.6,
  "examples": [
    "Install flyctl CLI and configure Fly.io authentication with API tokens. Use when setting up a new Fly.io project, configuring deploy tokens, or initializing the Machines API for edge compute deployments. Trigger: \"install fly.io\", \"setup flyctl\", \"fly.io auth\", \"fly.io API token\"."
  ],
  "primary": false,
  "metadata": {
    "source": {
      "provider": "skills.sh",
      "repository": "https://github.com/jeremylongshore/tons-of-skills-marketplace",
      "path": "skills/.curated/flyio-install-auth/SKILL.md",
      "ref": "HEAD",
      "url": "https://github.com/jeremylongshore/tons-of-skills-marketplace/blob/HEAD/skills/.curated/flyio-install-auth/SKILL.md",
      "key": "jeremylongshore/tons-of-skills-marketplace/skills/.curated/flyio-install-auth/SKILL.md"
    },
    "compatibility": "Designed for Claude Code",
    "allowed_tools": [
      "Read,",
      "Write,",
      "Edit,",
      "Bash(fly:*),",
      "Bash(curl:*),",
      "Grep"
    ],
    "license": "MIT"
  },
  "instructions": "# Fly.io Install & Auth\n\n## Overview\n\nInstall `flyctl` CLI and configure authentication for Fly.io edge compute platform. Two auth methods: **interactive login** (opens browser) and **API tokens** (CI/CD and Machines API). The Machines API base URL is `https://api.machines.dev`.\n\n## Output\n\nRecord the authentication method, secret-manager reference, minimum scope, validation time, owner, and rotation/revocation procedure. Never put a token, header, machine response, or organization data in the receipt.\n\n## Examples\n\nUse an app-scoped staging deploy token injected by the CI environment, verify ",
  "cost": {
    "context_tokens": 757
  }
}

Fetch it by URL: GET /api/v1/registry/jeremylongshore-tons-of-skills-marketplace-flyio-install-auth/manifest?version=1.0.0

Reviews

Star ratings from people who tried it. One review per account; edit yours any time.

No reviews yet. Install it, try it, and be the first to rate it.