Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
cc08b3d
feat: scaffold voltra cli package
V3RON May 27, 2026
456c1cd
feat: define cli config types
V3RON May 27, 2026
ba1ddcb
feat: add cli filesystem helpers
V3RON May 27, 2026
f7bce90
feat: add cli reporting primitives
V3RON May 27, 2026
fe3fbe5
fix: harden cli scaffold helpers
V3RON May 27, 2026
b7fd323
feat: add cli config loader
V3RON May 27, 2026
6386d21
feat: normalize cli config
V3RON May 27, 2026
48c4469
feat: add apply command shell
V3RON May 27, 2026
73319f9
feat: add cli git worktree checks
V3RON May 27, 2026
2f92153
feat: add cli state tracking helpers
V3RON May 27, 2026
077ac09
feat: add apply preflight orchestration
V3RON May 28, 2026
85f64f8
feat: add apply pipeline orchestration
V3RON May 28, 2026
f5473df
feat: add android project discovery
V3RON May 28, 2026
ae45b20
feat: add android generated file helpers
V3RON May 28, 2026
5084360
feat: add android manifest mutator
V3RON May 28, 2026
b9e18c3
feat: add android apply flow
V3RON May 28, 2026
b588e9c
feat: add ios project discovery
V3RON May 28, 2026
5d39196
feat: add ios generated file helpers
V3RON May 28, 2026
c3044f0
feat: add ios plist and entitlements mutators
V3RON May 28, 2026
e5460f0
feat: add ios podfile mutator
V3RON May 28, 2026
c9ac7e5
feat: add ios core apply flow
V3RON May 28, 2026
c583410
feat: add ios xcode project helpers
V3RON May 28, 2026
605e81a
feat: add ios widget target mutation
V3RON May 28, 2026
b8e1516
feat: integrate ios xcode mutation
V3RON May 28, 2026
33bd5e6
docs: add cli usage guide
V3RON May 28, 2026
ade95a7
fix: address cli review findings
V3RON May 28, 2026
7a0d820
fix: harden cli apply reconciliation
V3RON May 28, 2026
f4fdb63
feat: modernize cli apply ux
V3RON May 28, 2026
3034611
fix: repair ios xcode target wiring
V3RON May 28, 2026
3d133eb
feat: modernize cli apply ux
V3RON May 28, 2026
922e6bd
docs: add react native cli guide
V3RON May 29, 2026
0684cb9
chore: update comments
V3RON May 29, 2026
0764d54
fix: make Voltra platform packages optional for CLI
V3RON May 29, 2026
7f051a8
chore: reformat
V3RON May 29, 2026
8ea072e
chore: remove PLAN.md
V3RON May 29, 2026
f6e6b69
fix: harden voltra cli preflight validation
V3RON May 29, 2026
78f305b
chore: format
V3RON May 29, 2026
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
154 changes: 143 additions & 11 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

47 changes: 47 additions & 0 deletions packages/cli/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Contributing to `voltra`

This package contains the CLI used to apply Voltra to standard native React Native projects.

For the repo-wide contribution process, see the root [CONTRIBUTING.md](../../CONTRIBUTING.md).

## High-level overview

The CLI is organized around one user-facing workflow: load Voltra config, validate the target native project, apply the requested platform changes, clean up stale generated files, then report the result.

At a high level:

- `src/bin.ts` is the executable entry point.
- `src/commands/apply.ts` defines the public CLI command and translates argv into apply options.
- `src/apply/` orchestrates the end-to-end apply pipeline and preflight checks.
- `src/config/` loads and normalizes Voltra config before any platform work starts.
- `src/discovery/` resolves the native project layout for Android and iOS.
- `src/platforms/android/` and `src/platforms/ios/` contain platform-specific preflight and apply logic.
- `src/state/` tracks Voltra-owned generated files so later runs can clean up stale output safely.
- `src/reporting/` owns terminal output, errors, and apply summaries.
- `src/git/` handles git worktree checks before writes begin.
- `src/fs/` contains shared filesystem helpers used across the pipeline.

## Design intent

The package is intentionally convention-first:

- config loading happens up front
- discovery and validation fail before writes when the target project is missing or ambiguous
- platform-specific code owns native mutations
- only Voltra-owned generated files are tracked for cleanup
- terminal reporting stays separate from the mutation logic

This separation keeps the apply pipeline straightforward to reason about and makes platform behavior easier to evolve independently.

## Development notes

Useful package-local commands:

```sh
npm run build --workspace packages/cli
npm run lint --workspace packages/cli
npm run typecheck --workspace packages/cli
npm run test --workspace packages/cli
```

When changing behavior, prefer keeping orchestration in `src/apply/` and pushing platform-specific details into the relevant platform directory instead of adding cross-platform branching in many places.
43 changes: 43 additions & 0 deletions packages/cli/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
![voltra-banner](https://use-voltra.dev/voltra-baner.jpg)

### Voltra CLI for native React Native projects

[![mit licence][license-badge]][license] [![npm downloads][npm-downloads-badge]][npm-downloads] [![PRs Welcome][prs-welcome-badge]][prs-welcome]

`voltra` is the CLI package for applying Voltra to standard native React Native apps.

Use it when you are integrating Voltra into a project that owns its native iOS and Android folders directly, without relying on Expo config plugins to make those changes for you.

For installation and setup instructions, see the Voltra documentation: [use-voltra.dev](https://use-voltra.dev).

## When to use this package

- Native React Native apps that manage `ios/` and `android/` directly.
- Projects that need Voltra to wire platform-specific files and native project changes outside Expo prebuild.

If you are using Expo config plugins, start with:

- [`@use-voltra/ios-client`](../ios-client)
- [`@use-voltra/android-client`](../android-client)

## For contributors

See [CONTRIBUTING.md](./CONTRIBUTING.md) for a high-level overview of the CLI package and its internal structure.

## Authors

Voltra is an open source collaboration between [Saúl Sharma](https://github.com/saulsharma) and [Szymon Chmal](https://github.com/szymonchmal) at [Callstack][callstack-readme-with-love].

If you think it's cool, please star it 🌟. This project will always remain free to use.

[Callstack][callstack-readme-with-love] is a group of React and React Native geeks, contact us at [hello@callstack.com](mailto:hello@callstack.com) if you need any help with these or just want to say hi!

Like the project? ⚛️ [Join the Callstack team](https://callstack.com/careers/?utm_campaign=Senior_RN&utm_source=github&utm_medium=readme) who does amazing stuff for clients and drives React Native Open Source! 🔥

[callstack-readme-with-love]: https://callstack.com/?utm_source=github.com&utm_medium=referral&utm_campaign=voltra&utm_term=readme-with-love
[license-badge]: https://img.shields.io/npm/l/voltra?style=for-the-badge
[license]: https://github.com/callstackincubator/voltra/blob/main/LICENSE.txt
[npm-downloads-badge]: https://img.shields.io/npm/dm/voltra?style=for-the-badge
[npm-downloads]: https://www.npmjs.com/package/voltra
[prs-welcome-badge]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=for-the-badge
[prs-welcome]: ./CONTRIBUTING.md
Loading
Loading