npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

create-adobe-photoshop-api-sdk

v0.0.3

Published

## Set up a Photoshop API automation project with just one command

Readme

Adobe Photoshop API SDK Beta

Set up a Photoshop API automation project with just one command

Once you have your credentials, the Adobe Photoshop API SDK can help you get started quickly by streamlining library installation and configuration, and providing sample content.

  1. New Projects: With one command, the SDK will create a new Node.js project that you can build upon with all the dependencies needed to use the Photoshop API. This includes the Adobe Photoshop API Library along with sample code and test files.

  2. Existing Projects: If you have an existing project or service that simply requires the addition of the Adobe Photoshop API Library, go to Adobe Photoshop API Library and follow the installation instructions.

Quick Start

npx create-adobe-photoshop-api-sdk my-project
cd my-project

Running these commands will create a directory called my-project inside the current folder. Inside that directory, it will generate the initial project structure and install the dependencies:

my-project
├── README.md
├── node_modules
├── package.json
├── .gitignore
├── config (your credential information goes here)
│   ├── adobe-template.js
│   ├── aws-template.js
│   └── config.js
└── src
    ├── sample
    │   ├── batch_script (This directory contains Photoshop API sample scripts for batch jobs)
    │   └── psapi (This directory contains Photoshop API sample scripts for a single job)
    └── testfiles (This directory contains test files that are used in sample scripts)

Set your configuration

You need to configure your Photoshop API credentials.

  1. Open config/adobe-template.js and save as config/adobe.js.

  2. Fill out the information in config/adobe.js. Everything you need to fill out can be found in your console. If you have not created your credential yet, go to Getting started with Photoshop API.

    // Adobe Photoshop API Configuration
    // https://developer.adobe.com/console/projects -> project -> OAuth Server-to-Server
    
    const adobeConfig = {
       clientId: "",
       clientSecret: "",
       orgId: ""
    };

Run /documentManifest Photoshop API using this SDK

node src/sample/psapi/11_getDocumentManifest.js

You will receive an API response that shows a JSON manifest for input01.psd. The JSON manifest contains the tree representation of all of the layer objects contained in the PSD document.

Other sample scripts require output storage to be set up. Below are the setup instructions for AWS S3.

Input and output file storage

We support external services including AWS S3, Azure, Dropbox and Google Drive. To set up external storage using AWS S3, please follow the instructions below. More details are to follow for other storage providers.

Access to AWS

  1. If you don't already have an AWS account you can create one.
  2. Once your account is created, [create an S3 bucket] (https://s3.console.aws.amazon.com/s3/buckets).
  3. Select “Create bucket” and name your bucket.

Create AWS access key

If you do not have an AWS access key already, you will need to create one by going to AWS Account and Access Keys. Copy and paste the “Secret access key” and store it in a safe place. You will need it in the next step. We recommend downloading the .csv file and storing it in a safe location as the Secret will not be accessible after you leave the screen

Set up AWS CLI

  1. Install AWS CLI
  2. Configure AWS CLI by running the following command in your terminal: aws configure
  3. If you already have an aws profile, run aws configure [--profile profile-name]
  4. You will need to enter the following information:
    • Add your AWS access key
    • Add your AWS Secret access key
    • Choose a default region (Choose a region closest to you for faster processing.)
    • Choose a default output (format: NONE)
  5. Test AWS CLI: Run the following command aws s3 ls to verify everything is configured correctly. The command should return a list of your available buckets.
  6. Open config/aws-template.js, save as config/aws.js, and fill in the information in config/aws.js.
// AWS Configuration
// https://aws.amazon.com/console/

const awsConfig = {
    accessKeyId: '',
    secretAccessKey: '',
    region: '',
    bucketName: ''
}

Run Sample Script

Run a sample script (src/sample/psapi/...)

  1. Run a sample script to remove the background of the image
node src/sample/psapi/01_createCutout.js
  1. Find your output file in your S3 storage, output directory (ex: s3://<awsConfig.bucketName>/output/...)

Run a sample script for a batch job (src/sample/batch_script/...)

  1. Store multiple JPEG files in your S3 storage (ex: s3://<awsConfig.bucketName>/input/...) or modify input/output directories in the sample script.
// -------------------------------------------------
// Enter your parameters
// -------------------------------------------------
const inputDir = 'input/' //your input directory in S3 bucket (ex: s3://<awsConfig.bucketName>/input)
const outputDir = 'output' //your output directory in S3 bucket (ex: s3://<awsConfig.bucketName>/input/output)

const listObjectsInputRequest = { //URI Request Parameters
  // Add more request as you like.  see https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjectsV2.html for more details
  Bucket: awsConfig.bucketName, //Bucket name to list.
  Prefix: inputDir, // Keys that begin with the indicated prefix.
  MaxKeys: 5 // Sets the maximum number of keys returned in the response. By default, the action returns up to 1,000 key names.
};
// -------------------------------------------------
  1. Run a sample script to remove the background of the multiple images
node src/sample/batch_job/01_createCutout_batch.js
  1. Find your output files in your S3 storage, output directory (ex: s3://<awsConfig.bucketName>/input/output/...)
  • You can also use AWS CLI to sync files from your S3 storage into your local machine (ex: aws s3 sync s3://<awsConfig.bucketName>/input/output/ /Users/<username>/Desktop/output/)

Links