101 Commits
Author SHA1 Message Date
Hector Ventura 2b721ae1fa ci: stop release-please reading commits from 0.4.0 again (#85)
release-please-config.json pinned last-release-sha to the 0.4.0 release
commit so the first release PR covered only commits since then. The
option is never ignored, so with 1.0.0 released the next release PR
would still read from 0.4.0: the breaking change in #75 would come round
again and it would propose 2.0.0 with the 1.0.0 notes repeated. Without
it, release-please starts from the 1.0.0 release.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
2026-11-18 23:58:02 -06:00
Hector Ventura 5306c3c1a5 chore(main): release 1.0.0 (#77)
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
1.0.0
2026-11-18 23:17:10 -06:00
Hector Ventura e29f95b6a7 ci: install zsh so the zsh completion tests run instead of skipping (#84)
ZshCompletionTest sources the completion script in a real zsh and skips
where zsh is missing, which the runner image is. CI now installs zsh
and sets FLOCI_TEST_REQUIRE_ZSH, which turns that skip into a failure
so a missing zsh cannot pass unnoticed.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
2026-11-18 23:14:51 -06:00
Hector Ventura 73d13b520e fix(completion): stop the zsh script from changing the user's shell options and aliases (#83)
Sourcing `floci completion zsh` ran picocli's `setopt COMPLETE_ALIASES`
and `alias compopt=complete` at the top level of the user's shell. The
option stayed on, so every alias completed as a command of its own
instead of as what it stands for, and the alias stayed defined. It was
also expanded into the completion functions as `complete +o default`,
which bashcompinit turned into completions for commands named `+o` and
`default` on every floci completion.

Neither line does anything for floci's own completion, so the zsh
script now leaves them out. The bash script is unchanged.

Closes #82

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
2026-11-18 23:06:04 -06:00
Hector Ventura e23bc9a481 fix(start): mount the podman machine's own socket on macOS (#81)
* fix(start): mount the podman machine's own socket on macOS

With podman machine on macOS, the socket the docker CLI reaches is a
forwarder on the Mac, and start bind-mounted that path into a container
that runs inside the VM. Depending on the podman version the start
failed ("operation not supported"), or it reported ready while the
emulator could not reach the daemon, so every Docker-backed service
failed later.

When the daemon is Podman, start now asks podman for the socket the
daemon listens on inside the VM (Host.RemoteSocket.Path) and mounts
that. DOCKER_SOCK still names the mounted socket and turns the lookup
off. When podman cannot answer, start warns and keeps the old mount.

Closes #78

Signed-off-by: Hector Ventura <hectorvent@gmail.com>

* fix(start): mount DOCKER_SOCK on macOS even when DOCKER_HOST is set

start's warning tells the user to set DOCKER_SOCK when podman cannot
report its VM socket, but with DOCKER_HOST on the Mac forwarder the
mount still used the DOCKER_HOST path, so following the warning did not
help. On macOS DOCKER_SOCK is now the mount source whenever it is set.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>

---------

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
2026-11-18 22:47:27 -06:00
soreavis 5c0db8f69f docs(readme): add env's exit 1 to the exit-code table and fix the snapshot import example (#80)
Since #75, env exits 1 when the selected container has no known
endpoint: resolvedEndpoint throws and the execution exception handler
returns 1. The prose under floci stop says so, but the Exit Codes
table still left env's 1 empty.

snapshot import reads the tarball from the required --file/-f option
and takes no positional argument, so the documented
'floci snapshot import tarball.tar.gz' exits 2 with
"Missing required option: '--file=<path>'".

Signed-off-by: soreavis <263610811+soreavis@users.noreply.github.com>
2026-11-18 22:03:29 -06:00
Hector Ventura ae4bf99352 ci: release with release-please, like the Testcontainers modules (#76)
Replace the semantic-release Release Cut button with release-please.yml:
a standing release PR bumps pom.xml and CHANGELOG.md; merging it tags
X.Y.Z, then the workflow publishes the binaries (release.yml, now a
reusable workflow), bumps the Homebrew tap and runs CodeQL and Trivy.
A workflow_dispatch tag input re-publishes an existing tag.

Swap conventional-commits.yml for commit-lint.yml so the PR title is
linted, exempt release PRs from the changelog guard, and demote the
generated changelog headings so release-please inserts above them.

Tests: mvn -B test, 811 passed.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
2026-11-05 21:30:19 -06:00
soreavis 3c70876448 feat(start): add --security-opt so Floci can reach the socket on SELinux hosts (#70)
* feat(start): add --security-opt so Floci can reach the socket on SELinux hosts

With SELinux enforcing, as in the podman machine VM, the emulator
cannot connect to the mounted Podman socket: the kernel denies
connectto from container_t to the daemon's container_runtime_t, and
the web console fails with java.net.BindException: Permission denied.
Relabeling the mount with :z fixes access to the socket file but not
that check. --security-opt label=disable gets past it, and start had
no way to pass it.

The option is repeatable and goes to docker run unchanged. A restart
without --profile reads it back from the running container, like the
port, image and services; with --profile the start is rebuilt from
the profile, which has no key for it. docker inspect reports a
seccomp profile file inline, which docker run rejects, so such a
value fails start's validation, and with it the restart, before the
stop removes the container.

Signed-off-by: soreavis <263610811+soreavis@users.noreply.github.com>

* fix(start): keep --security-opt in retry and recovery commands

The failed-pull hint and the restart recovery command rebuild the
start from its flags, so they dropped --security-opt and a retry lost
label=disable. Carry it into both, shell-quoted.

The README's profile workaround stopped the default instance: name
the same profile and product on stop as on start.

Signed-off-by: soreavis <263610811+soreavis@users.noreply.github.com>

---------

Signed-off-by: soreavis <263610811+soreavis@users.noreply.github.com>
2026-11-05 14:25:35 -06:00
Hector Ventura 587860da0f fix(cli)!: stop using the default instance for a missing container (#75)
status no longer probes the default instance for a named container with no known
endpoint, and env, services, snapshot and az setup exit 1 with the next step
instead of acting on it. wait keeps looking for the container until --timeout, and
doctor and version still run. A profile's port is used before its container
starts, and an endpoint from --endpoint, FLOCI_ENDPOINT or another host beats a
local container's published port.

BREAKING CHANGE: in status -o json, endpoint is null when the selected container
has no known endpoint. env, services, snapshot and az setup exit 1 in that case,
where they used to use the default endpoint. An --endpoint or FLOCI_ENDPOINT on
the default port is now honoured even when a local container publishes another
port.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
2026-11-04 17:32:42 -06:00
Hector Ventura 882c0ea7be fix(cli): keep the selected instance in the commands that hints suggest (#74)
Commands printed by errors, env and doctor now carry --profile, --container and
an explicit --endpoint, so pasting one acts on the same instance. After a failed
pull, the suggested start also keeps the --port, --image, --persist, --services
and --namespace you typed.

The env load hint adds -o text after a profile, which may set output: json, and
quotes values for the shell it is for. A value containing a line break prints as a
placeholder, because the hint is a comment in the output people feed to eval.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
2026-11-04 01:48:30 -06:00
Hector Ventura a319e2d242 fix(restart): show how to recover after startup fails (#73)
When restart has removed the old container and the new one does not come up, it
now prints a start command with the same port, image, persist dir, services and
namespace. When the new container is running but did not become ready, it says to
check logs and run wait instead, because start refuses a running container.

The commands name their tree, because a bare floci follows the configured default
product. They keep a typed --endpoint, and --persist prints the directory a local
daemon would mount, so a retry from another directory finds the same state.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
2026-11-04 01:05:50 -06:00
Hector Ventura 763bb2d854 ci: expand native smoke coverage for CLI commands and output (#72)
Run completion, Compose validation with YAML anchors and merge keys, profile
editing, JSON and YAML output, and the snapshot and reset input guards through the
native binary. None of it needs an emulator or a Docker daemon. --no-emoji is only
checked to parse, because piped output is already plain.

Profile editing is skipped on Windows: it has not been proven there, and the
script runs on Windows only while a release is being cut.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
2026-11-04 01:00:30 -06:00
Hector Ventura 94fdf7762c docs(skill): wire Python Secret Manager to the emulator explicitly (#71)
The Python client ignores SECRET_MANAGER_EMULATOR_HOST and still targets
secretmanager.googleapis.com, so the skill's claim that client libraries skip
credentials when these variables are set was wrong for it. Add a recipe with the
REST transport, an explicit endpoint and anonymous credentials, and link it from
the README and the Docker reference.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
2026-11-04 01:00:26 -06:00
Hector Ventura ac52515471 docs(skill): publish the floci agent skill for the CLI and the four emulators (#69)
* 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>
2026-10-12 20:27:02 -05:00
semantic-release-bot 5f2a1018a4 chore(release): 0.4.0
# [0.4.0](https://github.com/floci-io/floci-cli/compare/0.3.0...0.4.0) (2026-10-12)

### Bug Fixes

* **cli:** end every error message with what to do next ([#58](https://github.com/floci-io/floci-cli/issues/58)) ([bd4fa0f](https://github.com/floci-io/floci-cli/commit/bd4fa0f1343c38eac3a1e5ef551a724816dd022d))
* **cli:** exit 2 for every rejected value, not 1 in some commands ([#66](https://github.com/floci-io/floci-cli/issues/66)) ([c65987a](https://github.com/floci-io/floci-cli/commit/c65987abbac07c666fd21ab81cc88d20feebce96))
* **cli:** keep the next step when an error's cause has several lines ([#67](https://github.com/floci-io/floci-cli/issues/67)) ([188aa23](https://github.com/floci-io/floci-cli/commit/188aa23edcf68ad3b53c83abbbc4598b2678bfe7))
* **cli:** keep wait's spinner out of -o json, reject bad durations and make --verbose work ([#48](https://github.com/floci-io/floci-cli/issues/48)) ([52ebdee](https://github.com/floci-io/floci-cli/commit/52ebdee98d46e26ab9b4739326c0dc92764f87fe))
* **cli:** remove doctor --fix and services --mode, which did nothing ([#53](https://github.com/floci-io/floci-cli/issues/53)) ([1a7e84c](https://github.com/floci-io/floci-cli/commit/1a7e84cd2308b8225cf3b3680a9061479794c8bb))
* **completion:** offer only bash and zsh, the shells a script is generated for ([#59](https://github.com/floci-io/floci-cli/issues/59)) ([804e355](https://github.com/floci-io/floci-cli/commit/804e3559362daf37f8f3f8011df4f0824a7045fd))
* **config:** accept Compose files that use YAML anchors and merge keys in config validate ([#65](https://github.com/floci-io/floci-cli/issues/65)) ([68d28d4](https://github.com/floci-io/floci-cli/commit/68d28d49ef410b07c31b067f4d465958c730986d))
* **config:** write profiles and config atomically and report files that cannot be read ([#45](https://github.com/floci-io/floci-cli/issues/45)) ([522e54e](https://github.com/floci-io/floci-cli/commit/522e54ef3c92208a1ca98e9737804353cecc3c0a))
* **docker:** time-limit docker calls and pass names after -- ([#47](https://github.com/floci-io/floci-cli/issues/47)) ([7ecc895](https://github.com/floci-io/floci-cli/commit/7ecc895baaaf1c61f38bc1d1bde7ce2ab6699ee6))
* **doctor:** fail -o json on a failed check and name each product in its hints ([#52](https://github.com/floci-io/floci-cli/issues/52)) ([771b353](https://github.com/floci-io/floci-cli/commit/771b3537331bbe78f6d241814750f12b2143a972))
* **env:** show how to load the variables in the chosen shell and reject unknown shells ([#46](https://github.com/floci-io/floci-cli/issues/46)) ([fbdc3ef](https://github.com/floci-io/floci-cli/commit/fbdc3ef713c4790d197d0bcaaf835dc5f93425db))
* **http:** keep snapshot names in one path segment and report odd server responses clearly ([#54](https://github.com/floci-io/floci-cli/issues/54)) ([24b4280](https://github.com/floci-io/floci-cli/commit/24b4280f696fec07db1c538204ac7765523346e8))
* **reset:** reset the server a profile or FLOCI_ENDPOINT names, not a local container of the default name ([#64](https://github.com/floci-io/floci-cli/issues/64)) ([885e49f](https://github.com/floci-io/floci-cli/commit/885e49f81ac6bdcfed4f2a9e814f7c2ba7062783))
* **restart:** keep the instance's port, image, data directory and services ([#49](https://github.com/floci-io/floci-cli/issues/49)) ([f6cec79](https://github.com/floci-io/floci-cli/commit/f6cec794d71973efebc7991dabe99c723e1541cd))
* **start:** mount a relative --persist path as a directory and validate --port and --pull ([#50](https://github.com/floci-io/floci-cli/issues/50)) ([3ca4108](https://github.com/floci-io/floci-cli/commit/3ca4108498a04b1b52766a42ceea78d259373c21))
* **update:** follow symlinked installs, pick arm64 under Rosetta and tell a failed check from a pending update ([#56](https://github.com/floci-io/floci-cli/issues/56)) ([a9edb57](https://github.com/floci-io/floci-cli/commit/a9edb57aa6d720aae1dddcd4e3987e231b37b47d))

### Features

* **cli:** add --json, --no-emoji, config profile edit and a warning for servers too old for the CLI ([#62](https://github.com/floci-io/floci-cli/issues/62)) ([de3ca7f](https://github.com/floci-io/floci-cli/commit/de3ca7f1716c3ca6eb4f357d35b44cb15592b23c))
* **cli:** honour --json and -o json in config profile, config default-product and the snapshot commands ([#68](https://github.com/floci-io/floci-cli/issues/68)) ([5bcbc09](https://github.com/floci-io/floci-cli/commit/5bcbc0988e12979b61e30137abe72b2271f1238d))
* **cli:** structured output for start, stop and restart, and a status exit code scripts can use ([#60](https://github.com/floci-io/floci-cli/issues/60)) ([4a9a9b5](https://github.com/floci-io/floci-cli/commit/4a9a9b5a4a22cb1ea84133812fe2dec7f3c6eb81))
* **config:** validate Compose files by their structure, with -o json and three more checks ([#61](https://github.com/floci-io/floci-cli/issues/61)) ([6b06382](https://github.com/floci-io/floci-cli/commit/6b063825161dfbb5030972d62439e9af4f389632))
* **reset:** add floci reset to delete every resource in a running emulator ([#55](https://github.com/floci-io/floci-cli/issues/55)) ([fa306b3](https://github.com/floci-io/floci-cli/commit/fa306b38a65559020a9fba490773f51342874da3))
* **start:** check the host port before starting and explain a missing Docker socket ([#51](https://github.com/floci-io/floci-cli/issues/51)) ([4cd39a9](https://github.com/floci-io/floci-cli/commit/4cd39a957a88a185b2983cdbb7fee14031839f24))
0.4.0
2026-10-12 02:54:30 +00:00
Hector Ventura 5bcbc0988e feat(cli): honour --json and -o json in config profile, config default-product and the snapshot commands (#68)
* feat(cli): honour --json and -o json in config profile, config default-product and the snapshot commands

config profile show, create, edit and delete, config default-product and snapshot save, load and delete accepted --json and printed text. They now print one document: show uses the same keys as a row of list, and the action commands report what they did and to which file or endpoint.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>

* feat(cli): keep an editor's output off stdout when config profile edit prints JSON

The editor shared the command's stdout, so anything it or its wrapper printed landed in front of the result document. With structured output its stdout now goes to stderr. The README no longer lists env among the text-only commands: it prints a map in JSON and YAML.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>

* docs(readme): say which commands print a document when they exit 1

Signed-off-by: Hector Ventura <hectorvent@gmail.com>

---------

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
2026-10-11 21:26:22 -05:00
Hector Ventura c65987abba fix(cli): exit 2 for every rejected value, not 1 in some commands (#66)
* fix(cli): exit 2 for every rejected value, not 1 in some commands

config default-product, config profile (unknown action, missing name, --port out of range), update --version, an invalid snapshot name, an invalid az setup container name and an unusable --persist path returned 1, the code for a command that ran and failed. They now return 2 like every other rejected value. A persist directory that cannot be created is still 1.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>

* test(restart): pin exit 2 for an unusable persist path before anything is stopped

Signed-off-by: Hector Ventura <hectorvent@gmail.com>

---------

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
2026-10-11 21:17:32 -05:00
Hector Ventura 188aa23edc fix(cli): keep the next step when an error's cause has several lines (#67)
A failed docker run with more than one line of output lost its 'floci doctor' hint, and a profile or Compose file that does not parse was reported with the parser's source-location line instead of what to do. Causes are now shown as one line, and docker's own output always gets its next step.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
2026-10-11 21:17:28 -05:00
Hector Ventura 68d28d49ef fix(config): accept Compose files that use YAML anchors and merge keys in config validate (#65)
* fix(config): accept Compose files that use YAML anchors and merge keys in config validate

config validate read the file without resolving anchors, aliases or merge keys, so a service built from an anchor looked empty and a valid file got two errors and exit 1. The file is now read with its anchors resolved, the way Compose reads it. snakeyaml was already on the classpath through Jackson's YAML module and is now declared, since it is used directly.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>

* fix(config): bound alias expansion and read Compose scalars as YAML 1.2 in config validate

A few nested aliases can describe millions of values; the reader now stops at 100000 and reports the file instead of using up memory. Only true and false are booleans, so a service named on, off, yes or no keeps its name.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>

* fix(config): report a self-referencing alias instead of overflowing the stack in config validate

A recursive alias is a collection that contains itself. The reader now stops at 64 levels of nesting and reports the file, so the command still prints its validation report.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>

---------

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
2026-10-11 21:12:20 -05:00
Hector Ventura 885e49f81a fix(reset): reset the server a profile or FLOCI_ENDPOINT names, not a local container of the default name (#64)
* fix(reset): reset the server a profile or FLOCI_ENDPOINT names, not a local container of the default name

With no container selected, an endpoint that came from a profile or the environment was replaced by the port of a container running locally under the default name, so reset --yes could wipe the wrong instance. Such an endpoint is now used as given, like a typed one.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>

* fix(reset): reset nothing when the configured endpoint and a running default container are different servers

A profile carries a container name next to its endpoint, and every created profile is seeded with the default one. Using the endpoint outright could then reset a server other than a container the profile also names. When the two disagree neither is picked; the user says which with --endpoint or --container.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>

* fix(reset): require a configured container to be running and to agree with a configured endpoint

A container that a profile or FLOCI_CONTAINER supplies is selected even when it has the default name, so a missing or stopped one resets nothing instead of falling back to the endpoint. A configured container and endpoint must be the same server. For a remote Docker host the published port is on the daemon's machine, so the endpoint is compared with that host, and a remote container without an endpoint is not reset through localhost.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>

* fix(reset): treat a Docker daemon on this machine reached over TCP as local

tcp://127.0.0.1:2375 is this machine's daemon, so its published ports are local and a reset goes ahead as with a socket. The README sentence about exiting 1 now covers only the cases where reset refuses.
Signed-off-by: Hector Ventura <hectorvent@gmail.com>

* fix(reset): keep a Docker daemon reached over SSH remote, loopback address or not

ssh://user@127.0.0.1:2222 is a forwarded port to a VM or another machine. Treating it as local would let reset --yes go to localhost on this machine.
Signed-off-by: Hector Ventura <hectorvent@gmail.com>

---------

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
2026-10-11 21:10:58 -05:00
Hector Ventura 97eaa5e820 docs: add an exit-code table and generated --help snapshots (#63)
* docs: add an exit-code table and generated --help snapshots

README gains the exit codes scripts can rely on, per command. docs/help holds the --help text of every command in every tree, and HelpSnapshotTest fails when the files and the commands drift apart.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>

* docs: say which rejected values exit 1 and pin the documented exit codes with a test

The table promised 2 for every unusable value, but three commands report a rejected value with 1. The wording is narrowed, the three are named, and ExitCodeTableTest pins the rows that need neither Docker nor a server.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>

* test: keep the exit-code test off the developer's saved profiles

The profile commands build their own store under the home directory, so the test now runs with a temporary home.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>

---------

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
2026-10-11 09:23:29 -05:00
Hector Ventura de3ca7f171 feat(cli): add --json, --no-emoji, config profile edit and a warning for servers too old for the CLI (#62)
* feat(cli): add --json, --no-emoji, config profile edit and a warning for servers too old for the CLI

--json is shorthand for --output json. Marks are plain ASCII with --no-emoji, when output is piped and under NO_COLOR. config profile edit opens a profile in VISUAL or EDITOR and checks it still reads. status and version warn on stderr when the AWS server is older than the minimum the CLI supports.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>

* feat(cli): keep the upgrade hint on the selected instance and read quoted editor commands

The old-server hint names the instance it is about and suggests a restart, which keeps that instance's settings. The update notice follows --no-emoji and NO_COLOR. VISUAL and EDITOR are split like a shell would, so a quoted path with spaces works.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>

* feat(cli): keep Windows paths in editor values and say what to do for a pinned image

A backslash in VISUAL or EDITOR is an escape only before a space or a quote, so Windows paths come through intact. The old-server hint explains that restart keeps a pinned tag and how to change it.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>

* feat(config): let profile edit open a profile that no longer parses

edit asked the store to parse the profile before opening it, so the one profile that needed repairing could not be opened. A file holding YAML's null is now reported as a profile without settings instead of failing with an exception.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>

---------

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
2026-10-11 09:12:44 -05:00
Hector Ventura 6b06382516 feat(config): validate Compose files by their structure, with -o json and three more checks (#61)
* feat(config): validate Compose files by their structure, with -o json and three more checks

config validate now parses the Compose file and checks the emulator's own service: any host port mapped to the emulator port is accepted (5566:4566 was rejected), -o json and -o yaml report the findings, and it flags a read-only or file-bound data volume, a data volume without persistent storage mode (and the reverse), and an image tag older than the supported minimum.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>

* feat(config): check the socket target, TCP mappings and bind types, and report unparsable files as JSON

The socket has to land at /var/run/docker.sock in the container, a UDP mapping no longer counts, a long-form bind with a bare name is checked as a path, an env_file makes the storage mode unknown, and a file that cannot be parsed still gets a structured report.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>

---------

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
2026-10-11 09:01:14 -05:00
Hector Ventura 4a9a9b5a4a feat(cli): structured output for start, stop and restart, and a status exit code scripts can use (#60)
* feat(cli): structured output for start, stop and restart, and a status exit code scripts can use

start, stop and restart print one document with -o json or -o yaml and keep progress off stdout. status exits 1 when the instance is not up (it always exited 0). logs stays plain text and says so when -o is passed.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>

* feat(cli): report the container's real state after start and stop

start reads the state back, so a container that exited during the readiness wait is not reported as running, and stop reports a container docker removed on its own (--rm) as removed. The tests now reject anything after the one document on stdout.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>

---------

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
2026-10-11 08:59:58 -05:00
Hector Ventura 804e355936 fix(completion): offer only bash and zsh, the shells a script is generated for (#59)
The help listed fish and powershell, which only produced an error; an unsupported shell is now a usage error (exit 2) with nothing on stdout. Container details are read from docker's inspect JSON instead of a pipe-delimited template, which a value containing the delimiter could shift.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
2026-10-11 08:58:31 -05:00
Hector Ventura bd4fa0f134 fix(cli): end every error message with what to do next (#58)
* fix(cli): end every error message with what to do next

Docker, snapshot, update and config profile errors now say how to recover (check Docker, run doctor or status, fix or delete the profile file, pass the missing profile name) instead of stopping at the failure. A test keeps new error messages to the convention.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>

* fix(cli): keep the next step after docker's own output and name the instance in snapshot hints

Docker's error output ends in a newline and can span lines, which read as 'already has a next step' and hid the hint. The exception now knows whether its text is docker's output or the CLI's own advice. Snapshot hints select the same instance again.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>

---------

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
2026-10-10 23:02:30 -05:00
Hector Ventura 6a74d7d2d5 test: cover Printer and the floci update flow (#57)
* test: cover Printer and the floci update flow

PrinterTest pins where text, errors and warnings go, what --quiet hides, and the JSON and YAML rendering. UpdateCommandTest drives floci update against a stub release server: a verified replacement, a checksum mismatch, --check, up to date, a Homebrew install and a non-version API response. UpdateCommand takes the binary path and the release URLs through a constructor for this, replacing a package-private field.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>

* test: check the exact release files requested and the version check itself

The stub release server serves only the expected release's files, the replacement test asserts the two requests made, valid JSON without a usable version is covered, and the Printer assertions use the platform line separator.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>

---------

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
2026-10-10 22:30:07 -05:00
Hector Ventura a9edb57aa6 fix(update): follow symlinked installs, pick arm64 under Rosetta and tell a failed check from a pending update (#56)
* fix(update): follow symlinked installs, pick arm64 under Rosetta and tell a failed check from a pending update

floci update replaces the real binary behind a symlink, moves an x86_64 build on Apple Silicon to the arm64 build, refuses a --version that is not a release version, and accepts upper-case checksums. --check now exits 2 when the check itself fails (1 still means an update is available) and on Windows points at the installer instead of 'floci update'. A failed background update check is recorded too, so the next command does not retry it and wait at exit.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>

* fix(update): record a check attempt before the request and bound the Rosetta probe

The update check marks its attempt before asking GitHub, so a command that exits while the request is still waiting does not start it again on every run; an attempt is retried after an hour rather than a day and never overwrites a result another process just stored. The sysctl probe waits with its limit before reading. Adds a test for updating through a symlink.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>

---------

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
2026-10-10 22:08:57 -05:00
Hector Ventura fa306b38a6 feat(reset): add floci reset to delete every resource in a running emulator (#55)
* feat(reset): add floci reset to delete every resource in a running emulator

floci reset (and floci gcp/az/oci reset) calls the emulator's state reset endpoint, so a test run can start clean without restarting the container. It asks for confirmation on a terminal; --yes skips the prompt and is required when there is no terminal. A server without the endpoint (floci-az today) gets a 'not available' message.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>

* feat(reset): never guess which server to reset

A typed --endpoint is used as given instead of being replaced by a local container's port, and a container the user selected has to be found running: a missing or stopped one resets nothing rather than falling back to the default instance. The confirmation goes through a seam, with tests for every answer.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>

* feat(reset): stop when a selected container publishes no port for the emulator

A selected container that is running without a matching published port has nothing to be found by, and the configured endpoint may be another instance.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>

* feat(reset): find a selected instance by the emulator's port, not the configured host port

A profile for an instance on its own host port names that port in its endpoint, while the container still listens on the emulator's; reset matched the wrong one and refused such instances.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>

---------

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
2026-10-10 22:07:41 -05:00
Hector Ventura 24b4280f69 fix(http): keep snapshot names in one path segment and report odd server responses clearly (#54)
* fix(http): keep snapshot names in one path segment and report odd server responses clearly

Snapshot names are URL-encoded and names that would change the path are refused; every trailing slash is stripped from the endpoint; a non-JSON body or a redirect gets a message that says so instead of a parser error; requests use HTTP/1.1. snapshot delete reports a missing snapshot API like save and load, save warns that --message is not sent yet, and export/import no longer cite a server version that does not exist.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>

* fix(http): tell a missing snapshot API from its status, not from the error text

The error message carries the request path, so a snapshot named nightly404 turned a real server error into 'not available'. FlociException now carries the HTTP status and the snapshot commands ask that.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>

---------

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
2026-10-10 21:39:43 -05:00
Hector Ventura 1a7e84cd23 fix(cli): remove doctor --fix and services --mode, which did nothing (#53)
doctor --fix only hid the hint text and services --mode filtered nothing, because the server does not report service modes. Both flags are removed rather than kept as promises; doctor's summary now points at the Fix line under each failed check. services --mode can return once the server exposes service metadata (BL-065).

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
2026-10-10 21:38:43 -05:00
Hector Ventura 771b353733 fix(doctor): fail -o json on a failed check and name each product in its hints (#52)
* fix(doctor): fail -o json on a failed check and name each product in its hints

doctor -o json now exits 1 when a check fails, as text output does; hints and HTTP errors name the product's own command (floci gcp start, ...) and the port check falls back to the product's default port; a warnings-only run no longer reads as '0 issue(s) found'; an https AWS_ENDPOINT_URL without a port means 443.

* fix(http): name the product's status command when a request times out

Both ways a request can time out now give the same message with the product's own command. The hint tests use their own local endpoints instead of port 9.
2026-10-10 18:45:05 -05:00
Hector Ventura 4cd39a957a feat(start): check the host port before starting and explain a missing Docker socket (#51)
* feat(start): check the host port before starting and explain a missing Docker socket

floci start now stops with 'Port N is already in use' and how to pick another port, instead of failing inside docker run, and when Docker cannot be reached because its local socket is missing it says how to bring Docker up. The port probe is skipped for a remote daemon (DOCKER_HOST=tcp://...).

* feat(start): ask docker which daemon it uses before probing the port

The port probe and the socket hint follow the daemon docker resolved (DOCKER_HOST, else the active context), a number that is no port is not probed, and a missing socket gets a start-the-daemon hint instead of a permissions one. Adds tests for the free port, remote daemon, socket guidance and context paths.

* feat(start): treat a daemon reached over ssh as remote

An ssh:// DOCKER_HOST or context endpoint was read as a local socket path, so a busy local port could block a start on another machine.

* feat(start): resolve the daemon once for the persist directory and the bind source

Start asks docker which daemon it uses once and applies that answer to the persist directory and the bind source too, so a daemon that is remote only through its context is treated like DOCKER_HOST=tcp://.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>

* feat(start): let docker decide on a low port the user cannot bind

A failed bind below 1024 can mean the user lacks the right to bind it, while the Docker daemon can publish it. Such a port now counts as taken only when something answers on it.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>

* feat(start): keep an address-in-use error as proof a low port is taken

The listener fallback now applies only when the bind failed for another reason, so a low port held on a non-loopback address is still reported as taken.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>

---------

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
2026-10-10 18:28:47 -05:00
Hector Ventura 3ca4108498 fix(start): mount a relative --persist path as a directory and validate --port and --pull (#50)
* fix(start): mount a relative --persist path as a directory and validate --port and --pull

--persist ./data is resolved to an absolute path and created before docker run, so state lands in that directory instead of a Docker named volume; --port outside 1-65535 and an unknown --pull policy are rejected with exit 2 (restart checks them before stopping anything).

start creates the persist directory itself (preparePersistDir). restart now does that before it stops anything, so an unwritable directory fails the restart with the instance still running, instead of after the container was already removed.

* fix(start): leave a remote daemon's persist directory alone and accept pull policies in any locale

The persist directory is created only for a local daemon, an invalid path is reported instead of thrown while building the message, and pull policies are lowercased with Locale.ROOT. The permission test is skipped when permissions do not bind the user.

* fix(start): check the persist path for a remote daemon before restart stops anything

A remote daemon skips only the local directory creation. The path itself is resolved for every daemon, so an unusable one is reported before the stop instead of thrown while building the run arguments afterwards.

* test(restart): let the recorded start answer restart's pre-stop checks

The recording start used by the call-path tests was never parsed, so the new --pull validation rejected it. It now delegates the checks to the start restart really built.

* fix(start): pass a remote daemon's persist path on unchanged

A remote daemon's bind source is no longer resolved by the CLI machine's path rules, which turned /srv/data into a drive path on a Windows CLI. Only a local daemon has relative paths resolved.

* fix(start): refuse a relative --persist path for a remote daemon

A remote daemon cannot resolve a path relative to the CLI's working directory, and docker reads a bare name as a named volume, so the state would land somewhere a later restart does not carry over.

* refactor(start): keep bindSource's javadoc on the method
2026-10-10 17:55:29 -05:00
Hector Ventura f6cec794d7 fix(restart): keep the instance's port, image, data directory and services (#49)
* fix(restart): keep the instance's port, image, data directory and services

Without a profile, restart reads the running container's settings (host port, image, the directory mounted at /app/data, its services and resource namespace) before stopping it and starts it with them, instead of falling back to the defaults and moving the instance to the default port without its state. A profile still decides when one is given, and restart now starts the container when none exists instead of failing.

A container started without --persist has Docker's anonymous volume at /app/data; restart took that volume's internal path for a persist directory and failed to start again. Only a bind mount is a persist directory now.

* fix(restart): stop before the stop when the running container's settings cannot be read

A failed or timed-out inspect is no longer treated as a missing container, which removed the instance and started it on the defaults. Adds tests through call() for the missing-container, existing-container and unreadable-settings paths.
2026-10-10 17:38:28 -05:00
Hector Ventura 52ebdee98d fix(cli): keep wait's spinner out of -o json, reject bad durations and make --verbose work (#48)
* fix(cli): keep wait's spinner out of -o json, reject bad durations and make --verbose work

wait draws its spinner only for text output on a terminal and clears it before the result; --timeout values that are not a positive number with ms, s, m or h exit 2 with a hint instead of a stack trace; --verbose now echoes each docker command to stderr and prints stack traces for errors.

* fix(cli): reject durations that overflow and pin the spinner rule on a terminal

A duration is checked for sign before it is converted and the conversion is overflow-checked, so -9223372036854775807s no longer wraps to a positive timeout. wait takes its terminal check through a seam, with tests for json, yaml and text output on a terminal.
2026-10-10 17:33:15 -05:00
Hector Ventura 7ecc895baa fix(docker): time-limit docker calls and pass names after -- (#47)
* fix(docker): time-limit docker calls and pass names after --

Non-streaming docker calls are killed after 30 s (docker run after 10 minutes, stop after its own timeout plus 30 s) with a message naming the stalled command; any abnormal exit kills the process, streaming calls included; container and image names are passed after -- so a name starting with '-' is never read as a flag.

* fix(docker): time-limit the daemon probe and let stop --timeout -1 wait indefinitely

The doctor's daemon probe and the install probe now share the time limit and cleanup of every other docker call. A negative stop timeout is docker's wait-indefinitely (checked against Docker 29.8.2), so that call is no longer cut off after 29 seconds. Adds tests for the probe, both stop cases and interrupted streaming calls.
2026-10-10 16:28:45 -05:00
Hector Ventura 522e54ef3c fix(config): write profiles and config atomically and report files that cannot be read (#45)
* fix(config): write profiles and config atomically and report files that cannot be read

Profile files and ~/.floci/config.yaml are replaced through a temporary file, so an interrupted write leaves the old file intact; an unknown key in config.yaml no longer resets the default product to aws, and an unreadable config.yaml or profile file is reported on stderr instead of being ignored.

* fix(config): warn when the config file cannot be opened and keep long profile names saving

A config.yaml in a directory the user cannot search is no longer taken for a missing file, the profile list warning quotes the real cause instead of calling every failure bad YAML, and the temporary file name no longer grows with the profile name. Adds tests for failed saves.
2026-10-10 15:54:34 -05:00
Hector Ventura fbdc3ef713 fix(env): show how to load the variables in the chosen shell and reject unknown shells (#46)
The closing hint of floci env (all four products) now uses source for fish and Invoke-Expression for PowerShell instead of always suggesting eval, and an unknown --shell exits 2 with the accepted values instead of silently printing bash syntax. zsh, sh and pwsh are accepted by name.
2026-10-09 22:17:21 -05:00
Hector Ventura 030d468fd3 test: add an opt-in integration suite against the real emulator images (#44)
mvn test -Pintegration drives start, wait, status, env and stop for all four products through the CLI's own command tree, plus two AWS instances side by side, each container uniquely named on a free port and removed afterwards. Tests tagged integration are excluded from the default build. A new Integration workflow runs the suite on main, weekly and on demand.
2026-10-09 22:11:00 -05:00
Hector Ventura a813a23785 ci: run every release binary before publishing and build linux/amd64 natively in CI (#43)
* ci: run every release binary before publishing and build linux/amd64 natively in CI

A shared smoke script runs each binary: version (checked against the tag in release.yml), --help for all four product trees, a profile list and the bad-profile exit code. Every release job runs it before uploading, so a binary that cannot start fails the release instead of shipping. CI gains a linux/amd64 native job next to linux/arm64.

* ci: round-trip a profile in the smoke test and run CI when the script changes
2026-10-09 22:10:27 -05:00
semantic-release-bot 0746e1a61c chore(release): 0.3.0
# [0.3.0](https://github.com/floci-io/floci-cli/compare/0.2.3...0.3.0) (2026-10-09)

### Bug Fixes

* **cli:** honour --no-color on parse errors and show profile defaults in --help ([#35](https://github.com/floci-io/floci-cli/issues/35)) ([fc67e72](https://github.com/floci-io/floci-cli/commit/fc67e72a625df8156cc69fc2068e6923ae36f2f6))
* **profile:** make profile names, files and exit codes consistent ([#33](https://github.com/floci-io/floci-cli/issues/33)) ([5c0cc33](https://github.com/floci-io/floci-cli/commit/5c0cc339bf0be5937ae3fb561b4cb2103d5325fb))
* **update:** save the update-check cache in the native binary ([#41](https://github.com/floci-io/floci-cli/issues/41)) ([a40c7be](https://github.com/floci-io/floci-cli/commit/a40c7be73242f22edd3f6a93544a63c6c147621e))

### Features

* **az:** configure the az CLI against floci-az with floci az setup ([#29](https://github.com/floci-io/floci-cli/issues/29)) ([7b58a38](https://github.com/floci-io/floci-cli/commit/7b58a38c5a5bf4e2e84991c5400ec3abbab90264))
* **config:** create profiles for instances that run side by side ([#30](https://github.com/floci-io/floci-cli/issues/30)) ([788eb47](https://github.com/floci-io/floci-cli/commit/788eb470fb2d51b0d2b6743a060e709d9970c34d))
* **profile:** warn when a profile sets a key floci does not read ([#37](https://github.com/floci-io/floci-cli/issues/37)) ([22668a1](https://github.com/floci-io/floci-cli/commit/22668a1200c4835ac369cb9ebea355b0d4f9feb4))
* **start:** give each instance its own Docker resource namespace and base URL ([#31](https://github.com/floci-io/floci-cli/issues/31)) ([bf9ee40](https://github.com/floci-io/floci-cli/commit/bf9ee4037bb22628ad7f470bca7c551a8f6e65e2))

### Performance Improvements

* **doctor:** run checks concurrently and share docker lookups ([#32](https://github.com/floci-io/floci-cli/issues/32)) ([dd38f6d](https://github.com/floci-io/floci-cli/commit/dd38f6dc27307d7297d5fcc5c1a02897f8bb9f03))
* **native:** build smaller binaries with -Os and enforce a size budget ([#28](https://github.com/floci-io/floci-cli/issues/28)) ([3c4118f](https://github.com/floci-io/floci-cli/commit/3c4118ff1a5521ade1b7e788f45dbaca9069f648))
* restart without a fixed pause and wait no longer than --timeout ([#36](https://github.com/floci-io/floci-cli/issues/36)) ([01d6133](https://github.com/floci-io/floci-cli/commit/01d61335489121757612a5b7062d13f9a593b20b))
0.3.0
2026-10-09 04:42:47 +00:00
Hector Ventura 8feff771ac docs(readme): remove the Scoop install instructions (#42) 2026-10-08 23:39:13 -05:00
Hector Ventura a40c7be732 fix(update): save the update-check cache in the native binary (#41) 2026-10-08 23:39:09 -05:00
Hector Ventura 2dd2e7fa25 docs: adopt the Floci family README layout and a no-dash writing rule (#40) 2026-10-08 23:15:52 -05:00
Hector Ventura 9b340934ae docs(readme): fix the command tables and the profile field table (#39) 2026-10-08 23:12:44 -05:00
Hector Ventura af3d7814b9 test(profile): pin profile precedence, config show output and bad-profile exits (#38) 2026-10-08 23:12:40 -05:00
Hector Ventura 22668a1200 feat(profile): warn when a profile sets a key floci does not read (#37) 2026-10-08 22:47:51 -05:00
Hector Ventura 01d6133548 perf: restart without a fixed pause and wait no longer than --timeout (#36) 2026-10-08 22:41:35 -05:00
Hector Ventura fc67e72a62 fix(cli): honour --no-color on parse errors and show profile defaults in --help (#35) 2026-10-08 22:30:28 -05:00