Skip to content
This repository was archived by the owner on Feb 24, 2026. It is now read-only.

Commit 8f9372b

Browse files
committed
Initial OSS split: agenticflow CLI repo with Python package, Node wrapper, and release workflows
0 parents  commit 8f9372b

33 files changed

+105809
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: ci
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: [main]
7+
tags-ignore:
8+
- "py-v*"
9+
- "npm-v*"
10+
11+
jobs:
12+
python-tests:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
18+
- name: Setup Python
19+
uses: actions/setup-python@v5
20+
with:
21+
python-version: "3.12"
22+
23+
- name: Install package
24+
run: |
25+
python -m pip install --upgrade pip
26+
python -m pip install -e ".[dev]"
27+
28+
- name: Run unit tests
29+
run: |
30+
pytest -q tests/unit
31+
32+
node-wrapper-smoke:
33+
runs-on: ubuntu-latest
34+
needs: python-tests
35+
steps:
36+
- name: Checkout
37+
uses: actions/checkout@v4
38+
39+
- name: Setup Python
40+
uses: actions/setup-python@v5
41+
with:
42+
python-version: "3.12"
43+
44+
- name: Setup Node
45+
uses: actions/setup-node@v4
46+
with:
47+
node-version: "20"
48+
49+
- name: Install python package
50+
run: |
51+
python -m pip install --upgrade pip
52+
python -m pip install -e .
53+
54+
- name: Smoke test node wrapper
55+
run: |
56+
node ./bin/agenticflow.js --help
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: release-node
2+
3+
on:
4+
push:
5+
tags:
6+
- "npm-v*"
7+
workflow_dispatch:
8+
inputs:
9+
version_tag:
10+
description: "Node tag (npm-vX.Y.Z)"
11+
required: true
12+
type: string
13+
14+
permissions:
15+
contents: write
16+
id-token: write
17+
18+
jobs:
19+
publish:
20+
runs-on: ubuntu-latest
21+
environment: npm
22+
steps:
23+
- name: Checkout
24+
uses: actions/checkout@v4
25+
26+
- name: Setup Node
27+
uses: actions/setup-node@v4
28+
with:
29+
node-version: "22"
30+
registry-url: "https://registry.npmjs.org"
31+
32+
- name: Validate tag and sync package version
33+
id: meta
34+
shell: bash
35+
run: |
36+
set -euo pipefail
37+
if [[ "${GITHUB_EVENT_NAME}" == "workflow_dispatch" ]]; then
38+
TAG="${{ inputs.version_tag }}"
39+
else
40+
TAG="${GITHUB_REF_NAME}"
41+
fi
42+
if [[ ! "${TAG}" =~ ^npm-v([0-9]+\.[0-9]+\.[0-9]+)$ ]]; then
43+
echo "Expected npm-vX.Y.Z, got: ${TAG}" >&2
44+
exit 1
45+
fi
46+
VERSION="${BASH_REMATCH[1]}"
47+
npm version "${VERSION}" --no-git-tag-version
48+
echo "tag=${TAG}" >> "$GITHUB_OUTPUT"
49+
echo "version=${VERSION}" >> "$GITHUB_OUTPUT"
50+
51+
- name: Ensure npm supports trusted publishing
52+
run: |
53+
npm i -g npm@11.5.1
54+
npm --version
55+
56+
- name: Pack npm artifact
57+
run: |
58+
npm pack
59+
60+
- name: Upload release artifacts
61+
uses: softprops/action-gh-release@v2
62+
with:
63+
tag_name: ${{ steps.meta.outputs.tag }}
64+
name: AgenticFlow CLI Node Wrapper v${{ steps.meta.outputs.version }}
65+
generate_release_notes: true
66+
files: |
67+
*.tgz
68+
69+
- name: Publish to npm (Trusted Publishing)
70+
run: |
71+
npm publish --access public
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: release-python
2+
3+
on:
4+
push:
5+
tags:
6+
- "py-v*"
7+
workflow_dispatch:
8+
inputs:
9+
version_tag:
10+
description: "Python tag (py-vX.Y.Z)"
11+
required: true
12+
type: string
13+
14+
permissions:
15+
contents: write
16+
17+
jobs:
18+
publish:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v4
23+
24+
- name: Setup Python
25+
uses: actions/setup-python@v5
26+
with:
27+
python-version: "3.12"
28+
29+
- name: Validate tag
30+
id: meta
31+
shell: bash
32+
run: |
33+
set -euo pipefail
34+
if [[ "${GITHUB_EVENT_NAME}" == "workflow_dispatch" ]]; then
35+
TAG="${{ inputs.version_tag }}"
36+
else
37+
TAG="${GITHUB_REF_NAME}"
38+
fi
39+
if [[ ! "${TAG}" =~ ^py-v([0-9]+\.[0-9]+\.[0-9]+)$ ]]; then
40+
echo "Expected py-vX.Y.Z, got: ${TAG}" >&2
41+
exit 1
42+
fi
43+
echo "tag=${TAG}" >> "$GITHUB_OUTPUT"
44+
echo "version=${BASH_REMATCH[1]}" >> "$GITHUB_OUTPUT"
45+
46+
- name: Install build tooling
47+
run: |
48+
python -m pip install --upgrade pip
49+
python -m pip install build twine
50+
51+
- name: Build distributions
52+
run: |
53+
python -m build
54+
55+
- name: Check distributions
56+
run: |
57+
twine check dist/*
58+
59+
- name: Upload release artifacts
60+
uses: softprops/action-gh-release@v2
61+
with:
62+
tag_name: ${{ steps.meta.outputs.tag }}
63+
name: AgenticFlow CLI Python v${{ steps.meta.outputs.version }}
64+
generate_release_notes: true
65+
files: |
66+
dist/*
67+
68+
- name: Publish to PyPI
69+
if: ${{ secrets.PYPI_API_TOKEN != '' }}
70+
env:
71+
TWINE_USERNAME: __token__
72+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
73+
run: |
74+
twine upload dist/*

.gitignore

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
.DS_Store
2+
__pycache__/
3+
*.py[cod]
4+
.pytest_cache/
5+
.venv/
6+
venv/
7+
env/
8+
.env
9+
.env.*
10+
.agenticflow/
11+
dist/
12+
build/
13+
*.egg-info/
14+
node_modules/
15+
*.tgz
16+
*.log

CONTRIBUTING.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Contributing
2+
3+
## Setup
4+
5+
```bash
6+
python3 -m venv .venv
7+
source .venv/bin/activate
8+
pip install -e ".[dev]"
9+
```
10+
11+
## Test
12+
13+
```bash
14+
pytest -q tests/unit
15+
```
16+
17+
## Standards
18+
19+
- Keep CLI output machine-readable where `--json` is supported.
20+
- Never print secrets in logs or command output.
21+
- Keep auth model API-key/profile based (`AGENTICFLOW_PUBLIC_API_KEY`).

0 commit comments

Comments
 (0)