action-platform 0.3.0__tar.gz → 0.4.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {action_platform-0.3.0 → action_platform-0.4.0}/PKG-INFO +26 -203
- action_platform-0.4.0/README.md +116 -0
- {action_platform-0.3.0 → action_platform-0.4.0}/action_platform/__init__.py +1 -1
- action_platform-0.4.0/action_platform/api/CHANGELOG.md +24 -0
- action_platform-0.4.0/action_platform/api/LAST_VERSION +1 -0
- action_platform-0.4.0/action_platform/api/__init__.py +0 -0
- action_platform-0.4.0/action_platform/api/core/__init__.py +0 -0
- {action_platform-0.3.0/action_platform/api → action_platform-0.4.0/action_platform/api/core}/credentials.py +0 -1
- action_platform-0.4.0/action_platform/api/core/deps.py +48 -0
- action_platform-0.4.0/action_platform/api/main.py +63 -0
- action_platform-0.4.0/action_platform/api/repositories/__init__.py +3 -0
- {action_platform-0.3.0/action_platform/api → action_platform-0.4.0/action_platform/api/repositories}/registry.py +34 -2
- action_platform-0.4.0/action_platform/api/schemas/__init__.py +85 -0
- action_platform-0.4.0/action_platform/api/schemas/actions.py +171 -0
- action_platform-0.4.0/action_platform/api/schemas/apps.py +80 -0
- action_platform-0.4.0/action_platform/api/schemas/catalog.py +41 -0
- action_platform-0.4.0/action_platform/api/services/__init__.py +0 -0
- action_platform-0.4.0/action_platform/api/services/apps.py +187 -0
- action_platform-0.4.0/action_platform/api/services/catalog.py +44 -0
- action_platform-0.4.0/action_platform/api/services/configuration.py +127 -0
- action_platform-0.4.0/action_platform/api/services/flow.py +70 -0
- action_platform-0.4.0/action_platform/api/services/git_state.py +99 -0
- action_platform-0.4.0/action_platform/api/services/lifecycle.py +85 -0
- action_platform-0.4.0/action_platform/api/services/manifest.py +18 -0
- action_platform-0.4.0/action_platform/api/v1/__init__.py +10 -0
- action_platform-0.4.0/action_platform/api/v1/routers/__init__.py +0 -0
- action_platform-0.4.0/action_platform/api/v1/routers/actions.py +36 -0
- action_platform-0.4.0/action_platform/api/v1/routers/apps.py +84 -0
- action_platform-0.4.0/action_platform/api/v1/routers/catalog.py +22 -0
- action_platform-0.4.0/action_platform/api/v1/routers/configuration.py +50 -0
- action_platform-0.4.0/action_platform/api/v1/routers/flow.py +40 -0
- {action_platform-0.3.0 → action_platform-0.4.0}/action_platform/cli/commands/api.py +1 -1
- {action_platform-0.3.0 → action_platform-0.4.0}/action_platform/core/flow/branching.py +1 -1
- {action_platform-0.3.0 → action_platform-0.4.0}/action_platform/core/flow/pullrequest.py +2 -1
- action_platform-0.4.0/action_platform/core/manifest/__init__.py +89 -0
- {action_platform-0.3.0 → action_platform-0.4.0}/action_platform/core/release/release.py +0 -1
- {action_platform-0.3.0 → action_platform-0.4.0}/action_platform/core/release/versioning.py +25 -1
- {action_platform-0.3.0 → action_platform-0.4.0}/action_platform/core/scaffold/install.py +0 -6
- {action_platform-0.3.0 → action_platform-0.4.0}/action_platform/hooks/gitflow.sh +0 -5
- {action_platform-0.3.0 → action_platform-0.4.0}/action_platform/mcp/server.py +0 -1
- {action_platform-0.3.0 → action_platform-0.4.0}/action_platform/providers/source/bitbucket.py +0 -1
- {action_platform-0.3.0 → action_platform-0.4.0}/action_platform/providers/source/generic.py +0 -1
- {action_platform-0.3.0 → action_platform-0.4.0}/action_platform/providers/source/github.py +28 -16
- {action_platform-0.3.0 → action_platform-0.4.0}/action_platform/providers/source/gitlab.py +21 -11
- {action_platform-0.3.0 → action_platform-0.4.0}/action_platform/providers/source/rest.py +0 -1
- {action_platform-0.3.0 → action_platform-0.4.0}/action_platform/remote/client.py +0 -2
- {action_platform-0.3.0 → action_platform-0.4.0}/pyproject.toml +2 -2
- action_platform-0.3.0/README.md +0 -293
- action_platform-0.3.0/action_platform/api/LAST_VERSION +0 -1
- action_platform-0.3.0/action_platform/api/__init__.py +0 -1
- action_platform-0.3.0/action_platform/api/models.py +0 -177
- action_platform-0.3.0/action_platform/api/server.py +0 -436
- {action_platform-0.3.0 → action_platform-0.4.0}/LICENSE +0 -0
- {action_platform-0.3.0 → action_platform-0.4.0}/action_platform/abc/__init__.py +0 -0
- {action_platform-0.3.0 → action_platform-0.4.0}/action_platform/abc/ci_runner.py +0 -0
- {action_platform-0.3.0 → action_platform-0.4.0}/action_platform/abc/deploy_target.py +0 -0
- {action_platform-0.3.0 → action_platform-0.4.0}/action_platform/abc/source_host.py +0 -0
- {action_platform-0.3.0 → action_platform-0.4.0}/action_platform/cli/__init__.py +0 -0
- {action_platform-0.3.0 → action_platform-0.4.0}/action_platform/cli/commands/__init__.py +0 -0
- {action_platform-0.3.0 → action_platform-0.4.0}/action_platform/cli/commands/branch.py +0 -0
- {action_platform-0.3.0 → action_platform-0.4.0}/action_platform/cli/commands/cloud.py +0 -0
- {action_platform-0.3.0 → action_platform-0.4.0}/action_platform/cli/commands/deploy.py +0 -0
- {action_platform-0.3.0 → action_platform-0.4.0}/action_platform/cli/commands/gitflow.py +0 -0
- {action_platform-0.3.0 → action_platform-0.4.0}/action_platform/cli/commands/init.py +0 -0
- {action_platform-0.3.0 → action_platform-0.4.0}/action_platform/cli/commands/install.py +0 -0
- {action_platform-0.3.0 → action_platform-0.4.0}/action_platform/cli/commands/login.py +0 -0
- {action_platform-0.3.0 → action_platform-0.4.0}/action_platform/cli/commands/mcp.py +0 -0
- {action_platform-0.3.0 → action_platform-0.4.0}/action_platform/cli/commands/pr.py +0 -0
- {action_platform-0.3.0 → action_platform-0.4.0}/action_platform/cli/commands/release.py +0 -0
- {action_platform-0.3.0 → action_platform-0.4.0}/action_platform/cli/commands/service.py +0 -0
- {action_platform-0.3.0 → action_platform-0.4.0}/action_platform/cli/setup.py +0 -0
- {action_platform-0.3.0 → action_platform-0.4.0}/action_platform/core/__init__.py +0 -0
- {action_platform-0.3.0 → action_platform-0.4.0}/action_platform/core/action_platform.py +0 -0
- {action_platform-0.3.0 → action_platform-0.4.0}/action_platform/core/config.py +0 -0
- {action_platform-0.3.0 → action_platform-0.4.0}/action_platform/core/context.py +0 -0
- {action_platform-0.3.0 → action_platform-0.4.0}/action_platform/core/exception.py +0 -0
- {action_platform-0.3.0 → action_platform-0.4.0}/action_platform/core/flow/__init__.py +0 -0
- {action_platform-0.3.0 → action_platform-0.4.0}/action_platform/core/flow/git.py +0 -0
- {action_platform-0.3.0 → action_platform-0.4.0}/action_platform/core/flow/gitflow.py +0 -0
- {action_platform-0.3.0 → action_platform-0.4.0}/action_platform/core/module.py +0 -0
- {action_platform-0.3.0 → action_platform-0.4.0}/action_platform/core/release/__init__.py +0 -0
- {action_platform-0.3.0 → action_platform-0.4.0}/action_platform/core/release/changelog.py +0 -0
- {action_platform-0.3.0 → action_platform-0.4.0}/action_platform/core/release/components.py +0 -0
- {action_platform-0.3.0 → action_platform-0.4.0}/action_platform/core/release/deploy.py +0 -0
- {action_platform-0.3.0 → action_platform-0.4.0}/action_platform/core/scaffold/__init__.py +0 -0
- {action_platform-0.3.0 → action_platform-0.4.0}/action_platform/core/scaffold/generate.py +0 -0
- {action_platform-0.3.0 → action_platform-0.4.0}/action_platform/core/scaffold/templates.py +0 -0
- {action_platform-0.3.0 → action_platform-0.4.0}/action_platform/hooks/__init__.py +0 -0
- {action_platform-0.3.0 → action_platform-0.4.0}/action_platform/hooks/commit-msg +0 -0
- {action_platform-0.3.0 → action_platform-0.4.0}/action_platform/hooks/pre-commit +0 -0
- {action_platform-0.3.0 → action_platform-0.4.0}/action_platform/hooks/pre-push +0 -0
- {action_platform-0.3.0 → action_platform-0.4.0}/action_platform/logging.py +0 -0
- {action_platform-0.3.0 → action_platform-0.4.0}/action_platform/main.py +0 -0
- {action_platform-0.3.0 → action_platform-0.4.0}/action_platform/mcp/__init__.py +0 -0
- {action_platform-0.3.0 → action_platform-0.4.0}/action_platform/mcp/__main__.py +0 -0
- {action_platform-0.3.0 → action_platform-0.4.0}/action_platform/mcp/annotations.py +0 -0
- {action_platform-0.3.0 → action_platform-0.4.0}/action_platform/mcp/prompts.py +0 -0
- {action_platform-0.3.0 → action_platform-0.4.0}/action_platform/mcp/tools/__init__.py +0 -0
- {action_platform-0.3.0 → action_platform-0.4.0}/action_platform/mcp/tools/flow.py +0 -0
- {action_platform-0.3.0 → action_platform-0.4.0}/action_platform/mcp/tools/lifecycle.py +0 -0
- {action_platform-0.3.0 → action_platform-0.4.0}/action_platform/mcp/tools/matrix.py +0 -0
- {action_platform-0.3.0 → action_platform-0.4.0}/action_platform/mcp/tools/project.py +0 -0
- {action_platform-0.3.0 → action_platform-0.4.0}/action_platform/mcp/tools/remote.py +0 -0
- {action_platform-0.3.0 → action_platform-0.4.0}/action_platform/providers/__init__.py +0 -0
- {action_platform-0.3.0 → action_platform-0.4.0}/action_platform/providers/source/__init__.py +0 -0
- {action_platform-0.3.0 → action_platform-0.4.0}/action_platform/remote/__init__.py +0 -0
- {action_platform-0.3.0 → action_platform-0.4.0}/action_platform/remote/credentials.py +0 -0
- {action_platform-0.3.0 → action_platform-0.4.0}/action_platform/settings.py +0 -0
- {action_platform-0.3.0 → action_platform-0.4.0}/action_platform/testing/__init__.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: action-platform
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4.0
|
|
4
4
|
Summary: Your platform team, as a CLI.
|
|
5
5
|
License: Apache License
|
|
6
6
|
Version 2.0, January 2004
|
|
@@ -247,7 +247,7 @@ Project-URL: Templates, https://github.com/actionplatform/templates
|
|
|
247
247
|
Description-Content-Type: text/markdown
|
|
248
248
|
|
|
249
249
|
<p align="center">
|
|
250
|
-
<img src="https://raw.githubusercontent.com/actionplatform/action-platform/master/docs/assets/
|
|
250
|
+
<img src="https://raw.githubusercontent.com/actionplatform/action-platform/master/docs/assets/icon.svg" alt="Action Platform" width="120">
|
|
251
251
|
</p>
|
|
252
252
|
|
|
253
253
|
<p align="center">
|
|
@@ -283,6 +283,8 @@ curl -fsSL https://raw.githubusercontent.com/actionplatform/action-platform/mast
|
|
|
283
283
|
|
|
284
284
|
Installs Docker if needed, generates the secrets, starts Postgres + API + web (+ Traefik with Let's Encrypt when a domain is given) and prints the URL. Open it: first account, first organization, connect a code host — done. Files live in `/opt/action-platform`; see [`deploy/`](deploy/) for the compose file and the two Dockerfiles.
|
|
285
285
|
|
|
286
|
+
**Already on Dokploy?** Create a *Compose* service and import [`deploy/dokploy/template.b64`](deploy/dokploy/template.b64): secrets and domain are generated, Dokploy's Traefik handles TLS. → [Self-hosting](docs/self-hosting.md#dokploy)
|
|
287
|
+
|
|
286
288
|
## Or just the CLI
|
|
287
289
|
|
|
288
290
|
```bash
|
|
@@ -306,213 +308,34 @@ Thirty seconds later you have a FastAPI service with tests, lint, CI wired, a SA
|
|
|
306
308
|
|
|
307
309
|
## What you get
|
|
308
310
|
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
|
314
|
-
|
|
315
|
-
| `
|
|
316
|
-
| `library` | python, go, php, node, java, rust | packaging, version test, publish workflow |
|
|
317
|
-
| `docs` | mkdocs | Material theme, strict build in CI |
|
|
318
|
-
| `plugin` | chrome | Manifest V3, popup, background, tests, store zip |
|
|
319
|
-
| `empty` | — | `platform.toml` + code quality only |
|
|
320
|
-
|
|
321
|
-
| Cloud | Adds |
|
|
322
|
-
|-------|------|
|
|
323
|
-
| `aws/lambda` | SAM template, HTTP API, custom domain, deploy workflow, IAM policy |
|
|
324
|
-
| `aws/amplify` | `amplify.yml`, security headers, start-job workflow, IAM policy |
|
|
325
|
-
| `docker` | Dockerfile per language, compose |
|
|
326
|
-
|
|
327
|
-
| Service | Providers |
|
|
328
|
-
|---------|-----------|
|
|
329
|
-
| `postgres` | docker (local), aws-rds (Terraform/OpenTofu + SSM) |
|
|
330
|
-
|
|
331
|
-
## Commands
|
|
311
|
+
| Type | Stacks |
|
|
312
|
+
|------|--------|
|
|
313
|
+
| `web` | python (FastAPI, FastMCP), go (Gin), node (React) |
|
|
314
|
+
| `library` | python, go, php, node, java, rust |
|
|
315
|
+
| `docs` | mkdocs |
|
|
316
|
+
| `plugin` | chrome |
|
|
317
|
+
| `empty` | `platform.toml` + code quality only |
|
|
332
318
|
|
|
333
|
-
|
|
334
|
-
action-platform init # interactive: type → stack → template → name → ci
|
|
335
|
-
action-platform init web go gin --ci gitlab # direct
|
|
336
|
-
action-platform init web python --cloud docker # project + deploy overlay
|
|
337
|
-
action-platform init ... --no-push # skip creating the remote repo
|
|
338
|
-
action-platform install [--dry-run] # existing repo: platform.toml, hooks, code quality, CI — never overwrites
|
|
339
|
-
|
|
340
|
-
action-platform cloud set aws/lambda # add or switch the deploy target
|
|
341
|
-
action-platform service add postgres --provider aws-rds
|
|
342
|
-
|
|
343
|
-
action-platform branch feature 42 login # develop (or main) → pull → feature/42-login → push
|
|
344
|
-
action-platform branch hotfix PROJ-7 # from main/master
|
|
345
|
-
action-platform gitflow # audit current branch + commits; --install-hooks
|
|
346
|
-
action-platform pr [--draft] [--dry-run] # PR for the current branch: target from git-flow, body from commits
|
|
347
|
-
action-platform release patch # bump, changelog, tag, GitHub release; off main/master → X.Y.Z-rc.N pre-release
|
|
348
|
-
action-platform deploy --stage prod
|
|
349
|
-
action-platform rollback
|
|
350
|
-
action-platform diagnose
|
|
351
|
-
action-platform destroy
|
|
352
|
-
```
|
|
319
|
+
Cloud overlays `aws/lambda`, `aws/amplify`, `docker`; services `postgres` (docker, aws-rds). Every template comes with tests, lint, CI and `AGENTS.md`. → [Templates](docs/templates.md)
|
|
353
320
|
|
|
354
321
|
## Git-flow, enforced
|
|
355
322
|
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
```mermaid
|
|
359
|
-
gitGraph
|
|
360
|
-
commit id: "chore: bootstrap"
|
|
361
|
-
branch develop
|
|
362
|
-
checkout develop
|
|
363
|
-
commit id: "chore(release): 0.3.2-rc.1" tag: "v0.3.2-rc.1"
|
|
364
|
-
branch feature/42-login
|
|
365
|
-
checkout feature/42-login
|
|
366
|
-
commit id: "feat(login): form"
|
|
367
|
-
commit id: "test(login): cover form"
|
|
368
|
-
checkout develop
|
|
369
|
-
merge feature/42-login id: "PR #1 → develop"
|
|
370
|
-
branch release/0.3.2
|
|
371
|
-
checkout release/0.3.2
|
|
372
|
-
commit id: "chore(release): 0.3.2-rc.2" tag: "v0.3.2-rc.2"
|
|
373
|
-
checkout main
|
|
374
|
-
merge release/0.3.2 id: "PR #2 → main"
|
|
375
|
-
commit id: "chore(release): 0.3.2" tag: "v0.3.2"
|
|
376
|
-
checkout develop
|
|
377
|
-
merge main id: "back-merge"
|
|
378
|
-
checkout main
|
|
379
|
-
branch hotfix/PROJ-7
|
|
380
|
-
checkout hotfix/PROJ-7
|
|
381
|
-
commit id: "fix(auth): expiry"
|
|
382
|
-
checkout main
|
|
383
|
-
merge hotfix/PROJ-7 id: "PR #3 → main"
|
|
384
|
-
commit id: "chore(release): 0.3.3" tag: "v0.3.3"
|
|
385
|
-
checkout develop
|
|
386
|
-
merge main id: "back-merge hotfix"
|
|
387
|
-
```
|
|
388
|
-
|
|
389
|
-
| Branch | Starts from | Merges into | Release |
|
|
390
|
-
|--------|-------------|-------------|---------|
|
|
391
|
-
| `feature/<code>`, `bugfix/…`, `chore/…`, `docs/…`, `refactor/…`, `test/…`, `ci/…`, `perf/…` | `develop` (or the default branch when there is no `develop`) | `develop` | `X.Y.Z-rc.N` pre-release |
|
|
392
|
-
| `release/<version>` | `develop` | `main` and `develop` | `X.Y.Z-rc.N` until merged |
|
|
393
|
-
| `hotfix/<code>` | `main` | `main` and `develop` | `X.Y.Z-rc.N` until merged |
|
|
394
|
-
| `main` / `master` | — | — | stable `X.Y.Z` → PyPI / npm / … |
|
|
395
|
-
|
|
396
|
-
Rules the hooks and CI apply: branch names are `<kind>/<code>[-slug]`; commits are [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/); no direct commits on `main`, `master` or `develop` except `chore(release):`, `chore(platform):` and the bootstrap commit; a pull request may only target what the table allows.
|
|
397
|
-
|
|
398
|
-
```bash
|
|
399
|
-
action-platform branch feature 42 login # develop → pull → feature/42-login → push
|
|
400
|
-
action-platform gitflow # audit branch + commits
|
|
401
|
-
action-platform pr # target and body from the rules and the commits
|
|
402
|
-
action-platform release patch # rc off main, stable on main
|
|
403
|
-
```
|
|
404
|
-
|
|
405
|
-
Everything a project needs is declared in one file:
|
|
406
|
-
|
|
407
|
-
```toml
|
|
408
|
-
[project]
|
|
409
|
-
name = "orders"
|
|
410
|
-
type = "web"
|
|
411
|
-
stack = "python"
|
|
412
|
-
template = "fastapi"
|
|
413
|
-
ci = "github"
|
|
414
|
-
language = "python"
|
|
415
|
-
|
|
416
|
-
[source_host]
|
|
417
|
-
kind = "github"
|
|
418
|
-
repo = "acme/orders"
|
|
419
|
-
|
|
420
|
-
[deploy]
|
|
421
|
-
target = "aws/lambda"
|
|
422
|
-
|
|
423
|
-
[services]
|
|
424
|
-
postgres = "aws-rds"
|
|
425
|
-
```
|
|
426
|
-
|
|
427
|
-
## Use it from an AI client
|
|
428
|
-
|
|
429
|
-
The platform ships as an MCP server. Claude Code, Codex, Cursor — anything that speaks MCP — gets 17 tools (`list_matrix`, `init_project`, `install_platform`, `start_branch`, `gitflow_audit`, `propose_pull_request`, `release`, `deploy`, `diagnose`, …), 6 prompts that put them in the right order (`new_service`, `ship_feature`, `cut_release`, `deploy_project`, `adopt_repository`, `fix_gitflow`) and 12 skills that make the agent preview and ask before anything leaves the machine.
|
|
430
|
-
|
|
431
|
-
```bash
|
|
432
|
-
pip install "action-platform[mcp]"
|
|
433
|
-
action-platform mcp # stdio
|
|
434
|
-
action-platform mcp --http # http://127.0.0.1:8765/mcp
|
|
435
|
-
```
|
|
436
|
-
|
|
437
|
-
Claude Code:
|
|
438
|
-
|
|
439
|
-
```bash
|
|
440
|
-
/plugin marketplace add actionplatform/action-platform
|
|
441
|
-
/plugin install action-platform@action-platform
|
|
442
|
-
```
|
|
443
|
-
|
|
444
|
-
Any client — add to `.mcp.json`:
|
|
445
|
-
|
|
446
|
-
```json
|
|
447
|
-
{ "mcpServers": { "action-platform": { "command": "uvx", "args": ["--from", "action-platform[mcp]", "action-platform-mcp"] } } }
|
|
448
|
-
```
|
|
449
|
-
|
|
450
|
-
## The web app
|
|
451
|
-
|
|
452
|
-
[`apps/web`](apps/web) — Next.js on top of the Python API. **Organization › Project › App**: an organization is the tenant and owns its code hosts; a project groups the apps that ship together; an app is one git repository the platform clones, audits, releases and deploys.
|
|
453
|
-
|
|
454
|
-
- **Setup wizard** on first run: database (SQLite, PostgreSQL or MySQL), first account, first organization, code hosts.
|
|
455
|
-
- **Connect with GitHub / GitLab / Bitbucket** through OAuth (or paste a token). Tokens are encrypted at rest and refreshed when they expire.
|
|
456
|
-
- **Create project** wizard: type → stack → template → configure → review, with the equivalent `action-platform init` shown. Or add an existing repository by URL.
|
|
457
|
-
- Per app: git-flow audit, commits, branches, tags, release preview → confirm → publish, deploy preflight → confirm → ship.
|
|
458
|
-
- Strictly monochrome UI; every confirmation is an in-app dialog.
|
|
459
|
-
|
|
460
|
-
Local development:
|
|
461
|
-
|
|
462
|
-
```bash
|
|
463
|
-
pip install "action-platform[api]"
|
|
464
|
-
action-platform api --reload # http://127.0.0.1:7788, OpenAPI at /docs
|
|
465
|
-
cd apps/web && npm install && npm run dev # http://localhost:3000 → /setup
|
|
466
|
-
```
|
|
467
|
-
|
|
468
|
-
Drive a hosted platform from anywhere:
|
|
469
|
-
|
|
470
|
-
```bash
|
|
471
|
-
action-platform login https://platform.example.com # browser opens, approve the code
|
|
472
|
-
action-platform mcp --remote # the MCP tools now act on that platform
|
|
473
|
-
```
|
|
474
|
-
|
|
475
|
-
The TypeScript client is generated from the API's OpenAPI schema (`npm run api:types`): the Python response models in `action_platform/api/models.py` are the contract both sides compile against.
|
|
476
|
-
|
|
477
|
-
## Releases: three artifacts, three versions
|
|
478
|
-
|
|
479
|
-
One repository, independent versions — declared in `platform.toml`:
|
|
480
|
-
|
|
481
|
-
```toml
|
|
482
|
-
[components.web]
|
|
483
|
-
path = "apps/web"
|
|
484
|
-
|
|
485
|
-
[components.api]
|
|
486
|
-
path = "action_platform/api"
|
|
487
|
-
```
|
|
488
|
-
|
|
489
|
-
| Command | Tag | Publishes |
|
|
490
|
-
|---|---|---|
|
|
491
|
-
| `action-platform release minor` | `v0.3.0` | `action-platform` on PyPI (library + CLI) |
|
|
492
|
-
| `action-platform release -c api patch` | `api/v0.1.1` | `actionplatform/action-platform-api` image |
|
|
493
|
-
| `action-platform release -c web minor` | `web/v0.2.0` | `actionplatform/action-platform-web` image |
|
|
323
|
+
Branches are `<kind>/<code>`, commits are Conventional Commits, `main`/`develop` take no direct commits. Git hooks refuse the wrong move before it exists; CI refuses it on the pull request; the CLI and the MCP tools guide the right one. → [Git-flow](docs/git-flow.md)
|
|
494
324
|
|
|
495
|
-
|
|
325
|
+
## Documentation
|
|
496
326
|
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
api/ FastAPI for the web app: apps registry, actions, per-request credentials
|
|
510
|
-
remote/ client + device-flow login for a hosted platform
|
|
511
|
-
mcp/ MCP server: local tools, or remote tools after login
|
|
512
|
-
cli/ Typer commands
|
|
513
|
-
apps/web/ the web app (see its README)
|
|
514
|
-
deploy/ Dockerfiles, docker-compose, install.sh
|
|
515
|
-
```
|
|
327
|
+
| | |
|
|
328
|
+
|---|---|
|
|
329
|
+
| [Self-hosting](docs/self-hosting.md) | `install.sh`, compose, Dokploy, environment, upgrades, backups |
|
|
330
|
+
| [Web app](docs/web-app.md) | organizations › projects › apps, setup wizard, code hosts, creating apps, releasing and deploying from the browser |
|
|
331
|
+
| [CLI](docs/cli.md) | every command |
|
|
332
|
+
| [Git-flow](docs/git-flow.md) | branch kinds, commit format, what hooks and CI refuse |
|
|
333
|
+
| [`platform.toml`](docs/platform-toml.md) | the file that declares a project |
|
|
334
|
+
| [Templates](docs/templates.md) | the matrix and how to add to it |
|
|
335
|
+
| [MCP](docs/mcp.md) | tools and prompts for AI clients, locally or against a hosted platform |
|
|
336
|
+
| [Releases](docs/releases.md) | versions per component, tags, what each publishes |
|
|
337
|
+
| [Architecture](docs/architecture.md) | packages, the API, providers, how credentials travel |
|
|
338
|
+
| [Development](docs/development.md) | running it locally, tests, regenerating the API client |
|
|
516
339
|
|
|
517
340
|
## Extend it
|
|
518
341
|
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="https://raw.githubusercontent.com/actionplatform/action-platform/master/docs/assets/icon.svg" alt="Action Platform" width="120">
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
<p align="center">
|
|
6
|
+
<strong>Your platform team: a web app, a CLI and an MCP server on one core.</strong>
|
|
7
|
+
</p>
|
|
8
|
+
|
|
9
|
+
<p align="center">
|
|
10
|
+
<a href="https://pypi.org/project/action-platform/"><img alt="PyPI" src="https://img.shields.io/pypi/v/action-platform?color=2ea44f"></a>
|
|
11
|
+
<a href="https://pypi.org/project/action-platform/"><img alt="Python" src="https://img.shields.io/pypi/pyversions/action-platform"></a>
|
|
12
|
+
<a href="LICENSE"><img alt="License" src="https://img.shields.io/badge/license-Apache--2.0-blue"></a>
|
|
13
|
+
<a href="https://github.com/actionplatform/templates"><img alt="Templates" src="https://img.shields.io/badge/templates-13%20projects%20%C2%B7%203%20clouds-6f42c1"></a>
|
|
14
|
+
</p>
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
Every new service costs the same week: scaffold, lint config, CI, versioning, deploy pipeline, IAM. Then the next one drifts from the last. **Action Platform** turns that week into one command — or one click — and keeps every app on the same rails, in your git host and your cloud account.
|
|
19
|
+
|
|
20
|
+
Three doors, one core:
|
|
21
|
+
|
|
22
|
+
| | |
|
|
23
|
+
|---|---|
|
|
24
|
+
| **Web app** | Organizations › projects › apps. Create an app from a template, connect GitHub / GitLab / Bitbucket, cut releases, run deploys — from a browser. One command to self-host. |
|
|
25
|
+
| **CLI** | `pipx install action-platform` and the same verbs on your machine: `init`, `branch`, `pr`, `release`, `deploy`, `rollback`, `diagnose`. |
|
|
26
|
+
| **MCP server** | The same operations as tools for Claude Code, Codex, Cursor — locally, or against your hosted platform after `action-platform login`. |
|
|
27
|
+
|
|
28
|
+
## Self-host in one command
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
curl -fsSL https://raw.githubusercontent.com/actionplatform/action-platform/master/deploy/install.sh | sudo sh
|
|
32
|
+
# with a domain and TLS:
|
|
33
|
+
curl -fsSL https://raw.githubusercontent.com/actionplatform/action-platform/master/deploy/install.sh | sudo sh -s -- platform.example.com you@example.com
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Installs Docker if needed, generates the secrets, starts Postgres + API + web (+ Traefik with Let's Encrypt when a domain is given) and prints the URL. Open it: first account, first organization, connect a code host — done. Files live in `/opt/action-platform`; see [`deploy/`](deploy/) for the compose file and the two Dockerfiles.
|
|
37
|
+
|
|
38
|
+
**Already on Dokploy?** Create a *Compose* service and import [`deploy/dokploy/template.b64`](deploy/dokploy/template.b64): secrets and domain are generated, Dokploy's Traefik handles TLS. → [Self-hosting](docs/self-hosting.md#dokploy)
|
|
39
|
+
|
|
40
|
+
## Or just the CLI
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
pipx install action-platform
|
|
44
|
+
|
|
45
|
+
action-platform init web python fastapi --name "orders" --cloud aws/lambda
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Thirty seconds later you have a FastAPI service with tests, lint, CI wired, a SAM template, a least-privilege IAM policy, and a GitHub repo already pushed (`--no-push` to keep it local).
|
|
49
|
+
|
|
50
|
+
## Why teams pick it
|
|
51
|
+
|
|
52
|
+
| | |
|
|
53
|
+
|---|---|
|
|
54
|
+
| **One command, whole lifecycle** | `init` → `release` → `deploy` → `rollback` → `diagnose` → `destroy`. Same verbs for a Python API on Lambda, a Go service in Docker, a React app on Amplify. |
|
|
55
|
+
| **Templates from production, not tutorials** | Every project template is extracted from a real shipping product. Real layout, real CI, real gotchas already fixed. |
|
|
56
|
+
| **Cloud is a layer, not a fork** | Projects stay cloud-agnostic. `--cloud aws/lambda` overlays deploy files; swap to `docker` tomorrow with one command. |
|
|
57
|
+
| **Your CI, your account, your git** | Runs on GitHub Actions, GitLab CI or Jenkins you already have. Repositories on GitHub, GitLab, Bitbucket or any git server, connected with OAuth. Infra lands in **your** AWS account through OIDC — no long-lived keys, no vendor in the loop. |
|
|
58
|
+
| **Governance that ships with the code** | Git-flow and Conventional Commits enforced by git hooks before a commit exists and by CI on every PR; changelog generated; `AGENTS.md` for humans and AI agents; Trivy scans; least-privilege IAM in `requirements/`. |
|
|
59
|
+
| **Fix once, everywhere** | CI logic lives in versioned shared repos (`ci-scripts`, `ci-github`, `ci-gitlab`, `ci-jenkins`). Bump `v1`, every project picks it up. |
|
|
60
|
+
|
|
61
|
+
## What you get
|
|
62
|
+
|
|
63
|
+
| Type | Stacks |
|
|
64
|
+
|------|--------|
|
|
65
|
+
| `web` | python (FastAPI, FastMCP), go (Gin), node (React) |
|
|
66
|
+
| `library` | python, go, php, node, java, rust |
|
|
67
|
+
| `docs` | mkdocs |
|
|
68
|
+
| `plugin` | chrome |
|
|
69
|
+
| `empty` | `platform.toml` + code quality only |
|
|
70
|
+
|
|
71
|
+
Cloud overlays `aws/lambda`, `aws/amplify`, `docker`; services `postgres` (docker, aws-rds). Every template comes with tests, lint, CI and `AGENTS.md`. → [Templates](docs/templates.md)
|
|
72
|
+
|
|
73
|
+
## Git-flow, enforced
|
|
74
|
+
|
|
75
|
+
Branches are `<kind>/<code>`, commits are Conventional Commits, `main`/`develop` take no direct commits. Git hooks refuse the wrong move before it exists; CI refuses it on the pull request; the CLI and the MCP tools guide the right one. → [Git-flow](docs/git-flow.md)
|
|
76
|
+
|
|
77
|
+
## Documentation
|
|
78
|
+
|
|
79
|
+
| | |
|
|
80
|
+
|---|---|
|
|
81
|
+
| [Self-hosting](docs/self-hosting.md) | `install.sh`, compose, Dokploy, environment, upgrades, backups |
|
|
82
|
+
| [Web app](docs/web-app.md) | organizations › projects › apps, setup wizard, code hosts, creating apps, releasing and deploying from the browser |
|
|
83
|
+
| [CLI](docs/cli.md) | every command |
|
|
84
|
+
| [Git-flow](docs/git-flow.md) | branch kinds, commit format, what hooks and CI refuse |
|
|
85
|
+
| [`platform.toml`](docs/platform-toml.md) | the file that declares a project |
|
|
86
|
+
| [Templates](docs/templates.md) | the matrix and how to add to it |
|
|
87
|
+
| [MCP](docs/mcp.md) | tools and prompts for AI clients, locally or against a hosted platform |
|
|
88
|
+
| [Releases](docs/releases.md) | versions per component, tags, what each publishes |
|
|
89
|
+
| [Architecture](docs/architecture.md) | packages, the API, providers, how credentials travel |
|
|
90
|
+
| [Development](docs/development.md) | running it locally, tests, regenerating the API client |
|
|
91
|
+
|
|
92
|
+
## Extend it
|
|
93
|
+
|
|
94
|
+
Deploy targets are plugins. Implement the `DeployTarget` contract — `preflight`, `create`, `deploy`, `switch_traffic`, `rollback`, `diagnose`, `delete` — publish it under the `action_platform.deploy_target` entry-point group, and `action-platform deploy` finds it by name.
|
|
95
|
+
|
|
96
|
+
```python
|
|
97
|
+
from action_platform import ActionPlatform, Config
|
|
98
|
+
from action_platform.providers.source.github import SourceGithub
|
|
99
|
+
|
|
100
|
+
tool = ActionPlatform(config=Config(source_host=SourceGithub(repo="acme/orders")))
|
|
101
|
+
tool.release("minor")
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Templates are plain cookiecutters in [actionplatform/templates](https://github.com/actionplatform/templates). Add a stack or a cloud with a pull request — the CLI reads `index.toml`, nothing to redeploy. Point `ACTION_PLATFORM_TEMPLATES` at a local checkout while you work on them.
|
|
105
|
+
|
|
106
|
+
## Ecosystem
|
|
107
|
+
|
|
108
|
+
| Repo | Role |
|
|
109
|
+
|------|------|
|
|
110
|
+
| [templates](https://github.com/actionplatform/templates) | projects, clouds, services |
|
|
111
|
+
| [ci-scripts](https://github.com/actionplatform/ci-scripts) | the one implementation of setup / check / release / commit lint |
|
|
112
|
+
| [ci-github](https://github.com/actionplatform/ci-github) · [ci-gitlab](https://github.com/actionplatform/ci-gitlab) · [ci-jenkins](https://github.com/actionplatform/ci-jenkins) | thin wrappers per CI |
|
|
113
|
+
|
|
114
|
+
## License
|
|
115
|
+
|
|
116
|
+
Apache 2.0.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## v0.2.0 — 2026-09-13
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
- **api:** modular api/v1 with configuration, flow, branch-aware release and resilient sync
|
|
7
|
+
|
|
8
|
+
### Style
|
|
9
|
+
- ruff format api services and tests
|
|
10
|
+
|
|
11
|
+
### Chores
|
|
12
|
+
- strip comments from source, configs and workflows; nextCookies last
|
|
13
|
+
|
|
14
|
+
## v0.1.2 — 2026-09-12
|
|
15
|
+
|
|
16
|
+
## v0.1.1 — 2026-09-12
|
|
17
|
+
|
|
18
|
+
### Features
|
|
19
|
+
- **release:** --component on the CLI, MCP and API
|
|
20
|
+
- **api:** apps by git url in workspaces, init from templates, push, per-request source credentials, --reload
|
|
21
|
+
- **api:** JSON API over the core — projects registry, git-flow, commits, branches, tags, release and deploy
|
|
22
|
+
|
|
23
|
+
### Chores
|
|
24
|
+
- **platform:** declare web and api release components
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0.2.0
|
|
File without changes
|
|
File without changes
|
|
@@ -68,7 +68,6 @@ def git_auth(creds: Optional[SourceCredentials]) -> Iterator[None]:
|
|
|
68
68
|
"AP_GIT_USER": username,
|
|
69
69
|
"AP_GIT_TOKEN": creds.token,
|
|
70
70
|
"GIT_CONFIG_COUNT": "2",
|
|
71
|
-
# an empty value clears the helpers configured so far
|
|
72
71
|
"GIT_CONFIG_KEY_0": "credential.helper",
|
|
73
72
|
"GIT_CONFIG_VALUE_0": "",
|
|
74
73
|
"GIT_CONFIG_KEY_1": "credential.helper",
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
from functools import lru_cache
|
|
2
|
+
from pathlib import Path
|
|
3
|
+
|
|
4
|
+
from fastapi import Depends, HTTPException
|
|
5
|
+
|
|
6
|
+
from action_platform.api.repositories.registry import Entry, Registry
|
|
7
|
+
from action_platform.api.services.apps import AppService
|
|
8
|
+
from action_platform.api.services.configuration import ConfigurationService
|
|
9
|
+
from action_platform.api.services.flow import FlowService
|
|
10
|
+
from action_platform.api.services.git_state import GitStateService
|
|
11
|
+
from action_platform.api.services.lifecycle import LifecycleService
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@lru_cache
|
|
15
|
+
def get_registry() -> Registry:
|
|
16
|
+
return Registry()
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def get_app_service(registry: Registry = Depends(get_registry)) -> AppService:
|
|
20
|
+
return AppService(registry)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def get_git_state(registry: Registry = Depends(get_registry)) -> GitStateService:
|
|
24
|
+
return GitStateService(registry)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def get_lifecycle(registry: Registry = Depends(get_registry)) -> LifecycleService:
|
|
28
|
+
return LifecycleService(registry)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def workspace_of(registry: Registry, id: str) -> tuple[Entry, Path]:
|
|
32
|
+
entry = registry.get(id)
|
|
33
|
+
root = Path(entry.path)
|
|
34
|
+
|
|
35
|
+
if not root.is_dir():
|
|
36
|
+
raise HTTPException(410, f"{root} no longer exists")
|
|
37
|
+
|
|
38
|
+
return entry, root
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def get_flow(registry: Registry = Depends(get_registry)) -> FlowService:
|
|
42
|
+
return FlowService(registry)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
def get_configuration(
|
|
46
|
+
registry: Registry = Depends(get_registry),
|
|
47
|
+
) -> ConfigurationService:
|
|
48
|
+
return ConfigurationService(registry)
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import os
|
|
2
|
+
from pathlib import Path
|
|
3
|
+
from typing import Optional
|
|
4
|
+
|
|
5
|
+
from fastapi import FastAPI
|
|
6
|
+
from fastapi.middleware.cors import CORSMiddleware
|
|
7
|
+
from fastapi.responses import JSONResponse
|
|
8
|
+
|
|
9
|
+
from action_platform import __version__
|
|
10
|
+
from action_platform.api.core.deps import get_registry
|
|
11
|
+
from action_platform.api.v1 import router as v1
|
|
12
|
+
from action_platform.core.exception import ActionPlatformError
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def build(cors_origins: Optional[list[str]] = None) -> FastAPI:
|
|
16
|
+
app = FastAPI(title="action-platform", version=__version__)
|
|
17
|
+
get_registry.cache_clear()
|
|
18
|
+
|
|
19
|
+
if cors_origins:
|
|
20
|
+
app.add_middleware(
|
|
21
|
+
CORSMiddleware,
|
|
22
|
+
allow_origins=cors_origins,
|
|
23
|
+
allow_methods=["*"],
|
|
24
|
+
allow_headers=["*"],
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
@app.exception_handler(ActionPlatformError)
|
|
28
|
+
def _platform_error(_, exc: ActionPlatformError):
|
|
29
|
+
return JSONResponse(status_code=400, content={"detail": str(exc)})
|
|
30
|
+
|
|
31
|
+
app.include_router(v1)
|
|
32
|
+
|
|
33
|
+
return app
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def create_app() -> FastAPI:
|
|
37
|
+
origins = [o for o in os.environ.get("AP_CORS", "").split(",") if o]
|
|
38
|
+
|
|
39
|
+
return build(origins or None)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def serve(
|
|
43
|
+
host: str,
|
|
44
|
+
port: int,
|
|
45
|
+
cors_origins: Optional[list[str]] = None,
|
|
46
|
+
reload: bool = False,
|
|
47
|
+
) -> None:
|
|
48
|
+
import uvicorn
|
|
49
|
+
|
|
50
|
+
if reload:
|
|
51
|
+
os.environ["AP_CORS"] = ",".join(cors_origins or [])
|
|
52
|
+
uvicorn.run(
|
|
53
|
+
"action_platform.api.main:create_app",
|
|
54
|
+
factory=True,
|
|
55
|
+
host=host,
|
|
56
|
+
port=port,
|
|
57
|
+
reload=True,
|
|
58
|
+
reload_dirs=[str(Path(__file__).resolve().parents[1])],
|
|
59
|
+
log_level="info",
|
|
60
|
+
)
|
|
61
|
+
return
|
|
62
|
+
|
|
63
|
+
uvicorn.run(build(cors_origins), host=host, port=port, log_level="warning")
|
|
@@ -22,6 +22,11 @@ from ulid import ULID
|
|
|
22
22
|
from action_platform.core.exception import ActionPlatformError
|
|
23
23
|
from action_platform.settings import settings
|
|
24
24
|
|
|
25
|
+
|
|
26
|
+
class SyncError(ActionPlatformError):
|
|
27
|
+
pass
|
|
28
|
+
|
|
29
|
+
|
|
25
30
|
URL_RE = re.compile(r"^(https?://|git@|ssh://|file://)[^\s]+$")
|
|
26
31
|
|
|
27
32
|
|
|
@@ -141,13 +146,26 @@ class Registry:
|
|
|
141
146
|
check=True,
|
|
142
147
|
capture_output=True,
|
|
143
148
|
)
|
|
144
|
-
subprocess.run(
|
|
149
|
+
upstream = subprocess.run(
|
|
150
|
+
["git", "rev-parse", "--abbrev-ref", "--symbolic-full-name", "@{upstream}"],
|
|
151
|
+
cwd=root,
|
|
152
|
+
capture_output=True,
|
|
153
|
+
text=True,
|
|
154
|
+
)
|
|
155
|
+
|
|
156
|
+
if upstream.returncode != 0:
|
|
157
|
+
return entry
|
|
158
|
+
|
|
159
|
+
pull = subprocess.run(
|
|
145
160
|
["git", "pull", "--quiet", "--ff-only"],
|
|
146
161
|
cwd=root,
|
|
147
|
-
check=True,
|
|
148
162
|
capture_output=True,
|
|
163
|
+
text=True,
|
|
149
164
|
)
|
|
150
165
|
|
|
166
|
+
if pull.returncode != 0:
|
|
167
|
+
raise SyncError(_pull_problem(pull.stderr))
|
|
168
|
+
|
|
151
169
|
return entry
|
|
152
170
|
|
|
153
171
|
def remove(self, id: str) -> None:
|
|
@@ -161,6 +179,20 @@ class Registry:
|
|
|
161
179
|
shutil.rmtree(path, ignore_errors=True)
|
|
162
180
|
|
|
163
181
|
|
|
182
|
+
def _pull_problem(stderr: str) -> str:
|
|
183
|
+
text = stderr.strip()
|
|
184
|
+
|
|
185
|
+
if "Not possible to fast-forward" in text or "diverged" in text:
|
|
186
|
+
return (
|
|
187
|
+
"local branch diverged from its remote — rebase or reset it before syncing"
|
|
188
|
+
)
|
|
189
|
+
|
|
190
|
+
if "uncommitted changes" in text or "would be overwritten" in text:
|
|
191
|
+
return "working tree has changes that the remote would overwrite — commit them first"
|
|
192
|
+
|
|
193
|
+
return text.splitlines()[-1] if text else "git pull failed"
|
|
194
|
+
|
|
195
|
+
|
|
164
196
|
def _name_from(url: str) -> str:
|
|
165
197
|
tail = url.rstrip("/").rsplit("/", 1)[-1].rsplit(":", 1)[-1]
|
|
166
198
|
|