Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: CI

on:
push:
pull_request:

permissions:
contents: read

jobs:
backend:
runs-on: ubuntu-latest
defaults:
run:
working-directory: backend
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install dependencies
run: pip install -r requirements.txt

- name: Pytest
env:
PYTHONPATH: .
run: pytest -q

extension:
runs-on: ubuntu-latest
defaults:
run:
working-directory: extension
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: npm
cache-dependency-path: extension/package-lock.json

- name: Install and compile
run: |
npm ci
npm run compile
78 changes: 78 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: Release

on:
workflow_dispatch:
push:
tags:
- 'v*'

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: npm
cache-dependency-path: extension/package-lock.json

- name: Install, compile, package
working-directory: extension
run: |
npm ci
npm run compile
npx --yes @vscode/vsce package

- name: Upload VSIX artifact
uses: actions/upload-artifact@v4
with:
name: creer-vsix
path: extension/*.vsix
if-no-files-found: error

publish:
needs: [build]
runs-on: ubuntu-latest
steps:
- name: Download VSIX artifact
uses: actions/download-artifact@v4
with:
name: creer-vsix
path: dist

- name: Publish (Marketplace / Open VSX when tokens present)
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}
OVSX_PAT: ${{ secrets.OVSX_PAT }}
run: |
set -euo pipefail
cd dist
shopt -s nullglob
vsix=(*.vsix)
if [ ${#vsix[@]} -eq 0 ]; then
echo "No .vsix artifact found"
exit 1
fi
echo "Packaged: ${vsix[*]}"

published=false
if [ -n "${VSCE_PAT:-}" ]; then
echo "Publishing to VS Marketplace…"
npx --yes @vscode/vsce publish --packagePath "${vsix[0]}" -p "$VSCE_PAT"
published=true
fi
if [ -n "${OVSX_PAT:-}" ]; then
echo "Publishing to Open VSX…"
npx --yes ovsx publish "${vsix[0]}" -p "$OVSX_PAT"
published=true
fi
if [ "$published" = false ]; then
echo "No publish tokens configured — artifact only"
fi
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.DS_Store
*.log
.env
**/venv/
**/__pycache__/
**/node_modules/
**/out/
*.pyc
.pytest_cache/
25 changes: 25 additions & 0 deletions PLAN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Creer — Final Plan

## Done

- **v0.1** — FastAPI planner/generator + VS Code write-to-workspace (+ optional git)
- **v0.2** — Preview, GitHub create/push, templates, overwrite protection, `/creer` chat
- **v0.3** — Streaming, offline/local models, bake-ins, SecretStorage + GIT_ASKPASS
- **v0.4** — Stream cancel, selectable license/CI bake-ins, quality gates
- **v0.5** — Content diff preview before write, multi-root workspace targeting, installable JSON/YAML template packs
- **v0.6** — Pack marketplace + remote URL install/delete, side-by-side conflict diffs, publish packaging
- **v0.7** — Self-hosted pack registry (`/registry` + download), extension icon, Browse Pack Registry, release changelog
- **v0.8** — Federated registry (`/registry/federated` + peers), Browse Federated Registry UI, GitHub Actions release + CI (artifact-first; signed publish when secrets exist)

## Optional next

- Human: configure `VSCE_PAT` / `OVSX_PAT` repository secrets for signed Marketplace / Open VSX publish
- More registry peers / richer federation discovery UX

## Non-goals

- Multi-agent orchestration
- Memory graphs
- Overengineered plugin frameworks

Stay power-focused: idea → plan → files → workspace.
82 changes: 82 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# Creer

AI-powered repo scaffolding inside your workspace.

**Current version: 0.8.0**

## Architecture

```
creer/
├── backend/ # Python FastAPI AI engine (+ packs/ + registry)
├── extension/ # VS Code extension (icon in media/)
└── .github/ # CI + release workflows
```

## Quick start

