caraer-cli 0.1.2__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.
- caraer_cli-0.1.2/.github/workflows/ci.yml +27 -0
- caraer_cli-0.1.2/.github/workflows/publish.yml +39 -0
- caraer_cli-0.1.2/.gitignore +44 -0
- caraer_cli-0.1.2/CHANGELOG.md +73 -0
- caraer_cli-0.1.2/CONTRIBUTING.md +32 -0
- caraer_cli-0.1.2/LICENSE +8 -0
- caraer_cli-0.1.2/PKG-INFO +266 -0
- caraer_cli-0.1.2/README.md +229 -0
- caraer_cli-0.1.2/SECURITY.md +13 -0
- caraer_cli-0.1.2/caraer_cli/__init__.py +4 -0
- caraer_cli-0.1.2/caraer_cli/api/__init__.py +1 -0
- caraer_cli-0.1.2/caraer_cli/api/apps.py +78 -0
- caraer_cli-0.1.2/caraer_cli/api/auth.py +53 -0
- caraer_cli-0.1.2/caraer_cli/api/client.py +179 -0
- caraer_cli-0.1.2/caraer_cli/api/functions.py +72 -0
- caraer_cli-0.1.2/caraer_cli/api/installation.py +93 -0
- caraer_cli-0.1.2/caraer_cli/api/integration_runtime.py +77 -0
- caraer_cli-0.1.2/caraer_cli/api/projects.py +213 -0
- caraer_cli-0.1.2/caraer_cli/api/sandboxes.py +29 -0
- caraer_cli-0.1.2/caraer_cli/api/webhooks.py +59 -0
- caraer_cli-0.1.2/caraer_cli/app_sync.py +697 -0
- caraer_cli-0.1.2/caraer_cli/apps_local.py +274 -0
- caraer_cli-0.1.2/caraer_cli/commands/__init__.py +1 -0
- caraer_cli-0.1.2/caraer_cli/commands/apps.py +2025 -0
- caraer_cli-0.1.2/caraer_cli/commands/auth.py +173 -0
- caraer_cli-0.1.2/caraer_cli/commands/company.py +68 -0
- caraer_cli-0.1.2/caraer_cli/commands/installation.py +182 -0
- caraer_cli-0.1.2/caraer_cli/commands/profile.py +239 -0
- caraer_cli-0.1.2/caraer_cli/commands/publish.py +40 -0
- caraer_cli-0.1.2/caraer_cli/commands/sandbox.py +92 -0
- caraer_cli-0.1.2/caraer_cli/commands/skill.py +165 -0
- caraer_cli-0.1.2/caraer_cli/commands/webhooks.py +68 -0
- caraer_cli-0.1.2/caraer_cli/completion.py +77 -0
- caraer_cli-0.1.2/caraer_cli/completion_callbacks.py +162 -0
- caraer_cli-0.1.2/caraer_cli/context.py +41 -0
- caraer_cli-0.1.2/caraer_cli/errors.py +84 -0
- caraer_cli-0.1.2/caraer_cli/formatters/__init__.py +1 -0
- caraer_cli-0.1.2/caraer_cli/formatters/output.py +381 -0
- caraer_cli-0.1.2/caraer_cli/formatters/timestamps.py +98 -0
- caraer_cli-0.1.2/caraer_cli/install_completion.py +38 -0
- caraer_cli-0.1.2/caraer_cli/local_app.py +135 -0
- caraer_cli-0.1.2/caraer_cli/main.py +104 -0
- caraer_cli-0.1.2/caraer_cli/models/__init__.py +1 -0
- caraer_cli-0.1.2/caraer_cli/models/api.py +52 -0
- caraer_cli-0.1.2/caraer_cli/project/__init__.py +17 -0
- caraer_cli-0.1.2/caraer_cli/project/app_bars_sync.py +154 -0
- caraer_cli-0.1.2/caraer_cli/project/app_manifest_template.py +68 -0
- caraer_cli-0.1.2/caraer_cli/project/inbound_sync.py +192 -0
- caraer_cli-0.1.2/caraer_cli/project/json_schemas.py +66 -0
- caraer_cli-0.1.2/caraer_cli/project/lifecycle_sync.py +119 -0
- caraer_cli-0.1.2/caraer_cli/project/local_dev.py +825 -0
- caraer_cli-0.1.2/caraer_cli/project/manifest_edit.py +51 -0
- caraer_cli-0.1.2/caraer_cli/project/marketplace_assemble.py +165 -0
- caraer_cli-0.1.2/caraer_cli/project/oauth_providers_sync.py +180 -0
- caraer_cli-0.1.2/caraer_cli/project/paths.py +102 -0
- caraer_cli-0.1.2/caraer_cli/project/pricing_sync.py +81 -0
- caraer_cli-0.1.2/caraer_cli/project/push_plan.py +590 -0
- caraer_cli-0.1.2/caraer_cli/project/release.py +128 -0
- caraer_cli-0.1.2/caraer_cli/project/scaffold.py +537 -0
- caraer_cli-0.1.2/caraer_cli/project/schedules_sync.py +170 -0
- caraer_cli-0.1.2/caraer_cli/project/schema.py +160 -0
- caraer_cli-0.1.2/caraer_cli/project/settings_sync.py +77 -0
- caraer_cli-0.1.2/caraer_cli/project/state.py +51 -0
- caraer_cli-0.1.2/caraer_cli/project/sync.py +308 -0
- caraer_cli-0.1.2/caraer_cli/project/typegen.py +278 -0
- caraer_cli-0.1.2/caraer_cli/project/validate_app.py +1215 -0
- caraer_cli-0.1.2/caraer_cli/project/webhooks_sync.py +233 -0
- caraer_cli-0.1.2/caraer_cli/resolve.py +55 -0
- caraer_cli-0.1.2/caraer_cli/skills/.gitkeep +2 -0
- caraer_cli-0.1.2/caraer_cli/state/__init__.py +1 -0
- caraer_cli-0.1.2/caraer_cli/state/config.py +148 -0
- caraer_cli-0.1.2/caraer_cli/state/session.py +98 -0
- caraer_cli-0.1.2/caraer_cli/utils.py +40 -0
- caraer_cli-0.1.2/caraer_cli/wizard/__init__.py +9 -0
- caraer_cli-0.1.2/caraer_cli/wizard/catalog.py +170 -0
- caraer_cli-0.1.2/caraer_cli/wizard/marketplace.py +350 -0
- caraer_cli-0.1.2/caraer_cli/wizard/prompts.py +99 -0
- caraer_cli-0.1.2/caraer_cli/wizard/public_app.py +519 -0
- caraer_cli-0.1.2/caraer_cli/wizard/scope_macros.py +214 -0
- caraer_cli-0.1.2/docs/app_lifecycle.md +135 -0
- caraer_cli-0.1.2/docs/backend_contract.md +134 -0
- caraer_cli-0.1.2/docs/platform_versioning.md +46 -0
- caraer_cli-0.1.2/examples/README.md +19 -0
- caraer_cli-0.1.2/examples/webhook-inbox/.env.example +7 -0
- caraer_cli-0.1.2/examples/webhook-inbox/.gitignore +4 -0
- caraer_cli-0.1.2/examples/webhook-inbox/README.md +70 -0
- caraer_cli-0.1.2/examples/webhook-inbox/caraer.json +8 -0
- caraer_cli-0.1.2/examples/webhook-inbox/src/app/app.caraer.yaml +54 -0
- caraer_cli-0.1.2/examples/webhook-inbox/src/app/functions/catch/function.caraer.json +5 -0
- caraer_cli-0.1.2/examples/webhook-inbox/src/app/functions/catch/index.js +64 -0
- caraer_cli-0.1.2/examples/webhook-inbox/src/app/functions/catch/shared.js +118 -0
- caraer_cli-0.1.2/examples/webhook-inbox/src/app/functions/clear-inbox/function.caraer.json +5 -0
- caraer_cli-0.1.2/examples/webhook-inbox/src/app/functions/clear-inbox/index.js +51 -0
- caraer_cli-0.1.2/examples/webhook-inbox/src/app/functions/clear-inbox/shared.js +118 -0
- caraer_cli-0.1.2/examples/webhook-inbox/src/app/functions/heartbeat/function.caraer.json +5 -0
- caraer_cli-0.1.2/examples/webhook-inbox/src/app/functions/heartbeat/index.js +39 -0
- caraer_cli-0.1.2/examples/webhook-inbox/src/app/functions/heartbeat/shared.js +118 -0
- caraer_cli-0.1.2/examples/webhook-inbox/src/app/functions/on-install/function.caraer.json +5 -0
- caraer_cli-0.1.2/examples/webhook-inbox/src/app/functions/on-install/index.js +46 -0
- caraer_cli-0.1.2/examples/webhook-inbox/src/app/functions/on-install/shared.js +118 -0
- caraer_cli-0.1.2/examples/webhook-inbox/src/app/functions/on-rotate/function.caraer.json +5 -0
- caraer_cli-0.1.2/examples/webhook-inbox/src/app/functions/on-rotate/index.js +10 -0
- caraer_cli-0.1.2/examples/webhook-inbox/src/app/functions/on-rotate/shared.js +118 -0
- caraer_cli-0.1.2/examples/webhook-inbox/src/app/functions/on-uninstall/function.caraer.json +5 -0
- caraer_cli-0.1.2/examples/webhook-inbox/src/app/functions/on-uninstall/index.js +10 -0
- caraer_cli-0.1.2/examples/webhook-inbox/src/app/functions/on-uninstall/shared.js +118 -0
- caraer_cli-0.1.2/examples/webhook-inbox/src/app/functions/on-update/function.caraer.json +5 -0
- caraer_cli-0.1.2/examples/webhook-inbox/src/app/functions/on-update/index.js +47 -0
- caraer_cli-0.1.2/examples/webhook-inbox/src/app/functions/on-update/shared.js +118 -0
- caraer_cli-0.1.2/examples/webhook-inbox/src/app/inbound/catch.json +8 -0
- caraer_cli-0.1.2/examples/webhook-inbox/src/app/lifecycle/install.json +8 -0
- caraer_cli-0.1.2/examples/webhook-inbox/src/app/lifecycle/rotate.json +8 -0
- caraer_cli-0.1.2/examples/webhook-inbox/src/app/lifecycle/uninstall.json +8 -0
- caraer_cli-0.1.2/examples/webhook-inbox/src/app/lifecycle/update.json +8 -0
- caraer_cli-0.1.2/examples/webhook-inbox/src/app/schedules/heartbeat.json +8 -0
- caraer_cli-0.1.2/examples/webhook-inbox/src/types/caraer.d.ts +115 -0
- caraer_cli-0.1.2/pyproject.toml +64 -0
- caraer_cli-0.1.2/schemas/app.caraer.schema.json +175 -0
- caraer_cli-0.1.2/schemas/function.caraer.schema.json +29 -0
- caraer_cli-0.1.2/schemas/inbound.caraer.schema.json +49 -0
- caraer_cli-0.1.2/schemas/lifecycle.caraer.schema.json +50 -0
- caraer_cli-0.1.2/schemas/schedule.caraer.schema.json +39 -0
- caraer_cli-0.1.2/schemas/webhook.caraer.schema.json +50 -0
- caraer_cli-0.1.2/scripts/ci.sh +7 -0
- caraer_cli-0.1.2/scripts/install.sh +51 -0
- caraer_cli-0.1.2/skills/caraer-apps/SKILL.md +172 -0
- caraer_cli-0.1.2/skills/caraer-apps/reference.md +163 -0
- caraer_cli-0.1.2/tests/contract/README.md +1 -0
- caraer_cli-0.1.2/tests/integration/README.md +1 -0
- caraer_cli-0.1.2/tests/unit/test_add_scaffolds.py +66 -0
- caraer_cli-0.1.2/tests/unit/test_app_detail.py +28 -0
- caraer_cli-0.1.2/tests/unit/test_app_manifest_yaml.py +30 -0
- caraer_cli-0.1.2/tests/unit/test_app_sync.py +94 -0
- caraer_cli-0.1.2/tests/unit/test_apps_local.py +77 -0
- caraer_cli-0.1.2/tests/unit/test_apps_wizard.py +103 -0
- caraer_cli-0.1.2/tests/unit/test_command_help.py +24 -0
- caraer_cli-0.1.2/tests/unit/test_completion.py +39 -0
- caraer_cli-0.1.2/tests/unit/test_config.py +8 -0
- caraer_cli-0.1.2/tests/unit/test_errors.py +25 -0
- caraer_cli-0.1.2/tests/unit/test_local_app.py +119 -0
- caraer_cli-0.1.2/tests/unit/test_local_dev.py +282 -0
- caraer_cli-0.1.2/tests/unit/test_manifest_edit.py +36 -0
- caraer_cli-0.1.2/tests/unit/test_marketplace_assemble.py +104 -0
- caraer_cli-0.1.2/tests/unit/test_migrate_v2.py +46 -0
- caraer_cli-0.1.2/tests/unit/test_output.py +99 -0
- caraer_cli-0.1.2/tests/unit/test_profile.py +136 -0
- caraer_cli-0.1.2/tests/unit/test_project_schema.py +154 -0
- caraer_cli-0.1.2/tests/unit/test_push_plan.py +199 -0
- caraer_cli-0.1.2/tests/unit/test_release.py +65 -0
- caraer_cli-0.1.2/tests/unit/test_require_text.py +26 -0
- caraer_cli-0.1.2/tests/unit/test_resolve.py +50 -0
- caraer_cli-0.1.2/tests/unit/test_resolve_function.py +45 -0
- caraer_cli-0.1.2/tests/unit/test_skill_install.py +32 -0
- caraer_cli-0.1.2/tests/unit/test_timestamps.py +25 -0
- caraer_cli-0.1.2/tests/unit/test_typegen.py +31 -0
- caraer_cli-0.1.2/tests/unit/test_utils.py +10 -0
- caraer_cli-0.1.2/tests/unit/test_v2_runtime_poll.py +35 -0
- caraer_cli-0.1.2/tests/unit/test_validate_app.py +180 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
name: ci
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main, master]
|
|
6
|
+
pull_request:
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
test:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
steps:
|
|
12
|
+
- uses: actions/checkout@v4
|
|
13
|
+
- uses: actions/setup-python@v5
|
|
14
|
+
with:
|
|
15
|
+
python-version: "3.10"
|
|
16
|
+
- name: Install package
|
|
17
|
+
run: |
|
|
18
|
+
python -m pip install --upgrade pip
|
|
19
|
+
pip install -e ".[dev]"
|
|
20
|
+
- name: Unit tests
|
|
21
|
+
run: pytest tests/unit -q
|
|
22
|
+
- name: Build wheel
|
|
23
|
+
run: |
|
|
24
|
+
pip install build
|
|
25
|
+
python -m build
|
|
26
|
+
- name: CLI help
|
|
27
|
+
run: caraer --help
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
name: publish
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*"
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
publish:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
environment: pypi
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v4
|
|
18
|
+
- name: Require API_TOKEN secret
|
|
19
|
+
env:
|
|
20
|
+
API_TOKEN: ${{ secrets.API_TOKEN }}
|
|
21
|
+
run: |
|
|
22
|
+
if [ -z "$API_TOKEN" ]; then
|
|
23
|
+
echo "::error::Missing secrets.API_TOKEN. Add a PyPI API token (pypi-...) as repository or 'pypi' environment secret named API_TOKEN, then re-run."
|
|
24
|
+
exit 1
|
|
25
|
+
fi
|
|
26
|
+
- uses: actions/setup-python@v5
|
|
27
|
+
with:
|
|
28
|
+
python-version: "3.12"
|
|
29
|
+
- name: Install build tools
|
|
30
|
+
run: |
|
|
31
|
+
python -m pip install --upgrade pip
|
|
32
|
+
pip install build
|
|
33
|
+
- name: Build
|
|
34
|
+
run: python -m build
|
|
35
|
+
- name: Publish to PyPI
|
|
36
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
37
|
+
with:
|
|
38
|
+
user: __token__
|
|
39
|
+
password: ${{ secrets.API_TOKEN }}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
*.egg-info/
|
|
6
|
+
.eggs/
|
|
7
|
+
dist/
|
|
8
|
+
build/
|
|
9
|
+
.pytest_cache/
|
|
10
|
+
.mypy_cache/
|
|
11
|
+
.ruff_cache/
|
|
12
|
+
.coverage
|
|
13
|
+
htmlcov/
|
|
14
|
+
.venv/
|
|
15
|
+
venv/
|
|
16
|
+
env/
|
|
17
|
+
|
|
18
|
+
# Editor / OS
|
|
19
|
+
.DS_Store
|
|
20
|
+
.idea/
|
|
21
|
+
.vscode/
|
|
22
|
+
.cursor/
|
|
23
|
+
*.swp
|
|
24
|
+
|
|
25
|
+
# Local env / secrets (never commit)
|
|
26
|
+
.env
|
|
27
|
+
.env.*
|
|
28
|
+
!.env.example
|
|
29
|
+
|
|
30
|
+
# Local CLI state (never commit)
|
|
31
|
+
.caraer/
|
|
32
|
+
*.local.json
|
|
33
|
+
*.local.yaml
|
|
34
|
+
*.local.yml
|
|
35
|
+
|
|
36
|
+
# Scratch apps created while developing the CLI itself (keep on disk, do not publish)
|
|
37
|
+
/my_public_app/
|
|
38
|
+
/my_public_app_*/
|
|
39
|
+
/my_second_cli_public_app/
|
|
40
|
+
/jan_heins_public_app/
|
|
41
|
+
/caraer_ai/
|
|
42
|
+
|
|
43
|
+
# Maintainer planning notes (not part of the public developer contract)
|
|
44
|
+
/docs/internal/
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.1.2
|
|
4
|
+
|
|
5
|
+
- Cursor Agent Skill `caraer-apps` under `skills/caraer-apps`, installable via
|
|
6
|
+
`caraer skill install` / `caraer skill install --project`
|
|
7
|
+
- JSON Schemas under `schemas/` for app / function / webhook / schedule /
|
|
8
|
+
inbound / lifecycle configs (IDE `$schema` + optional `caraer-cli[schemas]`)
|
|
9
|
+
- `caraer apps typegen` writes `src/types/caraer.d.ts` (Node) or
|
|
10
|
+
`caraer_types.py` (Python) payload helpers
|
|
11
|
+
- Example app `examples/webhook-inbox` (inbound catch → installation state)
|
|
12
|
+
- Modular marketplace files: `src/app/settings/`, `pricing/`, `app-bars/`, `lifecycle/`
|
|
13
|
+
(merged into the manifest on push; split on pull). Scaffolds:
|
|
14
|
+
`apps add-setting|add-pricing-plan|add-app-bar|add-lifecycle-hook`
|
|
15
|
+
- `apps validate` covers settings, pricing, app bars, and lifecycle hooks
|
|
16
|
+
- `apps add-setting|pricing-plan|app-bar` use wizard prompts and append to
|
|
17
|
+
`app.caraer.yaml` by default (`--modular` for separate JSON files)
|
|
18
|
+
- `apps init` always scaffolds all four lifecycle hooks + `on-*` functions
|
|
19
|
+
- Function sync includes sidecar `sourceFiles` so multi-file handlers deploy correctly
|
|
20
|
+
- Docs: [docs/app_lifecycle.md](docs/app_lifecycle.md); webhook-inbox includes all
|
|
21
|
+
lifecycle hooks (install/uninstall/rotate/update)
|
|
22
|
+
- V2 local `apps dev` matches container contract: `POST /functions/{name}`,
|
|
23
|
+
`X-Caraer-Function` header, and `body.functionName` (legacy `POST /{name}` kept)
|
|
24
|
+
- `apps dev` emulates installation state/secrets/jobs/connections + inbound routes;
|
|
25
|
+
`--invoke-schedule` fires a local schedule once
|
|
26
|
+
- `apps deploy --wait/--no-wait` polls `runtimeStatus` (same as `push --deploy`)
|
|
27
|
+
- `apps pull` aligns local `platformVersion`/`runtime` with remote and pulls
|
|
28
|
+
external OAuth providers
|
|
29
|
+
- Installation commands: `apps state|secrets|jobs|connections`
|
|
30
|
+
- `apps test` remote-invokes a function (or `--sample-only`); `apps rollback`
|
|
31
|
+
redeploys a prior READY build; `apps builds list|get`
|
|
32
|
+
- `apps logs --all` fetches app-level V2 container logs
|
|
33
|
+
- `apps validate` covers schedules, inbound routes, and OAuth providers
|
|
34
|
+
- `apps push` / `pull` sync schedules, inbound routes, and OAuth providers
|
|
35
|
+
(in addition to manifest, functions, webhooks)
|
|
36
|
+
- Local app definition is now **`src/app/app.caraer.yaml`** (legacy `app.caraer.json` still loads);
|
|
37
|
+
scaffolds include commented examples for scopes, settings, pricing, and app bars
|
|
38
|
+
- App platform **V2** (`platformVersion: 2026.2`): one async container runtime per app;
|
|
39
|
+
`apps push --deploy` polls `runtimeStatus`; `apps status` shows runtime fields
|
|
40
|
+
- Default scaffold is `2026.2`; use `--platform 2026.1` for legacy per-function Cloud Functions
|
|
41
|
+
- `caraer apps migrate-v2` — opt-in in-place V1 → V2 migration with runtime polling
|
|
42
|
+
- Collapsed local **project** into **app**: `caraer.json` replaces `caraer.project.json`;
|
|
43
|
+
opaque developer-project id lives in `.caraer/state.json`
|
|
44
|
+
- Single sync pair: `caraer apps pull` / `caraer apps push` syncs manifest, functions,
|
|
45
|
+
webhooks, schedules, inbound, and OAuth providers
|
|
46
|
+
- Removed top-level `webhooks`, `pricing`, `appbars`, and `functions` command groups
|
|
47
|
+
(edit files under `src/app/` instead)
|
|
48
|
+
- Removed `caraer apps link` and `caraer apps watch` (use `select` / `push` instead)
|
|
49
|
+
- Removed deprecated `caraer project` command group (use `caraer apps` instead)
|
|
50
|
+
- Removed `caraer config` command group (use `caraer profile` instead)
|
|
51
|
+
- Removed `caraer completion` command group; shell completion is installed by `scripts/install.sh`
|
|
52
|
+
- Public packaging polish: LICENSE, SECURITY, CONTRIBUTING; example defaults to `2026.2`
|
|
53
|
+
- Developer sandboxes clone the selected company Neo4j DB only (same company
|
|
54
|
+
identity; `X-Caraer-Sandbox-Uuid` overrides `databaseid`). Recreate sandboxes
|
|
55
|
+
after upgrading past the old clone-company model
|
|
56
|
+
(`caraer sandbox use` / `clear`)
|
|
57
|
+
- `caraer apps add-function` / `add-webhook` / `add-schedule` / `add-inbound`
|
|
58
|
+
scaffold local function folders and integration-runtime JSON files
|
|
59
|
+
- Missing required args/options prompt interactively (questionary) instead of
|
|
60
|
+
failing with Typer usage errors; non-TTY still fails clearly
|
|
61
|
+
- `caraer apps logs` prints log lines below the summary table; `--follow`
|
|
62
|
+
streams only new entries; skips unreadable Cloud Audit protobuf dumps
|
|
63
|
+
|
|
64
|
+
## 0.1.0
|
|
65
|
+
|
|
66
|
+
- Standalone `caraer-cli` package extracted from backend `clients/python`
|
|
67
|
+
- Existing app / webhook / function commands
|
|
68
|
+
- `caraer project` local project workflow (`init`, `link`, `upload`, `pull`, `watch`, `status`)
|
|
69
|
+
- Build/deploy/logs/dev commands wired to developer-project APIs
|
|
70
|
+
- `caraer functions delete`
|
|
71
|
+
- `caraer sandbox` commands
|
|
72
|
+
- Example project under `examples/webhook-inbox`
|
|
73
|
+
- CI workflow and `scripts/ci.sh`
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
This repository is the Caraer developer CLI. External contributions may be
|
|
4
|
+
limited; if you have a fix or improvement, open an issue or pull request and we
|
|
5
|
+
will review it.
|
|
6
|
+
|
|
7
|
+
## Setup
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
python3 -m venv .venv
|
|
11
|
+
source .venv/bin/activate
|
|
12
|
+
./scripts/install.sh
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Checks
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
./scripts/ci.sh
|
|
19
|
+
# or: pytest tests/unit -q
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Guidelines
|
|
23
|
+
|
|
24
|
+
- Keep the CLI thin: talk to Caraer REST APIs; do not require GCP credentials.
|
|
25
|
+
- Treat `caraer.json` + `src/app/` as a stable public contract.
|
|
26
|
+
- Prefer clear error messages over silent failures.
|
|
27
|
+
- Do not commit local scratch apps, `.caraer/` state, or `.env` files.
|
|
28
|
+
- Add unit tests for command/API behavior changes under `tests/unit/`.
|
|
29
|
+
|
|
30
|
+
## Security
|
|
31
|
+
|
|
32
|
+
Report vulnerabilities privately — see [SECURITY.md](SECURITY.md).
|
caraer_cli-0.1.2/LICENSE
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
Copyright (c) Caraer / Loyall. All rights reserved.
|
|
2
|
+
|
|
3
|
+
This software and associated documentation files (the "Software") are proprietary
|
|
4
|
+
and confidential. Unauthorized copying, modification, distribution, or use of the
|
|
5
|
+
Software, in whole or in part, is strictly prohibited except as expressly permitted
|
|
6
|
+
in a written agreement with Caraer.
|
|
7
|
+
|
|
8
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED.
|
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: caraer-cli
|
|
3
|
+
Version: 0.1.2
|
|
4
|
+
Summary: Developer CLI for Caraer apps, webhooks, and serverless functions.
|
|
5
|
+
Project-URL: Homepage, https://caraer.com
|
|
6
|
+
Project-URL: Documentation, https://developer.caraer.com
|
|
7
|
+
Author: Caraer
|
|
8
|
+
License: Proprietary
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
Keywords: apps,caraer,cli,marketplace,serverless
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Environment :: Console
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: License :: Other/Proprietary License
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Topic :: Software Development :: Build Tools
|
|
20
|
+
Requires-Python: >=3.10
|
|
21
|
+
Requires-Dist: httpx>=0.27.0
|
|
22
|
+
Requires-Dist: keyring>=25.2.1
|
|
23
|
+
Requires-Dist: platformdirs>=4.2.2
|
|
24
|
+
Requires-Dist: pydantic>=2.8.0
|
|
25
|
+
Requires-Dist: python-dotenv>=1.0.0
|
|
26
|
+
Requires-Dist: pyyaml>=6.0.1
|
|
27
|
+
Requires-Dist: questionary>=2.0.1
|
|
28
|
+
Requires-Dist: rich>=13.7.1
|
|
29
|
+
Requires-Dist: tomli>=2.0.1; python_version < '3.11'
|
|
30
|
+
Requires-Dist: typer>=0.12.3
|
|
31
|
+
Provides-Extra: dev
|
|
32
|
+
Requires-Dist: build>=1.2.1; extra == 'dev'
|
|
33
|
+
Requires-Dist: pytest>=8.3.2; extra == 'dev'
|
|
34
|
+
Provides-Extra: schemas
|
|
35
|
+
Requires-Dist: jsonschema>=4.22.0; extra == 'schemas'
|
|
36
|
+
Description-Content-Type: text/markdown
|
|
37
|
+
|
|
38
|
+
# Caraer CLI
|
|
39
|
+
|
|
40
|
+
Standalone developer CLI for Caraer app lifecycle management.
|
|
41
|
+
|
|
42
|
+
Install and use this package independently of the Caraer backend. It talks to
|
|
43
|
+
the Caraer API as a thin client — no GCP credentials are required on your machine.
|
|
44
|
+
|
|
45
|
+
## Requirements
|
|
46
|
+
|
|
47
|
+
- **Python 3.10+**
|
|
48
|
+
- A Caraer account with access to a company that can create public apps
|
|
49
|
+
|
|
50
|
+
## Install
|
|
51
|
+
|
|
52
|
+
### From PyPI
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
pipx install caraer-cli
|
|
56
|
+
# or: uv tool install caraer-cli
|
|
57
|
+
# or: pip install caraer-cli
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Publishing (maintainers): tag `v*` runs [`.github/workflows/publish.yml`](.github/workflows/publish.yml).
|
|
61
|
+
Add a PyPI API token as the `API_TOKEN` secret on the GitHub `pypi` environment
|
|
62
|
+
(or as a repository secret with the same name).
|
|
63
|
+
|
|
64
|
+
### From source (development)
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
git clone <this-repo> caraer-cli
|
|
68
|
+
cd caraer-cli
|
|
69
|
+
python3 -m venv .venv
|
|
70
|
+
source .venv/bin/activate
|
|
71
|
+
./scripts/install.sh # pip install + shell tab completion
|
|
72
|
+
# or: ./scripts/install.sh --shell zsh
|
|
73
|
+
caraer --help
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
If install fails with `requires a different Python`, create the venv with
|
|
77
|
+
`python3.10` / `python3.11` / `python3.12` explicitly.
|
|
78
|
+
|
|
79
|
+
Tab completion is installed by `scripts/install.sh`. Restart the terminal afterward.
|
|
80
|
+
|
|
81
|
+
## AI IDEs (Cursor skill)
|
|
82
|
+
|
|
83
|
+
Ship an Agent Skill so Cursor (and similar IDEs) can scaffold and validate Caraer
|
|
84
|
+
apps correctly:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
caraer skill install # ~/.cursor/skills/caraer-apps
|
|
88
|
+
caraer skill install --project # ./.cursor/skills/caraer-apps
|
|
89
|
+
caraer skill list
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Source of truth: [`skills/caraer-apps`](skills/caraer-apps). After install, start a
|
|
93
|
+
new agent chat and ask it to create or edit a Caraer app.
|
|
94
|
+
|
|
95
|
+
## Quick start
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
caraer auth login
|
|
99
|
+
# or password/CI: caraer auth login --email you@example.com
|
|
100
|
+
caraer company list
|
|
101
|
+
caraer company select <company-uuid>
|
|
102
|
+
caraer apps list
|
|
103
|
+
caraer apps select <app-uuid> # pulls the full app folder locally
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Create a new local app and push everything in one step:
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
caraer apps init --label "My App"
|
|
110
|
+
cd my_app
|
|
111
|
+
# edit src/app/app.caraer.yaml, src/app/functions/, src/app/webhooks/
|
|
112
|
+
caraer apps push --deploy # prompts for version (> previous) + release notes
|
|
113
|
+
caraer apps version # live semver + recent builds
|
|
114
|
+
caraer apps status
|
|
115
|
+
caraer apps logs # uses the only local function (or prompts)
|
|
116
|
+
caraer apps logs --all # V2 app container logs
|
|
117
|
+
caraer apps dev # local server: POST /functions/<name>
|
|
118
|
+
caraer apps test --record <uuid>
|
|
119
|
+
caraer apps state get
|
|
120
|
+
caraer apps secrets list
|
|
121
|
+
caraer apps rollback # redeploy prior READY build
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
New apps default to workspace `platformVersion: 2026.2` (App platform V2: one async
|
|
125
|
+
container runtime per app). Use `caraer apps init --platform 2026.1` only for the
|
|
126
|
+
legacy per-function Cloud Functions model. See [docs/platform_versioning.md](docs/platform_versioning.md).
|
|
127
|
+
|
|
128
|
+
`apps push` syncs the full app: marketplace manifest (including pricing + app bars),
|
|
129
|
+
functions, webhooks, schedules, inbound routes, and external OAuth providers.
|
|
130
|
+
There is no separate upload command.
|
|
131
|
+
|
|
132
|
+
Add local scaffolds inside an app folder:
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
caraer apps add-function my-action
|
|
136
|
+
caraer apps add-webhook --topic record.created --function my-action
|
|
137
|
+
caraer apps add-schedule renew-watch --function my-action --cron "0 0 */6 * * *"
|
|
138
|
+
caraer apps add-inbound gmail-push --function my-action --auth SHARED_SECRET
|
|
139
|
+
caraer apps add-setting # wizard → appends to app.caraer.yaml
|
|
140
|
+
caraer apps add-pricing-plan # wizard → appends to app.caraer.yaml
|
|
141
|
+
caraer apps add-app-bar # wizard → appends to app.caraer.yaml
|
|
142
|
+
caraer apps add-lifecycle-hook # wizard → lifecycle/*.json + function
|
|
143
|
+
caraer apps add-webhook --topic app.bar.triggered --mode HTTP --url https://example.com/hook
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
`add-setting` / `add-pricing-plan` / `add-app-bar` write into `app.caraer.yaml` by
|
|
147
|
+
default (use `--modular` for separate JSON files). Lifecycle hooks stay under
|
|
148
|
+
`src/app/lifecycle/` because they pair with function folders.
|
|
149
|
+
|
|
150
|
+
Lifecycle hooks (`install` / `uninstall` / `rotate` / `update`) and matching
|
|
151
|
+
`functions/on-*` folders are created automatically by `caraer apps init`.
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
Only the **app creator company** (or super-admin) can push builds for an app.
|
|
155
|
+
|
|
156
|
+
## Platform versions
|
|
157
|
+
|
|
158
|
+
| CLI `platformVersion` | App platform | Notes |
|
|
159
|
+
|-----------------------|--------------|-------|
|
|
160
|
+
| `2026.2` (default) | V2 | One container per app; async deploy; poll `runtimeStatus` |
|
|
161
|
+
| `2026.1` | V1 | One Cloud Function per serverless function (legacy) |
|
|
162
|
+
|
|
163
|
+
Migrate an existing V1 app in place with:
|
|
164
|
+
|
|
165
|
+
```bash
|
|
166
|
+
caraer apps migrate-v2 [--runtime nodejs22|python312]
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
This provisions the shared container, keeps webhook delivery on legacy function URLs
|
|
170
|
+
until `runtimeStatus=READY`, then updates local `caraer.json` to `2026.2`.
|
|
171
|
+
|
|
172
|
+
## Command groups
|
|
173
|
+
|
|
174
|
+
- `auth` / `company` / `profile` — session and profiles
|
|
175
|
+
- `apps` — local folder lifecycle + full sync (`pull` / `push`), builds, logs, local dev
|
|
176
|
+
- `webhooks` — formats, events, and test helpers
|
|
177
|
+
- `publish` — submit / status for marketplace review
|
|
178
|
+
- `sandbox` — clone the company Neo4j DB (same company; `X-Caraer-Sandbox-Uuid` overrides `databaseid`)
|
|
179
|
+
|
|
180
|
+
## Local app layout
|
|
181
|
+
|
|
182
|
+
```text
|
|
183
|
+
my_app/
|
|
184
|
+
caraer.json # workspace metadata (platformVersion, appUuid, …)
|
|
185
|
+
src/app/
|
|
186
|
+
app.caraer.yaml # identity, auth, OAuth, settings, pricing, app bars
|
|
187
|
+
lifecycle/*.json # install|uninstall|rotate|update hooks
|
|
188
|
+
functions/<name>/ # function.caraer.json + entry source
|
|
189
|
+
webhooks/*.json # one webhook definition per file
|
|
190
|
+
schedules/*.json # cron → function (integration runtime)
|
|
191
|
+
inbound/*.json # public inbound routes → function
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
`add-setting` / `add-pricing-plan` / `add-app-bar` append to `app.caraer.yaml`.
|
|
195
|
+
Optional modular JSON files (`settings/`, `pricing/`, `app-bars/`) still merge on
|
|
196
|
+
push when present (`--modular`). `apps init` always creates all four lifecycle
|
|
197
|
+
hooks + `on-*` functions. See [docs/app_lifecycle.md](docs/app_lifecycle.md).
|
|
198
|
+
|
|
199
|
+
See [`examples/webhook-inbox`](examples/webhook-inbox) for a minimal sample
|
|
200
|
+
(inbound route, settings, lifecycle, app bar).
|
|
201
|
+
|
|
202
|
+
## Profiles
|
|
203
|
+
|
|
204
|
+
Config lives in the user config dir (`config.toml`). Defaults include `dev`,
|
|
205
|
+
`staging`, and `prod`.
|
|
206
|
+
|
|
207
|
+
```bash
|
|
208
|
+
caraer profile list
|
|
209
|
+
caraer profile use staging
|
|
210
|
+
caraer profile set --base-url https://api.caraer.com --output json
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
Override the active profile for a single command with `--profile <name>`.
|
|
214
|
+
|
|
215
|
+
For local API development against a running backend:
|
|
216
|
+
|
|
217
|
+
```bash
|
|
218
|
+
caraer profile set --base-url http://localhost:8080
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
## Developer sandboxes
|
|
222
|
+
|
|
223
|
+
Create a Neo4j DB clone of the selected company, then activate it per request.
|
|
224
|
+
Company identity stays the same; only the Neo4j `databaseid` is overridden:
|
|
225
|
+
|
|
226
|
+
```bash
|
|
227
|
+
caraer company select <owner-company-uuid>
|
|
228
|
+
caraer sandbox create --name my-test
|
|
229
|
+
caraer sandbox list
|
|
230
|
+
caraer sandbox use <sandbox-uuid> # same company; sends X-Caraer-Sandbox-Uuid
|
|
231
|
+
# … test against the clone DB …
|
|
232
|
+
caraer sandbox clear # back to the company production database
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
Each company may have at most **3** active sandboxes. After a backend deploy that
|
|
236
|
+
changed the sandbox model, recreate sandboxes (old clone-company sandboxes are invalid).
|
|
237
|
+
|
|
238
|
+
Sandboxes isolate **Neo4j data only** — function runtime code is still shared with
|
|
239
|
+
production. Prefer `caraer apps push --dry-run` to preview changes, and treat
|
|
240
|
+
`--target sandbox` as a data sandbox, not a separate code environment.
|
|
241
|
+
|
|
242
|
+
## Documentation
|
|
243
|
+
|
|
244
|
+
- [Platform versioning](docs/platform_versioning.md) — V1 vs V2 runtime model
|
|
245
|
+
- [Backend contract](docs/backend_contract.md) — REST endpoints used by the CLI
|
|
246
|
+
- [Changelog](CHANGELOG.md)
|
|
247
|
+
- [Security](SECURITY.md)
|
|
248
|
+
- Cursor skill: [`skills/caraer-apps`](skills/caraer-apps) (`caraer skill install`)
|
|
249
|
+
|
|
250
|
+
## Related
|
|
251
|
+
|
|
252
|
+
- API / platform: Caraer backend
|
|
253
|
+
- Docs site: https://developer.caraer.com
|
|
254
|
+
- Example app: [`examples/webhook-inbox`](examples/webhook-inbox)
|
|
255
|
+
|
|
256
|
+
## Development / CI
|
|
257
|
+
|
|
258
|
+
```bash
|
|
259
|
+
./scripts/ci.sh
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
GitHub Actions workflow: `.github/workflows/ci.yml`
|
|
263
|
+
|
|
264
|
+
## License
|
|
265
|
+
|
|
266
|
+
Proprietary — see [LICENSE](LICENSE).
|