Command-line Reference

Commands

pod 

CocoaPods, the Cocoa library package manager.

Installation

The commands listed in this group provide support for installing and integrating the dependecies specified in a Podfile.

Following is presented the basic workflow for integrating CocoaPods in a user project.

$ touch Podfile
$ vim Podfile
$ pod install
$ open *.xcworkspace
$ vim podfile
$ pod install
$ pod outdated
$ pod update

Commands

pod init

pod install

pod update

pod outdated

pod init

pod init XCODEPROJ

Creates a Podfile for the current directory if none currently exists. If an XCODEPROJ project file is specified or if there is only a single project file in the current directory, targets will be automatically generated based on targets defined in the project.

It is possible to specify a list of dependencies which will be used by the template in the Podfile.default (normal targets) Podfile.test (test targets) files which should be stored in the ~/.cocoapods/templates folder.

Inherited options:

--silent

Show nothing.

--version

Show the version of the tool.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.

pod install

pod install 

Downloads all dependencies defined in Podfile and creates an Xcode Pods library project in ./Pods.

The Xcode project file should be specified in your Podfile like this:

xcodeproj `path/to/XcodeProject`

If no xcodeproj is specified, then a search for an Xcode project will be made. If more than one Xcode project is found, the command will raise an error.

This will configure the project to reference the Pods static library, add a build configuration file, and add a post build script to copy Pod resources.

Options:

--project-directory=/project/dir/

The path to the root of the project directory.

--no-clean

Leave SCM dirs like .git and .svn intact after downloading.

--no-integrate

Skip integration of the Pods libraries in the Xcode project(s).

--no-repo-update

Skip running pod repo update before install.

Inherited options:

--silent

Show nothing.

--version

Show the version of the tool.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.

pod update

pod update [POD_NAMES ...]

Updates the Pods identified by the specified POD_NAMES. If no POD_NAMES are specified it updates all the Pods ignoring the contents of the Podfile.lock. This command is reserved to the update of dependencies and pod install should be used to install changes to the Podfile.

Options:

--project-directory=/project/dir/

The path to the root of the project directory.

--no-clean

Leave SCM dirs like .git and .svn intact after downloading.

--no-integrate

Skip integration of the Pods libraries in the Xcode project(s).

--no-repo-update

Skip running pod repo update before install.

Inherited options:

--silent

Show nothing.

--version

Show the version of the tool.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.

pod outdated

pod outdated 

Shows the outdated pods in the current Podfile.lock, but only those from spec repos, not those from local/external sources or :head versions.

Options:

--no-clean

Leave SCM dirs like .git and .svn intact after downloading.

--no-integrate

Skip integration of the Pods libraries in the Xcode project(s).

--no-repo-update

Skip running pod repo update before install.

--project-directory=/project/dir/

The path to the root of the project directory.

Inherited options:

--silent

Show nothing.

--version

Show the version of the tool.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.

pod list

pod list 

Lists all available pods.

Options:

--update

Run pod repo update before listing.

--stats

Show additional stats (like GitHub watchers and forks).

Inherited options:

--silent

Show nothing.

--version

Show the version of the tool.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.

pod try

pod try NAME|URL

Downloads the Pod with the given NAME (or Git URL), install its dependencies if needed and opens its demo project. If a Git URL is provided the head of the repo is used.

Options:

--no-repo-update

Skip running pod repo update before install.

Inherited options:

--silent

Show nothing.

--version

Show the version of the tool.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.

pod spec create

