# shift-js/shift-js

Swift to JavaScript transpiler

Repository: https://github.com/shift-js/shift-js
Canonical: https://ross.abutalabs.com/products/shift-js
Language: JavaScript
License Family: other
Last push: 2023-06-17T23:20:38+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 3977, "days_push": 1173, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases, no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1272, forks 50 (observed 2026-08-28T04:04:12.248262+00:00)

## What it is
Shift.JS is a Swift-to-JavaScript transpiler built in JavaScript, with a lexer, parser, and AST-based code generation via Escodegen. It ships as an npm-installable CLI that converts Swift files to JavaScript and can watch files for changes.

## Use cases
- transpile swift code to javascript
- convert a .swift file into a runnable js file
- reuse swift logic in a web browser
- watch a swift file and re-transpile on save
- learn how transpilers work via lexer and parser architecture

## When to choose
- you have simple Swift code (data types, control flow, functions) you want to run as JavaScript
- you want an npm-based CLI for Swift-to-JS conversion
- you want to study or extend a transpiler codebase

## When to avoid
- you need full Swift language or standard library support
- you need actively maintained tooling with a license and recent development
- you need iOS/native Swift compilation rather than transpilation

## Facets
- artifact type: cli-tool
- maturity: maintenance
- function: compiler, parser, cli, developer-tools
- domain: compilers, programming-languages, parsers, developer-tools, web-development
- platform: cli, cross-platform
- tags: transpiler, swift, javascript, source-to-source-compiler, ast, lexer, nodejs

## Member repositories
- shift-js/shift-js (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:12.248262+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T05:03:18.625193+00:00, confidence not recorded.
  - readme: https://github.com/shift-js/shift-js (fetched 2026-08-28T04:04:12.248262+00:00, sha 2aa5be339801)
- Data as of 2026-08-30T08:39:29.467469+00:00.
