Imported from floci-io/floci-cli (
skills/floci/SKILL.md) via skills.sh. Install upstream withnpx skills add floci-io/floci-cli --skill floci. Copyright stays with the author.
Floci
Floci is a family of local cloud emulators that speak the real cloud wire protocols.
The floci command (floci-cli) manages their lifecycle; the native tools (aws, gcloud,
az, oci, SDKs, Terraform) do the resource work against the emulator. floci-cli never
creates cloud resources itself.
| Cloud | Emulator | CLI tree | Port | Default container | Reference |
|---|---|---|---|---|---|
| AWS | floci | floci aws |
4566 | floci |
references/aws.md |
| GCP | floci-gcp | floci gcp |
4588 | floci-gcp |
references/gcp.md |
| Azure | floci-az | floci az |
4577 | floci-az |
references/azure.md |
| OCI | floci-oci | floci oci |
4599 | floci-oci |
references/oci.md |
All paths in this skill (references/, scripts/, assets/) are relative to the directory
that holds this file, not to the user's working directory.
Where to start
Pick the integration first; each names the page to read before going on:
- Ad-hoc commands, a dev server or a quick test: the floci-cli lifecycle below.
docker run, a Compose file (docker-compose.yml), an app that itself runs in a container, or no CLI wanted: references/docker.md. Start from the templates inassets/compose/rather than writing YAML from memory: they already carry the health checks and variables each image needs.- Integration tests in code or a CI pipeline: references/ci.md. A Testcontainers module where one exists (AWS in Java, Node, Python, Go and .NET; Azure in Java only; none for GCP or OCI); otherwise start the emulator with the CLI or Compose before the tests.
- Agent tools over the emulators (MCP): the "Agent tools" section below. When those tools
are already available, use them to look around and for one-off changes (list resources, read
an object, send a test message, invoke a function), and the native CLI (
aws,gcloud,az,oci) when the user asked for those commands, wants a script to keep, or needs an operation the tools do not offer (describe_servicelists what each service supports).
Then, as the work needs them:
- The cloud's reference (table above), before the first resource command for that cloud: it has the wiring and the ways a command can leak to real cloud.
- references/docs.md, before writing code against a service you have not used in this session, and whenever an operation looks unsupported. It tells you how to fetch the right page of the published documentation.
- references/namespaces.md, when running more than one instance, sharing a Docker host, or cleaning up containers.
- references/troubleshooting.md, when anything fails.
- references/mcp.md, when the
flociMCP server is missing, fails, or must reach a non-default port.
Prerequisites (check first)
command -v floci && floci version # floci-cli present?
docker info >/dev/null && echo ok # Docker (or Podman via DOCKER_HOST) reachable?
If floci is missing, ask the user before installing software, then run:
scripts/install-floci.sh # brew if available, else official script into ~/.local/bin
scripts/install-floci.sh --version 0.4.0 # pin a version (uses the install script)
- Windows:
iwr https://floci.io/install.ps1 | iex(per-user, no admin). The helper scripts here are bash; on Windows run theflocicommands they wrap directly. - No native binary for the platform: download
floci.jarfrom the latest release and runjava -jar floci.jar(needs Java 25+). - Do not use
sudoor edit shell profiles (~/.bashrc,~/.zshrc) without asking; if the install dir is not onPATH, export it for the current session only. - Updates:
floci update --checkexits 0 when up to date, 1 when an update exists and 2 when the check itself failed. Runfloci updateonly on exit 1 (Homebrew installs:brew upgrade floci). - The user does not want the CLI at all: the emulators are plain container images, see references/docker.md.
floci-cli does not install Docker. If the daemon is missing, tell the user; do not install
Docker yourself. The native cloud CLIs (aws, gcloud, az, oci) are only needed for the
clouds the user works with; suggest installing them, do not install them unasked.
Agent tools (MCP server)
The Floci MCP server, floci-mcp, gives you tools over every emulator service (floci_status,
list_resources, create_resource, run_action, ...). The floci Claude Code plugin starts it
for you; other setups register it once.
Before offering to install it, check whether you already have it: its tools carry a client
prefix (mcp__floci__floci_status, mcp__plugin_floci_floci__floci_status, ...), and some
clients load tools only on demand, so search your tools for floci_status rather than reading
the visible list. If it is there, call floci_status to see which emulators answer. If it is
not and the user wants MCP tools, ask before installing, because it pulls an image (or an
npm package) and changes their agent configuration. Then run:
scripts/ensure-mcp.sh # Docker or Podman image; --npx for the npm package
It registers the server with Claude Code for every project, or prints the configuration for other clients. The tools load in a new session. Ports, instances, other clients and fixes: references/mcp.md.
Hard rules
These protect the user's real cloud accounts and their other work, so they hold even when the user's request seems to point the other way; ask instead.
- Never touch real cloud. Use only the fake credentials the emulators accept
(
test/testfor AWS, the dev identitiesfloci az setupandfloci oci setupcreate). Never read, export or reuse the user's real cloud credentials or profiles: one wrong endpoint would then create or delete real, billed resources. - Verify the endpoint before every mutating command. It must point at the emulator
(
localhost,127.0.0.1,localhost.floci.io, or a Compose service name). If a command might reach public cloud (see each reference's "leaks" section), stop and fix the wiring. With the MCP tools,floci_statusshows the endpoint each cloud is reached at: the emulators by default, or whatever an endpoint variable in the server's registration says. - Always name the tree explicitly:
floci aws start, notfloci start. Bare commands followfloci config default-product, which the user may have changed. - Parse with
-o json, never scrape text output: the text layout is for people and changes between releases, the JSON fields do not. Use-qto silence noise in scripts. - Do not remove containers, volumes or snapshots you did not create in this session: they may hold the user's data. Scope any cleanup to a namespace (see namespaces.md) and confirm with the user first.
- State is ephemeral unless the instance was started with
--persist <dir>or a profile withpersistDir, and recreating a container loses it (see "Starting again" below). Say so before recreating anything. - Do not guess what an emulator supports. Coverage differs per service: some are full
engines, some are in-process, some answer with canned responses. Check
floci <tree> services -o jsonand the service's page in the published docs (references/docs.md) instead of answering from memory. If an operation is missing, say so plainly, suggest a workaround, and point the user to the emulator's issue tracker (https://github.com/floci-io/<floci|floci-gcp|floci-az|floci-oci>/issues) instead of retrying variations.
Lifecycle (same for every tree)
floci <tree> start --detach # pull if needed, start, return immediately
floci <tree> wait --timeout 2m # block until healthy (exit 0 = ready)
eval "$(floci <tree> env -o text)" # export SDK/CLI wiring into this shell
# ... run aws / gcloud / az / oci / tests ...
floci <tree> stop --remove # when done, only if you started it
-o text keeps the exports correct even when a profile sets output: json. In other shells:
floci <tree> env --shell fish | source, or
floci <tree> env --shell powershell | Invoke-Expression.
Or use the helper, which starts the container only when none exists, then waits and prints the exports:
exports="$(scripts/ensure-running.sh <aws|gcp|az|oci> [profile])" && eval "$exports"
Keep the two steps: eval "$(...)" in one go succeeds even when the helper fails, and the
commands after it would run with missing or stale wiring. The helper exits 3 without
touching anything when the container exists but is stopped, because starting it replaces
it (see "Starting again"). Tell the user, and re-run with FLOCI_REPLACE_STOPPED=1 once they
agree.
One-time per instance, before using the native CLI:
- Azure:
floci az setup(trusts the emulator cert, registers an az cloud, logs in). - OCI:
floci oci setup(writes a throwaway key and a[FLOCI]profile in~/.oci/config).
Starting again
Both start on a stopped container and restart remove the container and create a new one.
restart keeps the settings (port, image, services, persist dir, namespace, bind address) but
not in-memory state, and on Azure the new container has a new certificate, so floci az setup
must be run again. start on a running container fails; on a stopped one it uses only its own
flags and profile, so a bind address meant to last belongs in the profile. If restart fails
after removal, follow stderr: a start command that retries with the same settings, or logs
and wait when the new container is up but not ready. Neither restores in-memory state.
Wiring pitfalls
- Never add
-qtoenv: it suppresses the exports themselves. Follow-up command hints keep the instance's flags; keep them when retrying. - With a profile, start and wait before
env. Until the container is running,envwarns on stderr. A profile with aportresolves to that port; a named container with neither a port nor an endpoint has"endpoint": nullinstatus -o jsonandenvexits 1 rather than describe the default instance. Trust"state": "running"instatus -o json, notreachable. evalonly affects the current shell. If each tool call runs in a fresh shell, prefix every command:eval "$(floci aws env -o text)" && aws s3 ls.- zsh (the macOS default) does not split an unquoted variable into words, so
flags="--profile aws-b"; floci aws status $flagspasses one argument and fails. Write the flags out, or use an array:flags=(--profile aws-b)and"${flags[@]}".
Inspecting state
| Need | Command |
|---|---|
| Is it running and healthy? | floci <tree> status -o json |
| Which services are enabled? | floci <tree> services -o json (Azure: returns an empty list, see azure.md) |
| CLI and server versions | floci <tree> version -o json (Azure: read the version from status -o json) |
| Recent server logs | floci <tree> logs --tail 100 or --since 5m |
| Environment problems | floci <tree> doctor -o json (an array of checks with status ok, warn or fail; see troubleshooting.md before acting on a fix) |
| Effective config | floci <tree> config show --profile <name> (the namespace row appears only with a profile that yields one) |
| All instances | floci <tree> config profile list -o json (profiles are shared by all trees; image tells the cloud). Also config profile show, edit and delete <name> |
| Any command's flags | floci <tree> <command> --help |
Several instances
An instance is a profile: its container name is its identity, its port must be unique, and
its Docker resource namespace keeps the containers it launches apart from other instances.
Pass the same --profile <name> to every command for that instance. Details and the
namespace derivation rules are in references/namespaces.md.
floci aws config profile create aws-b --container floci-b --port 14566 --persist ~/.floci/data/aws-b
floci aws start --profile aws-b # waits up to 30s; or --detach, then wait
eval "$(floci aws env -o text --profile aws-b)"
floci-cli keeps its own files under ~/.floci (profiles in ~/.floci/profiles/, per-instance
state in ~/.floci/<product>/<container>/), so instance data goes there too, as
~/.floci/data/<name>.
