overengineeringstudio / overengineeringstudio/effect-utils
Genie: typed TS steps for CI workflows to replace bash string concatenation
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 82
- Forks
- 2
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 121
Description
Problem
CI workflow genie files (ci.yml.genie.ts) currently construct bash scripts via TS string arrays/template literals. This is error-prone and hard to maintain:
${}clashes between TS template literals and bash variable expansion- Quote escaping (e.g.
'"'"'inside grep patterns) - Fragile text extraction (grep-based URL parsing,
PIPESTATUShandling) - No IDE support inside bash strings
- None of the CI step logic is testable
Example — runVercelDeploy in schickling.dev builds a 12-line bash script via [].join('\n') to run a devenv task, capture output, extract a URL via grep, and write to $GITHUB_ENV.
Proposed approach
Two complementary pieces:
1. @overeng/ci-helpers runtime library
Typed primitives for common CI operations that step scripts import:
GitHubActions.fromEnv()— read event JSON,setEnv(),setOutput(),addPath(), annotationsexec()— subprocess with stdout capture, tee, exit code- Domain helpers (e.g. Vercel URL extraction)
2. tsStep helper in genie's github-workflow generator
Thin helper that codifies the convention of referencing a TS module from a workflow step:
tsStep({
name: 'Deploy',
module: '.github/ci/deploy.ts',
env: { DEPLOY_TASK: '...', VERCEL_TOKEN: '${{ secrets.VERCEL_TOKEN }}' },
})
// → generates: { name: 'Deploy', shell: 'bash', env: {...}, run: 'bun .github/ci/deploy.ts' }
Optional: genie's validate() hook checks that the referenced module exists.
Result
Step logic lives in real .ts files with full IDE support and testability. The genie file stays focused on workflow structure (jobs, triggers, permissions, step ordering). The boundary is explicit — genie owns the shape, TS modules own the runtime logic.
This issue was created on behalf of @schickling by Claude Code.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the ci.yml.genie.ts workflow generators and the runVercelDeploy example in schickling.dev, then review the proposed @overeng/ci-helpers and tsStep boundaries. Done means common CI operations have typed TypeScript primitives, workflow steps can reference TS modules with their environment, and step logic is testable outside bash strings.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- bash, bun, github-actions, typescript
- Domain
- ci-cd, developer-experience, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100