@maccesar/titools 5.3.0 → 5.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/CONTRIBUTING.md +1 -1
  2. package/README.md +31 -60
  3. package/agents/ti-pro.md +3 -1
  4. package/commands/ti-audit.md +6 -4
  5. package/docs/examples.md +9 -0
  6. package/docs/knowledge-index.md +2 -1
  7. package/lib/config.js +1 -0
  8. package/package.json +1 -1
  9. package/skills/alloy-guides/SKILL.md +18 -179
  10. package/skills/alloy-guides/references/CLI_TASKS.md +17 -216
  11. package/skills/alloy-guides/references/CONCEPTS.md +27 -162
  12. package/skills/alloy-guides/references/CONTROLLERS.md +38 -236
  13. package/skills/alloy-guides/references/MODELS.md +47 -723
  14. package/skills/alloy-guides/references/MODELS_ADVANCED.md +21 -482
  15. package/skills/alloy-guides/references/VIEWS_DYNAMIC.md +12 -222
  16. package/skills/alloy-guides/references/VIEWS_STYLES.md +39 -358
  17. package/skills/alloy-guides/references/VIEWS_XML.md +36 -552
  18. package/skills/alloy-guides/references/WIDGETS.md +49 -127
  19. package/skills/alloy-howtos/SKILL.md +14 -169
  20. package/skills/alloy-howtos/references/best_practices.md +9 -113
  21. package/skills/alloy-howtos/references/cli_reference.md +18 -223
  22. package/skills/alloy-howtos/references/config_files.md +50 -133
  23. package/skills/alloy-howtos/references/debugging_troubleshooting.md +19 -63
  24. package/skills/alloy-howtos/references/samples.md +21 -138
  25. package/skills/ti-api/SKILL.md +10 -2
  26. package/skills/ti-api/references/api-android.md +36 -2
  27. package/skills/ti-api/references/api-app-platform.md +39 -3
  28. package/skills/ti-api/references/api-core.md +50 -18
  29. package/skills/ti-api/references/api-data-network.md +49 -35
  30. package/skills/ti-api/references/api-media.md +45 -27
  31. package/skills/ti-api/references/api-services.md +39 -9
  32. package/skills/ti-api/references/api-ui-android.md +33 -13
  33. package/skills/ti-api/references/api-ui-extras.md +41 -15
  34. package/skills/ti-api/references/api-ui-ios-animator.md +42 -26
  35. package/skills/ti-api/references/api-ui-ios.md +74 -2
  36. package/skills/ti-api/references/api-ui-lists.md +32 -16
  37. package/skills/ti-api/references/api-ui-text-input.md +34 -17
  38. package/skills/ti-api/references/api-ui-views.md +27 -1
  39. package/skills/ti-api/references/api-ui-windows-navigation.md +32 -18
  40. package/skills/ti-api/references/api-xml-global.md +66 -16
  41. package/skills/ti-create-release/SKILL.md +98 -0
  42. package/skills/ti-create-release/references/module-discovery.md +69 -0
  43. package/skills/ti-expert/references/adaptive-layouts.md +1 -1
  44. package/skills/ti-guides/SKILL.md +37 -76
  45. package/skills/ti-guides/references/advanced-data-and-images.md +122 -126
  46. package/skills/ti-guides/references/android-manifest.md +24 -83
  47. package/skills/ti-guides/references/app-distribution.md +31 -377
  48. package/skills/ti-guides/references/application-frameworks.md +127 -335
  49. package/skills/ti-guides/references/cli-reference.md +184 -633
  50. package/skills/ti-guides/references/commonjs-advanced.md +81 -231
  51. package/skills/ti-guides/references/compatibility-matrix.md +36 -75
  52. package/skills/ti-guides/references/hello-world.md +95 -70
  53. package/skills/ti-guides/references/hyperloop-native-access.md +52 -448
  54. package/skills/ti-guides/references/resources.md +174 -142
  55. package/skills/ti-guides/references/sdk-release-notes.md +28 -71
  56. package/skills/ti-guides/references/tiapp-config.md +222 -598
  57. package/skills/ti-howtos/SKILL.md +23 -123
  58. package/skills/ti-howtos/references/cross-platform-development.md +119 -324
  59. package/skills/ti-howtos/references/debugging-profiling.md +77 -445
  60. package/skills/ti-howtos/references/extending-titanium.md +199 -673
  61. package/skills/ti-howtos/references/local-data-sources.md +87 -300
  62. package/skills/ti-howtos/references/location-and-maps.md +86 -213
  63. package/skills/ti-howtos/references/media-apis.md +103 -223
  64. package/skills/ti-howtos/references/notification-services.md +86 -506
  65. package/skills/ti-howtos/references/remote-data-sources.md +97 -316
  66. package/skills/ti-howtos/references/using-modules.md +77 -133
  67. package/skills/ti-ui/SKILL.md +28 -143
  68. package/skills/ti-ui/references/icons-and-splash-screens.md +74 -403
  69. package/skills/ti-ui/references/layouts-and-positioning.md +175 -402
  70. package/skills/ti-ui/references/listviews-and-performance.md +100 -703
  71. package/skills/ti-ui/references/platform-conventions.md +180 -0
  72. package/skills/ti-ui/references/user-interface.md +43 -0
  73. package/skills/alloy-guides/references/VIEWS_WITHOUT_CONTROLLERS.md +0 -102
  74. package/skills/alloy-howtos/references/custom_tags.md +0 -148
  75. package/skills/ti-guides/references/coding-best-practices.md +0 -149
  76. package/skills/ti-guides/references/javascript-primer.md +0 -414
  77. package/skills/ti-guides/references/reserved-words.md +0 -36
  78. package/skills/ti-guides/references/style-and-conventions.md +0 -103
  79. package/skills/ti-howtos/references/android-platform-deep-dives.md +0 -624
  80. package/skills/ti-howtos/references/automation-fastlane-appium.md +0 -96
  81. package/skills/ti-howtos/references/buffer-codec-streams.md +0 -162
  82. package/skills/ti-howtos/references/google-maps-v2.md +0 -172
  83. package/skills/ti-howtos/references/ios-map-kit.md +0 -149
  84. package/skills/ti-howtos/references/ios-platform-deep-dives.md +0 -611
  85. package/skills/ti-howtos/references/tutorials.md +0 -565
  86. package/skills/ti-howtos/references/web-content-integration.md +0 -287
  87. package/skills/ti-howtos/references/webpack-build-pipeline.md +0 -124
  88. package/skills/ti-ui/references/accessibility-deep-dive.md +0 -288
  89. package/skills/ti-ui/references/animation-and-matrices.md +0 -569
  90. package/skills/ti-ui/references/application-structures.md +0 -626
  91. package/skills/ti-ui/references/custom-fonts-styling.md +0 -549
  92. package/skills/ti-ui/references/event-handling.md +0 -401
  93. package/skills/ti-ui/references/gestures.md +0 -448
  94. package/skills/ti-ui/references/orientation.md +0 -374
  95. package/skills/ti-ui/references/platform-ui-android.md +0 -727
  96. package/skills/ti-ui/references/platform-ui-ios.md +0 -576
  97. package/skills/ti-ui/references/scrolling-views.md +0 -288
  98. package/skills/ti-ui/references/tableviews.md +0 -542
@@ -1,716 +1,267 @@
1
- # Titanium CLI reference
1
+ # CLI commands
2
2
 
3
- Reference for Titanium CLI commands, options, and configuration.
4
3
 
5
- <!-- TOC-START -->
6
- ## Contents
4
+ The CLI is `titanium`, and `ti` is the same binary. Ten commands.
7
5
 
8
- - [Environment setup](#environment-setup)
9
- - [Project commands](#project-commands)
10
- - [Build commands](#build-commands)
11
- - [Distribution commands](#distribution-commands)
12
- - [SDK management](#sdk-management)
13
- - [Configuration options](#configuration-options)
14
- - [Common issues](#common-issues)
15
- - [Command quick reference](#command-quick-reference)
16
- - [SDK version precedence](#sdk-version-precedence)
17
- - [References](#references)
6
+ | Command | Does |
7
+ | ------------ | -------------------------------------------------- |
8
+ | `ti build` | Builds a project, and installs and runs it |
9
+ | `ti clean` | Removes previous build directories |
10
+ | `ti config` | Gets and sets CLI config options |
11
+ | `ti create` | Creates a project, module, or Apple Watch app |
12
+ | `ti info` | Reports the development environment |
13
+ | `ti module` | Lists installed modules |
14
+ | `ti project` | Gets and sets `tiapp.xml` settings |
15
+ | `ti sdk` | Manages installed SDKs |
16
+ | `ti serve` | Serves a project through the Titanium Vite runtime |
17
+ | `ti setup` | Configures the CLI |
18
18
 
19
- <!-- TOC-END -->
19
+ Every command takes `--help`, and that output is generated from the CLI you
20
+ have installed, so it is always the authority over this page.
20
21
 
21
- ## Environment setup
22
+ ## Global options
22
23
 
23
- ### Check environment
24
+ These work on any command.
24
25
 
25
- ```bash
26
- ti setup check
27
- ```
28
-
29
- Reports configured tools and potential issues.
30
-
31
- ### Setup wizard
32
-
33
- ```bash
34
- ti setup
35
- ti setup <section>
36
- ```
37
-
38
- Runs the interactive setup wizard. The `<section>` can be one of: quick, check, user, app, network, cli, sdk, ios, android, and paths.
26
+ | Option | Effect |
27
+ | -------------------------- | ------------------------------------------------------- |
28
+ | `-d, --project-dir <path>` | The project to act on, instead of the working directory |
29
+ | `-s, --sdk [version]` | Build with a specific SDK rather than the newest |
30
+ | `--no-prompt` | Never ask. **Required for scripting** |
31
+ | `--no-banner` | Drop the version banner |
32
+ | `--no-color` | Drop ANSI colour |
33
+ | `--no-progress-bars` | Drop progress bars |
34
+ | `-q, --quiet` | Suppress output |
35
+ | `--config [json]` | Mix a JSON object into the config for this run |
36
+ | `--config-file [file]` | Use a different config file |
37
+ | `--debug` | CLI's own debug logging |
39
38
 
40
- ### Get system info
41
-
42
- ```bash
43
- ti info
44
- ```
39
+ `--no-prompt` turns a missing required option from a question into an error,
40
+ which is what you want in CI and what makes a hung build impossible.
45
41
 
46
- Detailed environment info (SDKs, certificates, provisioning profiles).
42
+ ## ti build
47
43
 
48
- ```bash
49
- ti info -p android # Android-specific info
50
- ti info -p ios # iOS-specific info
44
+ ```sh
45
+ ti build --platform android
46
+ ti build --platform ios --target device
51
47
  ```
52
48
 
53
- #### Info options
54
-
55
- | Option | Description |
56
- | ---------------------- | --------------------------------------------------------------------------------------------------- |
57
- | `-o, --output <value>` | Output format: report or json. Defaults to report. |
58
- | `-t, --types <value>` | Comma-separated list of types: all, os, nodejs, titanium, ios, jdk, haxm, android. Defaults to all. |
59
-
60
- ### Help
61
-
62
- Displays the help screen for the CLI or a specific command.
49
+ `--platform` takes `android` or `ios`. `--target` defaults to `emulator` on
50
+ Android and `simulator` on iOS.
63
51
 
64
- ```bash
65
- ti help
66
- ti help <command>
67
- ti --help
68
- ti <command> --help
69
- ```
52
+ | Platform | Targets |
53
+ | -------- | --------------------------------------------------------------------------------- |
54
+ | Android | `emulator`, `device`, `dist-playstore` |
55
+ | iOS | `simulator`, `device`, `dist-appstore`, `dist-adhoc`, `macos`, `dist-macappstore` |
70
56
 
71
- ### Configure CLI
57
+ Options worth knowing:
72
58
 
73
- ```bash
74
- # Display current config
75
- ti config
59
+ | Option | Effect |
60
+ | -------------------------- | ------------------------------------- |
61
+ | `-b, --build-only` | Compile, do not install or run |
62
+ | `-f, --force` | Full rebuild |
63
+ | `-C, --device-id <id>` | Which emulator, simulator or device |
64
+ | `-D, --deploy-type <type>` | `development`, `test` or `production` |
65
+ | `--liveview` | Reload the running app on save |
66
+ | `-l, --log-level <level>` | `trace` to `error` |
67
+ | `--skip-js-minify` | Skip minification |
68
+ | `--source-maps` | Inline source maps for transpiled JS |
76
69
 
77
- # Set option
78
- ti config cli.logLevel info
70
+ Signing options are per platform: `-K/--keystore`, `-P/--store-password`,
71
+ `-L/--alias` on Android; `-V/--developer-name`, `-R/--distribution-name`,
72
+ `-P/--pp-uuid` on iOS. See
73
+ [certificates and provisioning](https://titaniumsdk.com/docs/distribute/signing).
79
74
 
80
- # Append to path
81
- ti config -a paths.hooks "/path/to/hook"
75
+ ## ti create
82
76
 
83
- # Remove all Android options
84
- ti config -r android
77
+ ```sh
78
+ ti create --type app --name Hello --id com.example.hello --platforms android,ios --workspace-dir .
85
79
  ```
86
80
 
87
- #### Config options
88
-
89
- | Option | Description |
90
- | ---------------------- | ---------------------------------------------------------------- |
91
- | `-a, --append` | Append a value to a key containing a list of values. |
92
- | `-r, --remove` | Remove the specified config key and all its descendants. |
93
- | `-o, --output <value>` | Output format: report, json, or json-object. Defaults to report. |
81
+ `--type` is `app`, `module` or `applewatch`. With `--no-prompt`, **`--type` and
82
+ `--workspace-dir` have no usable default** and must both be passed.
94
83
 
95
- Alternative methods:
96
- ```bash
97
- # Pass JSON string
98
- ti build -p ios --config "{ paths: { hooks: '/path/to/hook' } }"
99
-
100
- # Pass JSON file
101
- ti build -p ios --config-file "/Users/me/customConfig.json"
102
- ```
84
+ `--alloy` runs `alloy new` on the project afterwards, which needs Alloy
85
+ installed. `--template` takes a template name, a directory, a zip or a URL.
103
86
 
104
- ---
87
+ `--platforms` accepts `android`, `ios` and `iphone`. `ios` targets iPhone and
88
+ iPad; `iphone` targets iPhone only.
105
89
 
106
- ## Project commands
107
-
108
- ### Create project
109
-
110
- For Alloy projects (recommended):
111
- ```bash
112
- ti create -t app --alloy --id <APP_ID> -n <APP_NAME> -p <PLATFORMS> -d <WORKSPACE> -u <URL>
113
- ```
114
-
115
- Example (Alloy):
116
- ```bash
117
- ti create -t app --alloy --id com.titaniumsdk.sample -n SampleProject -p android,ios -d ~/Documents/workspace -u https://titaniumsdk.com
118
- ```
119
-
120
- For Classic Titanium projects:
121
- ```bash
122
- ti create -t app --id <APP_ID> -n <APP_NAME> -p <PLATFORMS> -d <WORKSPACE> -u <URL>
123
- ```
124
-
125
- Parameters:
126
- - `--alloy`: create an Alloy project (recommended for new projects)
127
- - `-t, --type`: project type: app (default), applewatch, module (or timodule)
128
- - `--id`: app ID (reverse domain notation)
129
- - `-n, --name`: app name
130
- - `-p, --platforms`: comma-separated platforms (`android`, `ios`, `ipad`, `iphone`)
131
- - `-d, --workspace-dir`: workspace directory
132
- - `-u, --url`: app URL
133
- - `-f, --force`: force creation even if the path already exists
134
- - `--template`: project template to use (name, directory, ZIP file, or remote ZIP URL)
135
- - `-s, --sdk`: Titanium SDK version to use
136
-
137
- Use `--alloy` for new projects. Use Classic (`--classic` or omitting `--alloy`) only for legacy projects.
138
-
139
- ### Build project
140
-
141
- ```bash
142
- ti build -p <PLATFORM> [OPTIONS]
143
- ```
144
-
145
- ### Project management
146
-
147
- ```bash
148
- ti project [OPTIONS] [<key>] [<value>]
149
- ```
90
+ ## ti info
150
91
 
151
- Gets and sets `tiapp.xml` settings. When called with a key, returns the value. When called with a key and value, sets the value in `tiapp.xml`.
152
-
153
- It also allows you to set deployment targets using a comma-separated list of platforms. If a platform is enabled for the first time, it will copy default resources into the project Resources folder without overwriting.
154
-
155
- Examples:
156
- ```bash
157
- # Get a tiapp.xml value
158
- ti project sdk-version
159
-
160
- # Set a tiapp.xml value
161
- ti project sdk-version 12.2.0.GA
162
-
163
- # Set deployment targets (must list all desired platforms)
164
- ti project deployment-targets iphone,ipad,android
165
- ```
166
-
167
- Tasks:
168
- - `scan`: scan a directory for Titanium projects
169
-
170
- Options:
171
-
172
- | Option | Description |
173
- | --------------------------- | ------------------------------------------------------------------------ |
174
- | `-o, --output <value>` | Output format: report, json, or text. Defaults to report. |
175
- | `--project-dir <directory>` | Directory containing the project. Defaults to current working directory. |
176
-
177
- ---
178
-
179
- ## Build commands
180
-
181
- ### Generic build options and flags
182
-
183
- | Option | Description |
184
- | ------------------------------- | -------------------------------------------------------------------------------------------------------- |
185
- | `-b, --build-only` | Only perform the build; does not install or run the app. |
186
- | `-f, --force` | Force a clean rebuild. |
187
- | `--skip-js-minify` | Bypass JavaScript minification. Simulator builds are never minified. Only supported for Android and iOS. |
188
- | `--log-level <level>` | Minimum logging level: trace, debug, info, warn, error. |
189
- | `-p, --platforms <platform>` | Target build platform: android or ios (iphone and ipad are accepted as synonyms for ios). |
190
- | `-d, --project-dir <directory>` | Directory containing the project. Defaults to current working directory. |
191
- | `-s, --sdk <version>` | Titanium SDK version to build with. |
192
-
193
- ### Android emulator
194
-
195
- ```bash
196
- ti build -p android [-C <EMULATOR_NAME>]
197
- ```
198
-
199
- Example:
200
- ```bash
201
- ti build -p android -C "Google Nexus 7 - 4.4.2 - API 19 - 800x1280"
202
- ```
203
-
204
- List emulators: `ti info -p android`
205
-
206
- ### Android device
207
-
208
- ```bash
209
- ti build -p android -T device -C <DEVICE_ID>
210
- ```
211
-
212
- Example:
213
- ```bash
214
- ti build -p android -T device -C deadbeef
215
- ```
216
-
217
- Omit `-C` if only one device is connected.
218
-
219
- ### Android build options
220
-
221
- | Option | Description |
222
- | --------------------------------- | ----------------------------------------------------------------------------------------------------- |
223
- | `-A, --android-sdk <path>` | Path to the Android SDK. |
224
- | `-C, --device-id <name>` | Name of the device or emulator. Use "all" with --target "device" to install on all connected devices. |
225
- | `-D, --deploy-type <type>` | Controls optimization, encryption, analytics: development, test, production. |
226
- | `-K, --keystore <path>` | Location of the keystore file. |
227
- | `--key-password <keypass>` | Password of the keystore private key. Defaults to --store-password value. |
228
- | `--liveview` | Start a LiveView session for live UI previews. |
229
- | `-L, --alias <alias>` | Alias for the keystore. |
230
- | `--no-launch` | Disable launching the app after installing. |
231
- | `-O, --output-dir <dir>` | Output directory (used when target is dist-playstore). |
232
- | `-P, --store-password <password>` | Password for the keystore. |
233
- | `--sigalg <algorithm>` | Digital signature algorithm: MD5withRSA, SHA1withRSA, SHA256withRSA. |
234
- | `-T, --target <value>` | Target: emulator, device, or dist-playstore. |
235
-
236
- ### iOS simulator
237
-
238
- ```bash
239
- ti build -p ios [-C <SIMULATOR_NAME>]
92
+ ```sh
93
+ ti info
94
+ ti info -t android --json
240
95
  ```
241
96
 
242
- Example:
243
- ```bash
244
- ti build -p ios -C "iPad Retina"
245
- ```
97
+ `-t/--types` narrows to one area, and `--json` makes it machine-readable. This
98
+ is the first command to run when a build breaks for no visible reason.
246
99
 
247
- ### iOS device
100
+ ## ti sdk
248
101
 
249
- ```bash
250
- ti build -p ios -T device -C <DEVICE_UDID> [-V "<CERT_NAME>" -P <PROFILE_UUID>]
102
+ ```sh
103
+ ti sdk list
104
+ ti sdk install 13.4.1.GA
105
+ ti sdk uninstall 13.3.0.GA
251
106
  ```
252
107
 
253
- Example:
254
- ```bash
255
- ti build -p ios -T device -C itunes -V "Loretta Martin (GE7BAC5)" -P "11111111-2222-3333-4444-555555555555"
256
- ```
108
+ `install` with no version takes the newest stable. `-b/--branch` installs from
109
+ a CI branch.
257
110
 
258
- Omit `-V` and `-P` to be prompted.
259
-
260
- ### iOS build options
261
-
262
- | Option | Description |
263
- | -------------------------------- | ------------------------------------------------------------------------------------------------------ |
264
- | `-C, --device-id <name>` | Name of the device or simulator. Use "all" with --target "device" to install on all connected devices. |
265
- | `-D, --deploy-type <type>` | Controls optimization, encryption, analytics: development, test, production. |
266
- | `-F, --device-family <value>` | Device family: iphone, ipad, or universal (default). |
267
- | `--force-copy` | Force files to be copied instead of symlinked (simulator builds only). |
268
- | `-I, --ios-version <value>` | iOS SDK version to build for. Default: latest installed. |
269
- | `-K, --keychain <value>` | Path to distribution keychain (for device/dist targets). |
270
- | `--launch-bundle-id <id>` | After installing in simulator, launch a different app (useful for test runners). |
271
- | `--launch-watch-app` | Launch both the watch app and main app (simulator only). |
272
- | `--launch-watch-app-only` | Launch only the watch app (simulator only). |
273
- | `-O, --output-dir <dir>` | Output directory (used when target is dist-adhoc). |
274
- | `-P, --pp-uuid <uuid>` | Provisioning profile UUID (for device/dist targets). |
275
- | `-R, --distribution-name <name>` | iOS Distribution Certificate (for dist targets). |
276
- | `--sim-focus` | Focus the iOS Simulator after launching (default: true). Use --no-sim-focus to disable. |
277
- | `-T, --target <value>` | Target: simulator, device, dist-appstore, dist-adhoc, macos, or dist-macappstore. |
278
- | `-V, --developer-name <name>` | iOS Developer Certificate (required for device target). |
279
- | `-W, --watch-device-id <udid>` | Watch simulator UDID (simulator only). |
280
- | `--watch-app-name <name>` | Name of the watch app to launch (simulator only). |
281
- | `-Y, --sim-type <type>` | iOS Simulator type: iphone or ipad (simulator only). |
282
-
283
- ### Clean build
284
-
285
- ```bash
286
- ti clean [-p <PLATFORM>]
287
- ```
111
+ ## ti config
288
112
 
289
- Examples:
290
- ```bash
291
- ti clean # All platforms
292
- ti clean -p ios # iOS only
113
+ ```sh
114
+ ti config # print everything
115
+ ti config android.sdkPath /path/to/sdk # set one
116
+ ti config paths.modules --append /path # add to a list
117
+ ti config paths.modules --remove /path # take one out
293
118
  ```
294
119
 
295
- #### Clean options
296
-
297
- | Option | Description |
298
- | ------------------------------- | ------------------------------------------------------------------------ |
299
- | `-p, --platforms <platform>` | A single platform to clean: android or ios. |
300
- | `-d, --project-dir <directory>` | Directory containing the project. Defaults to current working directory. |
301
- | `-s, --sdk <version>` | Titanium SDK version. |
302
- | `--log-level <level>` | Minimum logging level: trace, debug, info, warn, error. |
120
+ See [CLI configuration](https://titaniumsdk.com/docs/reference/config) for the keys.
303
121
 
304
- ### Module management
122
+ ## ti project
305
123
 
306
- ```bash
307
- ti module [TASK] [OPTIONS]
308
- ```
309
-
310
- Tasks:
311
- - `create`: create a new Titanium module
312
- - `list`: list installed Titanium modules
124
+ Reads and writes `tiapp.xml` without a text editor, which is what to use in a
125
+ release script:
313
126
 
314
- #### Module create
315
-
316
- ```bash
317
- ti create -t module --id <MODULE_ID> -n <MODULE_NAME> -p <PLATFORMS> -d <WORKSPACE>
127
+ ```sh
128
+ ti project version 1.2.0
129
+ ti project --output json
318
130
  ```
319
131
 
320
- Parameters:
321
- - `-t, --type`: set to module (or timodule)
322
- - `--id`: module ID (reverse domain notation)
323
- - `-n, --name`: module name
324
- - `-p, --platforms`: target platforms
325
- - `-d, --workspace-dir`: workspace directory
326
- - `-f, --force`: force creation even if path already exists
327
- - `--template`: module template to use
328
-
329
- #### Module list
132
+ ## ti module
330
133
 
331
- Prints a list of installed modules.
332
-
333
- ```bash
334
- ti module
134
+ ```sh
335
135
  ti module list
336
- ti module list --project-dir /path/to/project
337
- ```
338
-
339
- Options:
340
-
341
- | Option | Description |
342
- | ----------------------- | --------------------------------------------------------------------------- |
343
- | `-o, --output <value>` | Output format: report, json, or grid. Defaults to report. |
344
- | `--project-dir <value>` | Directory of the project to analyze. Defaults to current working directory. |
345
-
346
- ### Plugin management
347
-
348
- ```bash
349
- ti plugin [TASK] [OPTIONS]
350
136
  ```
351
137
 
352
- #### Plugin list
138
+ `list` is the only subcommand. It reports project, configured-path and global
139
+ scopes, so it also answers which copy of a module a build will use.
353
140
 
354
- Prints a list of installed plugins.
141
+ ## ti clean
355
142
 
356
- ```bash
357
- ti plugin
358
- ti plugin list
359
- ti plugin list --project-dir /path/to/project
143
+ ```sh
144
+ ti clean
145
+ ti clean --platforms android
360
146
  ```
361
147
 
362
- Options:
148
+ Removes `build/`. Worth doing when a failure does not match the source.
363
149
 
364
- | Option | Description |
365
- | ----------------------- | --------------------------------------------------------------------------- |
366
- | `-o, --output <value>` | Output format: report, json, or grid. Defaults to report. |
367
- | `--project-dir <value>` | Directory of the project to analyze. Defaults to current working directory. |
150
+ ## ti setup
368
151
 
369
- ---
152
+ An interactive wizard. `ti setup check` is the useful non-interactive part, and
153
+ overlaps `ti info`.
370
154
 
371
- ## Distribution commands
155
+ ## CLI configuration keys
372
156
 
373
- ### Google Play (Android)
374
-
375
- ```bash
376
- ti build -p android -T dist-playstore [-K <KEYSTORE> -P <PASSWORD> -L <ALIAS> -O <OUTPUT>]
377
- ```
378
157
 
379
- Example:
380
- ```bash
381
- ti build -p android -T dist-playstore -K ~/android.keystore -P secret -L foo -O ./dist/
382
- ```
158
+ The CLI stores its own settings, separately from any project. They live in
159
+ `~/.titanium/config.json`, and `ti config` is how to read and write them.
383
160
 
384
- If key password differs from keystore password:
385
- ```bash
386
- --key-password <KEYPASS>
161
+ ```sh
162
+ ti config # everything
163
+ ti config cli.logLevel # one key
164
+ ti config cli.logLevel info # set it
165
+ ti config cli.logLevel --remove # back to the default
387
166
  ```
388
167
 
389
- ### Ad Hoc (iOS)
390
-
391
- ```bash
392
- ti build -p ios -T dist-adhoc [-R <CERT_NAME> -P <PROFILE_UUID> -O <OUTPUT>]
393
- ```
168
+ The path is printed by `ti config --help`, so a machine that keeps it elsewhere
169
+ will say so.
394
170
 
395
- Example:
396
- ```bash
397
- ti build -p ios -T dist-adhoc -R "Pseudo, Inc." -P "FFFFFFFF-EEEE-DDDD-CCCC-BBBBBBBBBBBB" -O ./dist/
398
- ```
171
+ ### Keys
399
172
 
400
- ### App Store (iOS)
401
-
402
- ```bash
403
- ti build -p ios -T dist-appstore [-R <CERT_NAME> -P <PROFILE_UUID>]
404
- ```
405
-
406
- Example:
407
- ```bash
408
- ti build -p ios -T dist-appstore -R "Pseudo, Inc." -P "AAAAAAAA-0000-9999-8888-777777777777"
409
- ```
410
-
411
- Installs the package to Xcode Organizer.
412
-
413
- ### Mac Catalyst (macOS Development)
414
-
415
- ```bash
416
- ti build -p ios -T macos
417
- ```
418
-
419
- Builds a Mac Catalyst version of your iOS app for local testing. The resulting `.app` bundle is located at:
420
- ```
421
- build/iphone/build/Products/Debug-maccatalyst/AppName.app
422
- ```
423
-
424
- For a production build:
425
- ```bash
426
- ti build -p ios -T macos --deploy-type production
427
- ```
428
-
429
- The release `.app` bundle will be at:
430
- ```
431
- build/iphone/build/Products/Release-maccatalyst/AppName.app
432
- ```
433
-
434
- ### Mac App Store (Mac Catalyst Distribution)
435
-
436
- ```bash
437
- ti build -p ios -T dist-macappstore [-R <CERT_NAME>]
438
- ```
439
-
440
- Example:
441
- ```bash
442
- ti build -p ios -T dist-macappstore -R "Apple Distribution: Your Name (TEAM_ID)"
443
- ```
444
-
445
- **Important Notes:**
446
- - Requires a Mac App Store Distribution Certificate (not iOS Distribution)
447
- - The build creates an archive for Mac App Store distribution
448
- - The `.xcarchive` is installed in Xcode's Organizer
449
- - Uses `Release-maccatalyst` configuration
450
- - Destination: `generic/platform=macOS`
451
- - Code signing is set to Manual with identity `-`
452
-
453
- The target `dist-macappstore` is available in Titanium SDK 13.1.1.GA and later.
454
-
455
- ---
456
-
457
- ## SDK management
458
-
459
- ### List SDKs
460
-
461
- ```bash
462
- ti sdk list
463
- ```
464
-
465
- Options:
173
+ ### Paths
466
174
 
467
- | Option | Description |
468
- | ---------------------- | -------------------------------------------------- |
469
- | `-b, --branches` | Retrieve and print all branches. |
470
- | `-r, --releases` | Retrieve and print all releases. |
471
- | `-o, --output <value>` | Output format: report or json. Defaults to report. |
175
+ | Key | What |
176
+ | ---------------- | ---------------------------------------- |
177
+ | `paths.sdks` | Extra directories to find SDKs in |
178
+ | `paths.modules` | Extra directories to find modules in |
179
+ | `paths.plugins` | Extra directories to find CLI plugins in |
180
+ | `paths.commands` | Extra CLI commands |
181
+ | `paths.hooks` | Extra build hooks |
472
182
 
473
- ### Select SDK
183
+ These take lists, so they have `--append` and `--remove`:
474
184
 
475
- ```bash
476
- ti sdk select [<version>]
185
+ ```sh
186
+ ti config paths.modules --append ~/shared/modules
477
187
  ```
478
188
 
479
- Interactive selection of default SDK. This sets the SDK used to run CLI commands. If the `tiapp.xml` file does not contain an SDK version and the `app.sdk` setting is not set, the application will be built with this SDK.
480
-
481
- ### Install SDK
189
+ A path added here applies to every project on the machine, which makes a build
190
+ depend on the machine. It is useful for a shared module cache and a liability
191
+ for anything a colleague needs too.
482
192
 
483
- Downloads the latest Titanium SDK or a specific version.
484
-
485
- ```bash
486
- ti sdk install [<version>] [--default] [--force] [--branch <branch_name>]
487
- ```
193
+ ### Android
488
194
 
489
- `<version>` may be a specific version number (for example, `12.2.0.GA`), a URL to a ZIP file, or a local ZIP file path.
195
+ | Key | What |
196
+ | ------------------------------------ | ------------------------------------------ |
197
+ | `android.sdkPath` | Where the Android SDK is |
198
+ | `android.ndkPath` | Where the NDK is, if you build native code |
199
+ | `android.buildTools.selectedVersion` | Pin build tools when the newest is too new |
490
200
 
491
- Options:
201
+ `android.sdkPath` is what `ti setup android` writes, and it is the answer to
202
+ "the build cannot find the Android SDK" - not an environment variable.
203
+ `ANDROID_HOME` is **not** read by the app build; the detection order is this
204
+ config key, then `ANDROID_SDK_ROOT`, then `ANDROID_SDK`, then `adb` on `PATH`.
492
205
 
493
- | Option | Description |
494
- | ---------------------------- | ------------------------------------ |
495
- | `-d, --default` | Set as the default SDK. |
496
- | `-f, --force` | Force reinstallation. |
497
- | `-k, --keep-files` | Keep downloaded files after install. |
498
- | `-b, --branch <branch_name>` | Branch to install from, or "latest". |
206
+ ### iOS
499
207
 
500
- ### Uninstall SDK
208
+ | Key | What |
209
+ | ---------------------- | -------------------------------- |
210
+ | `ios.developerName` | Default development certificate |
211
+ | `ios.distributionName` | Default distribution certificate |
501
212
 
502
- Uninstalls a specific Titanium SDK version.
213
+ Setting these saves passing `--developer-name` on every device build.
503
214
 
504
- ```bash
505
- ti sdk uninstall [<version>] [--force]
506
- ```
215
+ ### CLI behaviour
507
216
 
508
- Options:
217
+ | Key | Default | What |
218
+ | ------------------------ | ------- | ------------------------------------- |
219
+ | `cli.logLevel` | `trace` | Default verbosity |
220
+ | `cli.colors` | `true` | ANSI colour |
221
+ | `cli.progressBars` | `true` | Progress bars |
222
+ | `cli.prompt` | `true` | Ask for missing values |
223
+ | `cli.width` | `80` | Wrap width |
224
+ | `cli.completion` | `false` | Shell completion |
225
+ | `cli.httpProxyServer` | empty | Proxy for CLI requests |
226
+ | `cli.rejectUnauthorized` | `true` | Verify TLS on CLI requests |
227
+ | `cli.ignoreDirs` | a regex | Directories never copied into a build |
228
+ | `cli.ignoreFiles` | a regex | Files never copied into a build |
509
229
 
510
- | Option | Description |
511
- | ------------- | ------------------------------------------ |
512
- | `-f, --force` | Force uninstallation without confirmation. |
230
+ > [!WARNING]
231
+ > `cli.rejectUnauthorized false` disables certificate verification for
232
+ > everything the CLI fetches, including SDK downloads. If a corporate proxy is
233
+ > the reason, set `cli.httpProxyServer` instead and leave verification on.
513
234
 
514
- ### Update SDK
235
+ `cli.ignoreDirs` and `cli.ignoreFiles` are why `.git` and `.DS_Store` do not end
236
+ up inside your app. Widen them to keep something else out; replacing them
237
+ wholesale is how a `.git` directory ships to the store.
515
238
 
516
- Finds the latest version of the Titanium SDK and optionally installs it.
239
+ ### App
517
240
 
518
- ```bash
519
- ti sdk update [--default] [--force] [--install] [--branch <branch_name>]
520
- ```
241
+ | Key | What |
242
+ | --------------- | ---------------------------------- |
243
+ | `app.workspace` | Default directory for new projects |
244
+ | `user.name` | Name used in generated files |
521
245
 
522
- Options:
523
-
524
- | Option | Description |
525
- | ---------------------------- | --------------------------- |
526
- | `-d, --default` | Set as the default SDK. |
527
- | `-f, --force` | Force reinstallation. |
528
- | `-i, --install` | Install the latest version. |
529
- | `-b, --branch <branch_name>` | Branch to update from. |
530
-
531
- ---
532
-
533
- ## Configuration options
534
-
535
- ### Android options
536
-
537
- | Option | Default | Description |
538
- | ------------------------------------ | ----------- | -------------------------------- |
539
- | `android.sdkPath` | auto | Android SDK path |
540
- | `android.ndkPath` | auto | Android NDK path |
541
- | `android.adb.port` | 5037 | ADB port number |
542
- | `android.autoSelectDevice` | true | Auto-select device/emulator |
543
- | `android.symlinkResources` | true (OS X) | Symlink vs copy resources |
544
- | `android.buildTools.selectedVersion` | max | Build tools version |
545
- | `android.javac.maxmemory` | "3072M" | JVM heap size |
546
- | `android.javac.source` | "1.8" | Java source version |
547
- | `android.javac.target` | "1.8" | Java target version |
548
- | `android.mergeCustomAndroidManifest` | false | Merge custom AndroidManifest.xml |
549
-
550
- The `android.javac.source` and `android.javac.target` defaults were originally "1.6" in earlier SDK versions. Modern Titanium SDK requires Java 1.8 or higher. You can override these per-project in `tiapp.xml` using `<property name="android.javac.source" type="string">1.8</property>`.
551
-
552
- ### iOS options
553
-
554
- | Option | Default | Description |
555
- | ---------------------- | ----------- | ------------------------------------- |
556
- | `ios.developerName` | - | Developer certificate name |
557
- | `ios.distributionName` | - | Distribution certificate name |
558
- | `ios.autoSelectDevice` | true | Auto-select device/simulator |
559
- | `ios.symlinkResources` | true (OS X) | Symlink vs copy resources |
560
- | `ios.keychain` | - | Specific keychain to search for certs |
561
- | `ios.xcodePath` | auto | Path to Xcode installation |
562
-
563
- ### CLI options
564
-
565
- | Option | Default | Description |
566
- | ------------------------ | ------- | --------------------------------------------- |
567
- | `cli.logLevel` | trace | Log level: error, warning, info, debug, trace |
568
- | `cli.colors` | true | Color output |
569
- | `cli.progressBars` | true | Show progress bars |
570
- | `cli.prompt` | true | Prompt for missing info |
571
- | `cli.quiet` | false | Suppress all output |
572
- | `cli.rejectUnauthorized` | true | Reject bad SSL certs |
573
- | `cli.width` | 100 | Text wrap width |
574
- | `cli.failOnWrongSDK` | false | Fail on SDK mismatch |
575
- | `cli.hideCharEncWarning` | false | Hide encoding warnings |
576
- | `cli.httpProxyServer` | - | Proxy server URL |
577
-
578
- ### SDK options
579
-
580
- | Option | Description |
581
- | ---------------------------- | ---------------------------------- |
582
- | `sdk.defaultInstallLocation` | SDK install location (OS-specific) |
583
- | `sdk.selected` | Selected SDK version (required) |
246
+ ## Per-run overrides
584
247
 
585
- ### Paths
248
+ `--config` takes JSON and applies for that run only, which is the way to script
249
+ something without changing the machine:
586
250
 
587
- | Option | Description |
588
- | ---------------- | ------------------------------ |
589
- | `paths.commands` | Additional CLI command scripts |
590
- | `paths.hooks` | CLI hook scripts |
591
- | `paths.modules` | Module search paths |
592
- | `paths.plugins` | Plugin search paths |
593
- | `paths.sdks` | SDK search paths |
594
- | `paths.xcode` | Xcode installation paths |
595
-
596
- ### Java options
597
-
598
- | Option | Description |
599
- | ---------------------------- | ------------------------- |
600
- | `java.home` | JDK directory |
601
- | `java.executables.java` | java executable path |
602
- | `java.executables.javac` | javac executable path |
603
- | `java.executables.jarsigner` | jarsigner executable path |
604
- | `java.executables.keytool` | keytool executable path |
605
-
606
- ### Genymotion options
607
-
608
- | Option | Description |
609
- | ----------------------------------- | ----------------------------------------- |
610
- | `genymotion.enabled` | Enable Genymotion support |
611
- | `genymotion.home` | Genymotion virtual machine data directory |
612
- | `genymotion.path` | Genymotion app directory |
613
- | `genymotion.executables.genymotion` | genymotion executable |
614
- | `genymotion.executables.player` | player executable |
615
- | `genymotion.executables.vboxmanage` | vboxmanage executable |
616
-
617
- ### Application options
618
-
619
- | Option | Description |
620
- | --------------------------- | --------------------------- |
621
- | `app.idprefix` | Prefix for new app IDs |
622
- | `app.publisher` | Default publisher |
623
- | `app.url` | Default company URL |
624
- | `app.workspace` | Default workspace directory |
625
- | `app.skipAppIdValidation` | Skip app ID validation |
626
- | `app.skipVersionValidation` | Skip version validation |
627
-
628
- ---
629
-
630
- ## Common issues
631
-
632
- ### Android SDK not found
633
-
634
- ```bash
635
- ! sdk Android SDK not found
636
- ! targets no targets found
637
- ! avds no avds found
251
+ ```sh
252
+ ti build --platform android --config '{"cli":{"logLevel":"warn"}}'
638
253
  ```
639
254
 
640
- Solution:
641
- ```bash
642
- ti config android.sdkPath /path/to/android-sdk
643
- ```
255
+ `--config-file` points at a different file entirely, which is how CI can carry
256
+ its own settings without touching a developer's.
644
257
 
645
- ### Xcode too old
258
+ ## What is not here
646
259
 
647
- ```bash
648
- ! Xcode 4.3 is too old and is no longer supported by Titanium SDK 3.3.0
649
- ```
650
-
651
- Solution: install a newer Xcode from the Mac App Store.
260
+ Anything about the app itself - id, name, version, permissions, modules - is in
261
+ `tiapp.xml`, not here. See [tiapp.xml](https://titaniumsdk.com/docs/reference/tiapp-xml). The rule is
262
+ that this file describes the machine and `tiapp.xml` describes the app, which
263
+ is also why this one is not in version control and that one is.
652
264
 
653
- ### Clean build issues
654
-
655
- ```bash
656
- ti clean -p ios
657
- ti clean -p android
658
- ```
659
-
660
- ### ADB device issues
661
-
662
- ```bash
663
- adb kill-server
664
- adb start-server
665
- adb devices
666
- ```
265
+ ## Release scope
667
266
 
668
- ---
669
-
670
- ## Command quick reference
671
-
672
- | Command | Description |
673
- | ---------------------------- | -------------------------------------------------------------------------------------------- |
674
- | `ti help` | Display help screen |
675
- | `ti help <command>` | Display help for a specific command |
676
- | `ti setup` | Run setup wizard |
677
- | `ti setup check` | Check environment setup |
678
- | `ti setup <section>` | Run specific setup section (quick, check, user, app, network, cli, sdk, ios, android, paths) |
679
- | `ti info` | Display system info |
680
- | `ti info -p <PLATFORM>` | Platform-specific info |
681
- | `ti info -o json` | Output system info as JSON |
682
- | `ti config` | Display/set config |
683
- | `ti config -o json` | Output config as JSON |
684
- | `ti create` | Create new project |
685
- | `ti create -t module` | Create new module |
686
- | `ti build` | Build project |
687
- | `ti build -b` | Build only (no install/launch) |
688
- | `ti build -f` | Force clean rebuild |
689
- | `ti clean` | Clean build folder |
690
- | `ti clean -p <PLATFORM>` | Clean specific platform |
691
- | `ti project` | Get/set tiapp.xml settings |
692
- | `ti module list` | List installed modules |
693
- | `ti plugin list` | List installed plugins |
694
- | `ti sdk list` | List installed SDKs |
695
- | `ti sdk select` | Select default SDK |
696
- | `ti sdk install` | Install latest SDK |
697
- | `ti sdk install <version>` | Install specific SDK |
698
- | `ti sdk uninstall <version>` | Uninstall specific SDK |
699
- | `ti sdk update` | Check for SDK updates |
700
-
701
- ---
702
-
703
- ## SDK version precedence
704
-
705
- 1. `tiapp.xml` `<sdk-version>` tag
706
- 2. `--sdk` CLI option
707
- 3. `app.sdk` config setting
708
- 4. Selected SDK (`ti sdk select`)
709
-
710
- ---
711
-
712
- ## References
713
-
714
- - Titanium CLI GitHub: https://github.com/tidev/titanium-cli
715
- - Android SDK Manager: http://developer.android.com/sdk
716
- - Xcode Downloads: https://apps.apple.com/us/app/xcode/id497799835?mt=12/
267
+ CLI commands and SDK build support are versioned separately. `ti serve` belongs to the Vite integration: check installed `ti serve --help` and the runtime's supported SDK versions before adopting it in a released 13.4.1 project. Do not infer SDK 14 GA from a command listed by a newer CLI. For API contracts use the project's versioned reference.