pod spec create [NAME|https://github.com/USER/REPO]

Creates a PodSpec, in the current working dir, called NAME.podspec. If a GitHub url is passed the spec is prepopulated.

Inherited options:

--silent

Show nothing.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.

pod spec lint

pod spec lint [NAME.podspec|DIRECTORY|http://PATH/NAME.podspec ...]

Validates NAME.podspec. If a DIRECTORY is provided, it validates the podspec files found, including subfolders. In case the argument is omitted, it defaults to the current working dir.

Options:

--quick

Lint skips checks that would require to download and build the spec.

--allow-warnings

Lint validates even if warnings are present.

--subspec=NAME

Lint validates only the given subspec.

--no-subspecs

Lint skips validation of subspecs.

--no-clean

Lint leaves the build directory intact for inspection.

--fail-fast

Lint stops on the first failing platform or subspec.

--use-libraries

Lint uses static libraries to install the spec.

--sources=https://github.com/artsy/Specs,master

The sources from which to pull dependant pods (defaults to https://github.com/CocoaPods/Specs.git). Multiple sources must be comma-delimited..

Inherited options:

--silent

Show nothing.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.

pod spec cat

pod spec cat [QUERY]

Prints the content of the podspec(s) whose name matches QUERY to standard output.

Options:

--regex

Interpret the QUERY as a regular expression.

--show-all

Pick from all versions of the given podspec.

Inherited options:

--silent

Show nothing.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.

pod spec which

pod spec which [QUERY]

Prints the path of the .podspec file(s) whose name matches QUERY

Options:

--regex

Interpret the QUERY as a regular expression.

--show-all

Print all versions of the given podspec.

Inherited options:

--silent

Show nothing.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.

pod spec edit

pod spec edit [QUERY]

Opens the podspec matching QUERY to be edited.

Options:

--regex

Interpret the QUERY as a regular expression.

--show-all

Pick from all versions of the given podspec.

Inherited options:

--silent

Show nothing.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.

pod trunk add-owner

pod trunk add-owner POD OWNER-EMAIL

Adds the registered user with specified OWNER-EMAIL as an owner of the given POD. An ‘owner’ is a registered user whom is allowed to make changes to a pod, such as pushing new versions and adding and removing other ‘owners’.

Inherited options:

--silent

Show nothing.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.

pod trunk info

pod trunk info NAME

Returns information about a Pod.

Inherited options:

--silent

Show nothing.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.

pod trunk me

pod trunk me 

Includes information about your registration, followed by all your sessions.

These are your current session, other valid sessions, unverified sessions, and expired sessions.

Inherited options:

--silent

Show nothing.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.

pod trunk push

pod trunk push [PATH]

Publish the podspec at PATH to make it available to all users of the ‘master’ spec-repo. If PATH is not provided, defaults to the current directory.

Before pushing the podspec to cocoapods.org, this will perform a local lint of the podspec, including a build of the library. However, it remains your responsibility to ensure that the published podspec will actually work for your users. Thus it is recommended that you first try to use the podspec to integrate the library into your demo and/or real application.

If this is the first time you publish a spec for this pod, you will automatically be registered as the ‘owner’ of this pod. (Note that ‘owner’ in this case implies a person that is allowed to publish new versions and add other ‘owners’, not necessarily the library author.)

Options:

--allow-warnings

Allows push even if there are lint warnings.

--use-libraries

Linter uses static libraries to install the spec.

Inherited options:

--silent

Show nothing.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.

pod trunk register

pod trunk register EMAIL [NAME]

Register a new account, or create a new session.

If this is your first registration, both an EMAIL address and your NAME are required. If you’ve already registered with trunk, you may omit the NAME (unless you would like to change it).

It is recommended that you provide a description of the session, so that it will be easier to identify later on. For instance, when you would like to clean-up your sessions. A common example is to specify the location where the machine, that you are using the session for, is physically located.

Examples:

$ pod trunk register eloy@example.com `Eloy Durán` --description=`Personal Laptop`
$ pod trunk register eloy@example.com --description=`Work Laptop`
$ pod trunk register eloy@example.com

Options:

--description=DESCRIPTION

An arbitrary description to easily identify your session later on..

Inherited options:

--silent

Show nothing.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.

pod trunk remove-owner

pod trunk remove-owner POD OWNER-EMAIL

Removes the user with specified OWNER-EMAIL from being an owner of the given POD. An ‘owner’ is a registered user whom is allowed to make changes to a pod, such as pushing new versions and adding and removing other ‘owners’.

Inherited options:

--silent

Show nothing.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.

pod repo add

pod repo add NAME URL [BRANCH]

Clones URL in the local spec-repos directory at ~/.cocoapods/repos/. The remote can later be referred to by NAME.

Options:

--shallow

Create a shallow clone (fast clone, but no push capabilities).

Inherited options:

--silent

Show nothing.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.

pod repo update

pod repo update [NAME]

Updates the local clone of the spec-repo NAME. If NAME is omitted this will update all spec-repos in ~/.cocoapods/repos.

Inherited options:

--silent

Show nothing.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.

pod repo lint

pod repo lint [NAME|DIRECTORY]

Lints the spec-repo NAME. If a directory is provided it is assumed to be the root of a repo. Finally, if NAME is not provided this will lint all the spec-repos known to CocoaPods.

Options:

--only-errors

Lint presents only the errors.

Inherited options:

--silent

Show nothing.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.

pod repo list

pod repo list 

List the repos from the local spec-repos directory at ~/.cocoapods/repos/.

Options:

--count-only

Show the total number of repos.

Inherited options:

--silent

Show nothing.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.

pod repo remove

pod repo remove NAME

Deletes the remote named NAME from the local spec-repos directory at ~/.cocoapods/repos/.

Inherited options:

--silent

Show nothing.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.

pod repo push

pod repo push REPO [NAME.podspec]

Validates NAME.podspec or *.podspec in the current working dir, creates a directory and version folder for the pod in the local copy of REPO (~/.cocoapods/repos/[REPO]), copies the podspec file into the version directory, and finally it pushes REPO to its remote.

Options:

--allow-warnings

Allows pushing even if there are warnings.

--use-libraries

Linter uses static libraries to install the spec.

--local-only

Does not perform the step of pushing REPO to its remote.

Inherited options:

--silent

Show nothing.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.

pod setup

pod setup 

Creates a directory at ~/.cocoapods/repos which will hold your spec-repos. This is where it will create a clone of the public master spec-repo from:

https://github.com/CocoaPods/Specs

If the clone already exists, it will ensure that it is up-to-date.

Options:

--no-shallow

Clone full history so push will work.

Inherited options:

--silent

Show nothing.

--version

Show the version of the tool.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.

pod lib create

pod lib create NAME

Creates a scaffold for the development of a new Pod named NAME according to the CocoaPods best practices. If a TEMPLATE_URL, pointing to a git repo containing a compatible template, is specified, it will be used in place of the default one.

Options:

--template-url=URL

The URL of the git repo containing a compatible template.

Inherited options:

--silent

Show nothing.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.

pod lib lint

pod lib lint 

Validates the Pod using the files in the working directory.

Options:

--quick

Lint skips checks that would require to download and build the spec.

--allow-warnings

Lint validates even if warnings are present.

--subspec=NAME

Lint validates only the given subspec.

--no-subspecs

Lint skips validation of subspecs.

--no-clean

Lint leaves the build directory intact for inspection.

--fail-fast

Lint stops on the first failing platform or subspec.

--use-libraries

Lint uses static libraries to install the spec.

--sources=https://github.com/artsy/Specs,master

The sources from which to pull dependant pods (defaults to https://github.com/CocoaPods/Specs.git). Multiple sources must be comma-delimited..

Inherited options:

--silent

Show nothing.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.

pod ipc repl

pod ipc repl 

The repl listens to commands on standard input and prints their result to standard output.

It accepts all the other ipc subcommands. The repl will signal the end of output with the the ASCII CR+LF \n\r.

Options:

--project-directory=/project/dir/

The path to the root of the project directory.

Inherited options:

--silent

Show nothing.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.

pod ipc spec

pod ipc spec PATH

Converts a podspec to JSON and prints it to STDOUT.

Inherited options:

--silent

Show nothing.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.

pod ipc podfile

pod ipc podfile PATH

Converts a Podfile to YAML and prints it to STDOUT.

Options:

--project-directory=/project/dir/

The path to the root of the project directory.

Inherited options:

--silent

Show nothing.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.

pod ipc list

pod ipc list 

Prints to STDOUT a YAML dictionary where the keys are the name of the specifications and each corresponding value is a dictionary with the following keys:

  • defined_in_file
  • version
  • authors
  • summary
  • description
  • platforms

Inherited options:

--silent

Show nothing.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.

pod ipc update-search-index

pod ipc update-search-index 

Updates the search index and prints its path to standard output. The search index is a YAML encoded dictionary where the keys are the names of the Pods and the values are a dictionary containing the following information:

  • version
  • summary
  • description
  • authors

Inherited options:

--silent

Show nothing.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.

pod plugins list

pod plugins list 

List all known plugins (according to the list hosted on github.com/CocoaPods/cocoapods-plugins)

Inherited options:

--silent

Show nothing.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.

pod plugins installed

pod plugins installed 

List all installed plugins and their respective version.

Inherited options:

--silent

Show nothing.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.

pod plugins create

pod plugins create NAME [TEMPLATE_URL]

Creates a scaffold for the development of a new plugin named NAME according to the CocoaPods best practices.

If a TEMPLATE_URL, pointing to a git repo containing a compatible template, is specified, it will be used in place of the default one.

Inherited options:

--silent

Show nothing.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.

pod plugins publish

pod plugins publish 

This command is only useful for developers of CocoaPods plugins.

It opens a new GitHub issue to request adding the plugin currently being developped to the list of official plugins.

The current directory is expected to have one (and only one) .gemspec file describing the CocoaPods plugin gem.

Inherited options:

--silent

Show nothing.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.

pod cache list

pod cache list [NAME]

Shows the content of the pods cache as a YAML tree output, organized by pod. If NAME is given, only the caches for that pod will be included in the output.

Options:

--short

Only print the path relative to the cache root.

Inherited options:

--silent

Show nothing.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.

pod cache clean

pod cache clean [NAME]

Remove the cache for a given pod, or clear the cache completely.

If there is multiple cache for various versions of the requested pod, you will be asked which one to clean. Use --all to clean them all.

If you dont give a podNAME, you need to specify the--all` flag (this is to avoid cleaning all the cache by mistake).

Options:

--all

Remove all the cached pods without asking.

Inherited options:

--silent

Show nothing.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.