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
85 changes: 85 additions & 0 deletions docs/resources/(resources)/fastlane/fastlane-project.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
---
title: fastlane-project
description: A reference page for the fastlane-project resource
---

The fastlane-project resource manages **per-project** fastlane initialization — the equivalent of
running `fastlane init` in a project directory. It writes `fastlane/Appfile` (app identifier,
credentials, and team info) and `fastlane/Fastfile` (your lane definitions) under the target
directory. Use it alongside the [`fastlane`](/docs/resources/fastlane/fastlane) resource, which
handles installing the fastlane CLI itself.

## Parameters

- **directory**: *(string, required)* Path to the project directory. Configuration is written to:
- `<directory>/fastlane/Appfile`
- `<directory>/fastlane/Fastfile`

- **appIdentifier**: *(string, optional)* iOS bundle identifier or Android package name, written as
`app_identifier` in the Appfile.

- **appleId**: *(string, optional)* Apple ID email used to authenticate with App Store Connect,
written as `apple_id` in the Appfile.

- **teamId**: *(string, optional)* Apple Developer Portal team ID, written as `team_id` in the
Appfile.

- **itcTeamId**: *(string, optional)* App Store Connect team ID, only needed if it differs from
`teamId`. Written as `itc_team_id` in the Appfile.

- **jsonKeyFile**: *(string, optional)* Path to the Google Play service account JSON key file,
written as `json_key_file` in the Appfile.

- **fastfile**: *(string, optional)* Raw Ruby content for `fastlane/Fastfile` — defines your lanes
(e.g. lanes calling `build_app`, `upload_to_app_store`, `gradle`, `upload_to_play_store`). Defaults
to a minimal starter lane if not provided.

## Example usage

### iOS App Store release lane

```json title="codify.jsonc"
[
{
"type": "fastlane-project",
"directory": "~/projects/my-ios-app",
"appIdentifier": "com.company.myiosapp",
"appleId": "developer@company.com",
"teamId": "ABCDE12345",
"fastfile": "default_platform(:ios)\n\nplatform :ios do\n lane :release do\n build_app(scheme: \"MyApp\")\n upload_to_app_store(\n api_key_path: \"fastlane/api_key.json\",\n skip_metadata: true,\n skip_screenshots: true,\n submit_for_review: false\n )\n end\nend\n",
"os": ["macOS"]
}
]
```

### Android Play Store release setup

```json title="codify.jsonc"
[
{
"type": "fastlane"
},
{
"type": "fastlane-project",
"directory": "~/projects/my-android-app",
"appIdentifier": "com.company.myandroidapp",
"jsonKeyFile": "~/projects/my-android-app/play-store-key.json",
"fastfile": "default_platform(:android)\n\nplatform :android do\n lane :deploy do\n gradle(task: \"bundle\", build_type: \"Release\")\n upload_to_play_store(track: \"production\")\n end\nend\n",
"dependsOn": ["fastlane"]
}
]
```

## Notes

- The `fastlane` resource must be applied before `fastlane-project` (it declares a dependency
automatically).
- Multiple `fastlane-project` entries can coexist — each unique `directory` is a separate resource
instance, useful for monorepos with several apps.
- Rather than driving the interactive `fastlane init` wizard (which is known to be unreliable in
non-interactive/CI environments), this resource writes the `Appfile` and `Fastfile` directly,
giving full declarative control over their contents.
- Destroying a `fastlane-project` resource removes the entire `<directory>/fastlane` folder,
including any metadata or screenshots fastlane itself may have added there.
- The `fastfile` parameter manages the entire file — treat it as the single source of truth for your
lanes rather than editing it by hand.
59 changes: 59 additions & 0 deletions docs/resources/(resources)/fastlane/fastlane.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
---
title: fastlane
description: A reference page for the fastlane resource
---

The fastlane resource installs [fastlane](https://docs.fastlane.tools/) — the open-source automation
tool for building, signing, testing, and releasing iOS and Android apps. It handles installation via
Homebrew on macOS and RubyGems on Linux. Use it alongside the
[`fastlane-project`](/docs/resources/fastlane/fastlane-project) resource, which configures fastlane
within a specific project directory.

## Parameters

- **version**: *(string, optional)* Specific fastlane version to install (e.g. `"2.223.1"`). On Linux
this pins the gem version installed via `gem install`. On macOS, Homebrew always installs its
latest available formula version, so this field is informational only there.

## Example usage

### Install a pinned fastlane version

```json title="codify.jsonc"
[
{
"type": "fastlane",
"version": "2.223.1"
}
]
```

### Install fastlane and initialize a project

```json title="codify.jsonc"
[
{
"type": "fastlane"
},
{
"type": "fastlane-project",
"directory": "~/projects/my-app",
"appIdentifier": "com.company.myapp",
"dependsOn": ["fastlane"]
}
]
```

## Notes

- **Ruby prerequisite**: fastlane requires Ruby 3.0 or newer (fastlane recommends 3.3+). Before
installing, this resource checks for `ruby -v` on the system. If Ruby is missing or older than
3.0, apply fails with an error recommending the [`rbenv`](/docs/resources/ruby/rbenv) resource in
this plugin to install and manage a compatible Ruby version. fastlane's own docs discourage using
the macOS system Ruby, so a user-managed Ruby (via rbenv or similar) is the expected setup.
- **macOS**: installed via Homebrew (`brew install fastlane`), which bundles its own Ruby dependency.
- **Linux**: no apt/dnf package exists for fastlane, so it is installed via `gem install fastlane`
against whatever Ruby is on the PATH. `build-essential` is installed first since some fastlane
dependencies (e.g. nokogiri) compile native extensions.
- Uninstalling this resource removes the fastlane binary/gem but leaves any per-project
`fastlane-project` configuration untouched.
7 changes: 7 additions & 0 deletions docs/resources/(resources)/fastlane/meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"title": "Fastlane",
"pages": [
"fastlane",
"fastlane-project"
]
}
4 changes: 4 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import { AsdfPluginResource } from './resources/asdf/asdf-plugin.js';
import { AwsCliResource } from './resources/aws-cli/cli/aws-cli.js';
import { AwsProfileResource } from './resources/aws-cli/profile/aws-profile.js';
import { DnfResource } from './resources/dnf/dnf.js';
import { FastlaneResource } from './resources/fastlane/fastlane.js';
import { FastlaneProjectResource } from './resources/fastlane/fastlane-project.js';
import { GoenvResource } from './resources/go/goenv/goenv.js';
import { DockerResource } from './resources/docker/docker.js';
import { EnvFileResource } from './resources/file/env-file/env-file-resource.js';
Expand Down Expand Up @@ -159,6 +161,8 @@ runPlugin(Plugin.create(
new SyncthingDeviceResource(),
new SyncthingFolderResource(),
new RbenvResource(),
new FastlaneResource(),
new FastlaneProjectResource(),
new OpenClawResource(),
new RustResource(),
new GithubCliResource(),
Expand Down
Loading