Skip to content
Open
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
4 changes: 3 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ jobs:
cd ../starter
npm install
cd ../preview
npm install
npm install
cd ../cli
npm install
npm install -g @vscode/vsce

- name: Lint
Expand Down
2 changes: 2 additions & 0 deletions .oxlintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
"starter/**/*",
"preview/**/*",
"plugin-explorer/**/*",
"cli/dist/**/*",
"cli/node_modules/**/*",
"out/**/*",
"tests/**/*",
"resources/**/*",
Expand Down
2 changes: 2 additions & 0 deletions .vscodeignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ starter/**
!starter/build/**
preview/**
!preview/build/**
cli/**
!cli/dist/**
plugin-explorer/*.json
plugin-explorer/*.js
plugin-explorer/*.md
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
## Changelog

### Version 2.2.16

- Fix monorepo project switching re-running `npm outdated` on every switch by resolving the selected project before package processing and reusing per-project workspace cache

### Version 2.2.15

- Fix for package outdated refresh. Update dependencies.
Expand All @@ -11,6 +15,10 @@

### Version 2.2.13

- Implement standalone `wn` CLI under `cli/` (fully independent of the VS Code extension): info, run, build, sync, open, stop, devices, debug, scripts, check, packages, plugins, native, assets, release, migrate, new, integrate, generate, and config
- Port extension logic into `cli/src` (project detection, command builders, error parsers, recommendation rules, native project editors, device listing, migrations, starter templates)
- Add CLI framework with JSON envelope, exit-code contract, `--dry-run`, config precedence (`wn.json` / `~/.config/wn`), and agent skills under `cli/skill/`
- Wire `cli` into `npm run build:all`, `install:all`, CI, and `.vscodeignore`
- Angular optional migrations added to project menu
- Migration for deprecated typescript settings

Expand Down
4 changes: 4 additions & 0 deletions cli/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules/
dist/
*.tsbuildinfo
.DS_Store
56 changes: 56 additions & 0 deletions cli/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# WebNative CLI (`wn`)

Command-line interface for web and mobile app development with Capacitor, Cordova, Ionic, Angular, React, Vue, and related toolchains.

This package lives inside the [vscode-webnative](https://github.com/) repository today and is designed to be extracted to its own project later. It is **completely independent** of the VS Code extension — no shared runtime imports.

## Install / run

```bash
# From this repo during development
node cli/dist/bin.js <command> [options]

# After publish
npx wn <command> [options]
npm install --save-dev wn
```

## Quick start

```bash
wn info --json # detect project
wn check --json # recommendation engine
wn devices list --json # simulators / emulators / devices
wn run web --background --json # start dev server
wn build --prod --json
wn sync --json
wn stop --json
```

Always pass `--json` from coding agents. Stdout is a single envelope:

```json
{ "ok": true, "command": "info", "data": {}, "warnings": [], "errors": [], "durationMs": 120 }
```

Exit codes: `0` ok, `1` command failed, `2` usage, `3` no project, `4` missing tool, `5` missing input (choices in `errors[0].choices`), `6` blocking checks, `7` timeout.

## Documentation

- Full specification: [docs.md](./docs.md)
- Agent skills: [skill/README.md](./skill/README.md)

## Development

```bash
cd cli
npm install
npm run build
npm test
```

From the repo root, `npm run build:all` includes `build:cli`.

## Independence

All logic under `cli/src` is self-contained. Extension sources were copied and adapted (no `vscode` API, no `exState` globals). A later extraction can move this folder to its own repository without changing the VS Code extension.
Loading
Loading