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

alfresco-javascript-console

v0.1.3

Published

write and run JavaScript scripts against an Alfresco repository directly from the IDE

Readme

Alfresco JavaScript Console

Run JavaScript scripts against an Alfresco repository from VS Code or the command line.

Supports both OOTBee JavaScript Console (actively maintained) and the original fme AG JavaScript Console, with automatic variant detection.

Installation

VS Code Extension

Install from the VS Code Marketplace, or search for "Alfresco Javascript Console" in VS Code extensions.

CLI

npm install -g alfresco-javascript-console

VS Code Extension

Quick Start

  1. Install the extension
  2. Configure your server: Ctrl+Shift+P → "Configure Alfresco Server"
  3. Open a JavaScript file and press Ctrl+Shift+R to execute

Features

  • Script Execution — Run scripts directly against Alfresco with real-time streaming output
  • Multi-Profile — Manage multiple Alfresco server connections and switch between them
  • Parameter Control — Configure transaction type, run-as user, space/document context, and FreeMarker templates
  • Code Snippets — Built-in Alfresco API snippets (type alf- for suggestions)
  • Secure Storage — Credentials stored in VS Code's secret storage

Commands

| Command | Shortcut | Description | |---|---|---| | Run Script | Ctrl+Shift+R | Execute current script against Alfresco | | Configure Server | | Set up server connection | | Open Console Panel | | Show execution parameter panel | | Add Server Profile | | Add a new server profile | | Switch Server Profile | | Switch active profile | | Edit Server Profile | | Edit an existing profile | | Delete Server Profile | | Remove a profile |

Settings

| Setting | Description | |---|---| | alfrescoJsConsole.server.url | Alfresco server URL | | alfrescoJsConsole.server.consoleVariant | Console variant: auto, ootbee, or fme | | alfrescoJsConsole.server.username | Username for authentication | | alfrescoJsConsole.execution.defaultTransaction | Default transaction type (readonly / readwrite) | | alfrescoJsConsole.execution.defaultRunAs | Default run-as user |

Code Snippets

Type any prefix and press Tab:

alf-search · alf-props · alf-create · alf-people · alf-home · alf-workflow · alf-perms · alf-aspects · alf-children

CLI

Zero-dependency command-line tool for running Alfresco scripts from the terminal or CI pipelines.

Usage

# Run a script file
alfresco-js-console run script.js --server https://localhost:8080/alfresco --username admin --password admin

# Read from stdin
cat script.js | alfresco-js-console run -

# Use a saved profile
alfresco-js-console run script.js

# With FreeMarker template
alfresco-js-console run script.js --template output.ftl

# JSON output (for scripting/AI tooling)
alfresco-js-console run script.js --json

Profile Management

# Add a profile
alfresco-js-console profile add

# List profiles
alfresco-js-console profile list

# Switch active profile
alfresco-js-console profile switch <name>

# Delete a profile
alfresco-js-console profile delete <name>

Profiles are stored in ~/.alfresco-js-console/config.json with 0600 permissions.

FreeMarker Templates

Pass a FreeMarker template file with --template to format script output. Populate the template model by setting properties on the model object in your script:

script.js:

var children = companyhome.children;
model.nodes = children;
model.user = person.properties["cm:userName"];

output.ftl:

User: ${user}

<#list nodes as node>
  ${node.name} (${node.typeShort}) - ${node.nodeRef}
</#list>
alfresco-js-console run script.js --template output.ftl

Exit Codes

| Code | Meaning | |---|---| | 0 | Success | | 1 | Script execution error | | 2 | Configuration or usage error |

Sample Script

// print() streams output in real-time
print("Hello from Alfresco!");
print("Company Home: " + companyhome.name);
print("Current User: " + person.properties["cm:userName"]);

var children = companyhome.children;
print("Company Home has " + children.length + " children:");
for (var i = 0; i < Math.min(children.length, 5); i++) {
    print("  - " + children[i].name);
}

// model.* populates FreeMarker template variables
model.nodes = children;
model.user = person.properties["cm:userName"];

Requirements

  • Access to an Alfresco server with JavaScript Console webscript installed
  • Valid Alfresco user credentials
  • VS Code extension: VS Code 1.99.0+
  • CLI: Node.js 20+

License

MIT