```bash
# Backend
cd backend && python -m venv venv && source venv/bin/activate
pip install -r requirements.txt && cp .env.example .env
uvicorn main:app --reload --port 8000

# Extension
cd extension && npm install && npm run compile
# F5 → Creer: Create New Repo
```

## Registry & federation (v0.7–v0.8)

Self-hosted pack catalog plus optional multi-host federation:

| Method | Path | Description |
|---|---|---|
| `GET` | `/registry?q=&source=` | Searchable pack list |
| `GET` | `/registry/federated?q=&source=` | Local + peer merge |
| `GET` | `/registry/packs/{id}` | Pack metadata |
| `GET` | `/registry/packs/{id}/download` | Portable JSON pack (installable URL) |
| `GET` | `/marketplace` | Curated featured view |

Extension: **Creer: Browse Federated Registry** searches the federated catalog and installs via absolute `download_url` / `install_url`.

Install from another Creer host:

```bash
curl -X POST http://localhost:8000/packs/install \
-H 'Content-Type: application/json' \
-d '{"url":"http://other-host:8000/registry/packs/fastapi-crud/download"}'
```

Set `CREER_PUBLIC_BASE_URL` for absolute download links in registry responses.
Set `CREER_REGISTRY_PEERS` (comma-separated base URLs) for federated discovery.

## Extension commands

| Command | Title |
|---|---|
| `creer.createRepo` | Create New Repo |
| `creer.createRepoFromChat` | Create from Chat Prompt |
| `creer.browseMarketplace` | Browse Pack Marketplace |
| `creer.browseRegistry` | Browse Pack Registry |
| `creer.browseFederatedRegistry` | Browse Federated Registry |
| `creer.installPackFromUrl` | Install Pack from URL |
| `creer.setGitHubToken` / `clearGitHubToken` | SecretStorage token |

## CI & publishing

- **CI** (`.github/workflows/ci.yml`): pytest + extension compile on push/PR
- **Release** (`.github/workflows/release.yml`): tag `v*` or `workflow_dispatch` → package `.vsix` artifact; publish only when `VSCE_PAT` / `OVSX_PAT` secrets are set

See [`extension/PUBLISH.md`](extension/PUBLISH.md). Package locally:

```bash
cd extension && npm run compile && npm run package
# → creer-0.8.0.vsix (includes media/icon.png)
```

Signed Marketplace / Open VSX publish requires your own `VSCE_PAT` / `OVSX_PAT` (never commit tokens).

## License

MIT
27 changes: 27 additions & 0 deletions backend/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# OpenAI API key (required unless CREER_OFFLINE=1 or using a local server that ignores it)
OPENAI_API_KEY=sk-your-key-here

# Optional OpenAI-compatible base URL for local/offline backends (Ollama, LM Studio, vLLM, etc.)
# Example: http://127.0.0.1:11434/v1
OPENAI_BASE_URL=

# Model name (OpenAI or local-compatible)
CREER_MODEL=gpt-4o-mini

# Template-only / stub generation — never calls the LLM
# Set to 1, true, or yes to enable
CREER_OFFLINE=

# Optional extra packs directory (JSON/YAML). Merged with backend/packs;
# user packs override built-in packs on the same id.
# When set, remote installs (POST /packs/install) write here.
# When unset, installs go to backend/packs/installed/.
# CREER_PACKS_DIR=/path/to/my-packs

# Optional public base URL for absolute registry download links
# Example: http://localhost:8000 or https://creer.example.com
# CREER_PUBLIC_BASE_URL=http://localhost:8000

# Comma-separated peer Creer registry base URLs (federated discovery, v0.8)
# Example: http://127.0.0.1:8001,https://creer-packs.example.com
# CREER_REGISTRY_PEERS=
8 changes: 8 additions & 0 deletions backend/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.env
venv/
__pycache__/
*.pyc
.pytest_cache/
.mypy_cache/
packs/installed/*
!packs/installed/.gitkeep
1 change: 1 addition & 0 deletions backend/app/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""Creer backend package."""
Loading
Loading