Skip to content

fuxs/aepctl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

90 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

aepctl

aepctl is a command line tool for the Adobe Experience Platform implementing a part of the REST API.

This is the initial state of this project and no release is available.

Overview

aepctl is a complement to the existing web interface and has been developed for advanced users as well as developers. In combination with activated syntax completion, aepctl accelerates the execution of repeating tasks, prototyping and learning the APIs.

Status of Implementation

At the moment the following APIs are implemented:

Quick Start

  1. Install aepctl
    • macOS
      brew install fuxs/formulae/aepctl
      
    • Windows (requires PowerShell)
      Invoke-WebRequest https://www.bungenstock.de/aepctl/releases/latest/windows/amd64/aepctl.exe -OutFile aepctl.exe
      
      Add aepctl.exe to your PATH
  2. Create an Adobe I/O Project (detailed documentation)
  3. Provide a config.yaml file with the following command
    aepctl configure
    
    Paste authentication credentials from the Adobe I/O project (click on Service Account(JWT) of your Adobe I/O project) and select a private key file. (detailed documentation)
  4. Test the configuration by getting an access token.
    aepctl get token
    

Installation

macOS

The recommended installation method is homebrew. Visit the website and install it if you haven't already.

Run the following command to install aepctl:

brew install fuxs/formulae/aepctl

zsh completion

The zsh is the default shell since macOS 10.15 Catalina and provides strong completion capabilities. It is recommended to activate completions for aepctl in order to ease the input with complex IDs or names.

The zsh requires some code for the completion function which must be stored in a file with the name _aepctl. This file must be located in a subdirectory of the $fpath environment variable. Sounds too complicated? Just follow the next steps:

Execute the following helper command:

aepctl zsh

This creates the _aepctl file in your home directory ~/.aepctl/zsh_completion

Now you have to add two lines to the .zshrc file. The first line adds the directory of the created _aepctl file to the $fpath environment variable. The second line with the compinit function activates the extended completion system of zsh.

cat <<EOT >> ~/.zshrc
fpath=(~/.aepctl/zsh_completion "${fpath[@]}")
autoload -U compinit; compinit
EOT

Some zsh frameworks like oh-my-zsh are calling compinit on their own. If you use oh-my-zsh then you must update the fpath before the source command in .zshrc.

A valid configuration could look like this:

fpath=(~/.aepctl/zsh_completion "${fpath[@]}")
source $ZSH/oh-my-zsh.s

Completion for other shells

Please call the following command for other shells and follow the instructions:

aepctl help completion

Windows

PowerShell

Open the PowerShell and follow the instructions:

  1. Download the latest pre-release aepctl latest or use Invoke-WebRequest:
Invoke-WebRequest https://www.bungenstock.de/aepctl/releases/latest/windows/amd64/aepctl.exe -OutFile aepctl.exe
  1. The validation of the binary is optional (go to step 4 if you want to skip it). Download the SHA256 file or use Invoke-WebRequest:
Invoke-WebRequest https://www.bungenstock.de/aepctl/releases/latest/windows/amd64/aepctl.exe.sha256 -OutFile aepctl.exe.sha256
  1. Check the integrity with the following command. You should get the value True as result.
(Get-FileHash aepctl.exe).Hash -eq (Get-Content aepctl.exe.sha256)
  1. Add the aepctl.exe to your PATH

  2. Test that everything is working by opening the help.

aepctl --help

License

aepctl is released under the Apache 2.0 license.

About

The command line tool for AEP

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages