You can use AWS CLI to create an AWS CodePipeline. For that, you need to create a JSON file with a pipeline structure and then execute the create-pipeline command with the JSON file as the input parameter. You can execute the get-pipeline command to get the JSON structure of the existing pipeline, and modify it to create the JSON file. If you don't have any existing pipeline, then you can use the AWS CodePipeline wizard to create a pipeline and use that JSON structure.
There are two ways to create a pipeline from CLI, which are as follows: