All apps/NativeScript CLI

NativeScript CLI

nativescript

NativeScript CLI - command-line tools.

Runs as ns, tns, nativescript|macOS, Linux, Windows|nativescript.org

Command form

ai-draft · 4 tasks · 23 fields

Create, build and run NativeScript apps. Use the tabs for create, build and run; plugins, debugging and tests are left out.

Opens the form; the finished command lands at your prompt, unrun
otty gui nativescript

ns create

Create a project

Create a new NativeScript project.

Create a projectExample values, fixed in this page — nothing here reaches a terminal
Basic
Application name*
string
Advanced
Application identifier
string
TasksEach one presets the form for one job
Create
nameappid
Create a Vue project
namevue
ParametersOnly these flags are editable in the form
Application name
string · positional 0
Template
string
--template
Angular template
boolean
--angular
React template
boolean
--react
Vue template
boolean
--vue
Svelte template
boolean
--svelte
Plain TypeScript
boolean
--typescript
Plain JavaScript
boolean
--javascript
Directory
path
--path
Application identifier
string
--appid

ns build

Build the project

Build the project. Pick a platform on the command line (android or ios); the form builds with the default.

Build the projectExample values, fixed in this page — nothing here reaches a terminal
Basic
Release build*
--release
Rebuild native application
--clean
TasksEach one presets the form for one job
Release build
releaseclean
ParametersOnly these flags are editable in the form
Release build
boolean
--release
Rebuild native application
boolean
--clean
Skip compatibility checks
boolean
--force
Hot module replacement
boolean
--hmr
Copy built package to
path
--copy-to
Device ID
string
--device

ns run

Run the project

Run on connected devices or emulators.

Run the projectExample values, fixed in this page — nothing here reaches a terminal
Basic
Device ID
string
Use an emulator
--emulator
TasksEach one presets the form for one job
Run
deviceemulator
ParametersOnly these flags are editable in the form
Device ID
string
--device
Use an emulator
boolean
--emulator
Release build
boolean
--release
Rebuild native application
boolean
--clean
Disable hot module replacement
boolean
--no-hmr
Do not print app output
boolean
--justlaunch
Bundle the application
boolean
--bundle
SourcesEvery flag above is checked against these
fig
completion

github.com

fig
completion

github.com

fig
completion

github.com

fig
completion

github.com

Before it fills your prompt, Otty checks the installed ns against its version. A form that does not match your version is not offered.