{"id":50996858,"url":"https://github.com/flatrun/cli","last_synced_at":"2026-06-20T10:32:43.859Z","repository":{"id":365088822,"uuid":"1173505743","full_name":"flatrun/cli","owner":"flatrun","description":"CLI for flatrun agent","archived":false,"fork":false,"pushed_at":"2026-06-15T21:20:32.000Z","size":45,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-15T21:22:49.702Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/flatrun.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":"ROADMAP.md","authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-05T12:49:14.000Z","updated_at":"2026-06-15T21:20:38.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/flatrun/cli","commit_stats":null,"previous_names":["flatrun/cli"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/flatrun/cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flatrun%2Fcli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flatrun%2Fcli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flatrun%2Fcli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flatrun%2Fcli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flatrun","download_url":"https://codeload.github.com/flatrun/cli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flatrun%2Fcli/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34566920,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-20T02:00:06.407Z","response_time":98,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-20T10:32:43.159Z","updated_at":"2026-06-20T10:32:43.854Z","avatar_url":"https://github.com/flatrun.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FlatRun CLI\n\n`flatrun` is the command-line interface for FlatRun. It is intended to be the automation and operator surface for FlatRun in the same way cloud CLIs wrap a larger platform API.\n\n## Install from source\n\n```bash\nmake build\n```\n\n## Quality Checks\n\n```bash\nmake fmt-check\nmake vet\nmake test\nmake qa\n```\n\nCI runs formatting, vet, tests, golangci-lint, and multi-platform builds for Linux and macOS on amd64/arm64.\n\n## Releases\n\nReleases are created from the GitHub Actions **Release** workflow. Before running it:\n\n1. Update `VERSION`.\n2. Add the matching entry to `CHANGELOG.md`.\n3. Run the workflow manually with the same version value.\n\nThe workflow validates that the input version, `VERSION`, and `CHANGELOG.md` agree before calling `whilesmart/workflows/go/release@main`.\n\n## Configuration\n\nUse environment variables in CI:\n\n```bash\nexport FLATRUN_URL=https://panel.example.com\nexport FLATRUN_TOKEN=fr_xxx\n```\n\nOr configure a local profile:\n\n```bash\nflatrun configure set --url https://panel.example.com --token fr_xxx\nflatrun configure list\n```\n\nConfig is stored at `~/.flatrun/config.json` by default. Use `FLATRUN_CONFIG` to override the path.\n\n## Commands\n\nDeploy an existing app from CI by pulling images and then applying a runtime operation:\n\n```bash\nflatrun deployment deploy my-app --operation restart --json\n```\n\nCreate a deployment directly from an image:\n\n```bash\nflatrun deployment create my-api \\\n  --image ghcr.io/acme/api:main \\\n  --port 8080 \\\n  --host-port 18080\n```\n\nManage an existing deployment:\n\n```bash\nflatrun deployment info my-api\nflatrun deployment image set my-api app ghcr.io/acme/api:sha-abc123\nflatrun deployment image set my-api app ghcr.io/acme/api:sha-abc123 --deploy --operation restart\nflatrun deployment images my-api\nflatrun deployment containers my-api\nflatrun deployment services my-api\nflatrun deployment pull my-api --only-latest\nflatrun deployment restart my-api\nflatrun deployment rebuild my-api\nflatrun deployment stop my-api\nflatrun deployment delete my-api\n```\n\n`deployment pull` operates at deployment level and may pull multiple images because a deployment can contain multiple compose services and containers. Use `deployment images` to inspect the service-to-image mapping first.\n\n`deployment image set` updates the image for one compose service and writes the updated compose back to the deployment. Add `--deploy` when CI should immediately pull and run a deployment operation after the compose update.\n\nRun commands inside a deployment, for tasks such as database migrations after a release:\n\n```bash\nflatrun deployment actions my-api\nflatrun deployment action my-api migrate\nflatrun deployment exec my-api -- bin/rails db:migrate\nflatrun deployment exec my-api worker -- php artisan queue:restart\nflatrun container exec abc123 -- sh -c 'printenv | sort'\n```\n\n`deployment action` runs a quick action defined on the deployment; `deployment actions` lists them. `deployment exec` runs an ad-hoc command instead: the command follows `--`, and the service is chosen positionally or with `--service` (a single-service deployment is resolved automatically, a multi-service one must be named). Both run in the service container, honor the deployment's protected-mode rules, and surface the command's output (including on a non-zero exit).\n\nCall any backend endpoint while a polished command is still pending:\n\n```bash\nflatrun api get /settings\nflatrun api post /databases/list --data '{\"container\":\"mysql\"}'\n```\n\nCheck API connectivity:\n\n```bash\nflatrun health\n```\n\nSee [docs](docs/README.md) for guides and command reference.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflatrun%2Fcli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflatrun%2Fcli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflatrun%2Fcli/lists"}