* docs(skill): publish the floci agent skill for the CLI and the four emulators skills/floci/ teaches an AI agent to run, wire up and troubleshoot the AWS, GCP, Azure and OCI emulators through floci-cli, docker run or Docker Compose. - SKILL.md with the lifecycle, the hard rules (fake credentials only, verify the endpoint, name the tree, parse -o json) and one reference per cloud. - references/docs.md sends the agent to the published documentation of each emulator instead of copying coverage lists that go stale. - references/docker.md and assets/compose/ give docker run equivalents of 'floci <tree> start' and a ready Compose template per cloud, plus one with all four on a network. - scripts/install-floci.sh and scripts/ensure-running.sh. - .claude-plugin/marketplace.json publishes it as a Claude Code plugin and the root plugin.json as a Kiro power (Agent Plugins format). - SkillDocsTest checks every floci command and flag the skill quotes against the real command tree, its links, its frontmatter and both manifests. - README: an "AI agents" section with the install commands, a Privacy section on what the CLI and the skill send over the network, and support links. - AGENTS.md: a command, flag, env output or exit code change updates the skill in the same change. Signed-off-by: Hector Ventura <hectorvent@gmail.com> * docs(skill): bind published ports to loopback and make the helper fail safely Addresses the review of #69. - The Compose templates and the docker run examples publish the emulator on 127.0.0.1. The emulators accept fake credentials, so a plain 4566:4566 exposed local resources to the network. docker.md says when to drop it and that 'floci <tree> start' still publishes on every interface. - ensure-running.sh no longer replaces a stopped container: it exits 3 and leaves it alone unless FLOCI_REPLACE_STOPPED=1, because start removes the container and, without a profile, its settings. - The documented call is now 'exports="$(...)" && eval "$exports"'. The one-step eval succeeded when the helper failed, so later commands ran with missing or stale wiring. - The templates say that container name, namespace and network name are per project and change together. - docker.md lists the network settings to copy into the multi-cloud file when an app reaches child containers by name. - ci.md installs into a user-writable directory instead of assuming /usr/local/bin or sudo. - SkillDocsTest now reads commands inside assignments and across continued lines, with a test that a wrong flag is found in each form. The helper's own status and env calls were not being checked. Signed-off-by: Hector Ventura <hectorvent@gmail.com> --------- Signed-off-by: Hector Ventura <hectorvent@gmail.com>
3.3 KiB
CI and Testcontainers
CLI in a pipeline (any cloud)
floci <tree> start --detach
floci <tree> wait --timeout 60s
eval "$(floci <tree> env -o text)"
# Azure control plane: run floci az setup first, then the eval line
# OCI: run floci oci setup first, then the eval line
<test command>
floci <tree> stop --remove || true # exits 1 when the container is already gone
The update check is disabled automatically in CI.
Install into a directory the job can write to. The install script defaults to
/usr/local/bin and calls sudo when that is not writable, which fails on runners without
passwordless sudo:
curl -fsSL https://floci.io/install.sh | FLOCI_INSTALL_DIR="$HOME/.local/bin" sh
export PATH="$HOME/.local/bin:$PATH"
The install script does not create the directory: run mkdir -p "$HOME/.local/bin" first
where it may be missing. brew install floci-io/floci/floci also works where Homebrew is
present.
GitHub Actions
- name: Install floci
run: |
mkdir -p "$HOME/.local/bin"
curl -fsSL https://floci.io/install.sh | FLOCI_INSTALL_DIR="$HOME/.local/bin" sh
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
- name: Start emulator
run: |
floci aws start --detach
floci aws wait --timeout 90s
floci aws env -o json | jq -r 'to_entries[] | "\(.key)=\(.value)"' >> "$GITHUB_ENV"
- run: pytest
$GITHUB_ENV wants KEY=value lines; env -o json is a flat object, so jq converts it.
Alternatively, run eval "$(floci aws env -o text)" at the top of each run: step.
Parallel jobs on one runner: give each job its own profile, port and namespace
(see namespaces.md), e.g. --namespace "ci-${GITHUB_RUN_ID}-${GITHUB_JOB}".
Docker Compose and service containers
When the pipeline already uses Compose, or the CI system offers service containers, run the
image directly instead of installing the CLI: see docker.md and the templates in
assets/compose/. The images have a built-in health check, so
docker compose up -d --wait returns when the emulator is ready.
GitHub Actions service container (enough for in-process services; Docker-backed ones also need the socket mounted, see docker.md):
services:
floci:
image: floci/floci:latest
ports: ["4566:4566"]
env:
AWS_ENDPOINT_URL: http://localhost:4566
AWS_ACCESS_KEY_ID: test
AWS_SECRET_ACCESS_KEY: test
AWS_DEFAULT_REGION: us-east-1
Testcontainers
Prefer a module over scripting the CLI inside test code, where one exists:
- AWS: all five languages below (the Go module is not released yet; check its README).
- Azure: the Java module only.
- GCP, OCI: no module. Start the emulator with the CLI or Compose before the tests, or use the language's generic Testcontainers container with the image, port and health path from docker.md.
Read the module's README for the current API before writing test code; do not guess class or method names.