AppCode 2019.3 Help

Open files from the command line

You can open an arbitrary file, folder, or project for editing in AppCode from the command line, optionally specifying where the caret should rest after opening the file.

  • In the command line, run the following command:

    <AppCode> [--line <number>] path

    Alternatively, you can use the following syntax:

    <AppCode> path:<number>

The command options are as follows:

Option

Description

<AppCode>

The name of the AppCode command-line launcher. By default, appcode.

path

The path to the file or the folder to be opened.

  • If the file or folder belongs to an existing project, this project will be opened.

  • If the file does not belong to any project, a temporary project for this file will be created automatically.

  • If the folder does not belong to any project, a new project will be created inside this folder.

--line <number>

(optional) The line number on which the caret should rest after opening the file.

Examples

appcode --line 10 ~/AppCodeProjects/MyProject/ViewController.m
appcode ~/AppCodeProjects/MyProject/ViewController.m:10
Last modified: 6 February 2020