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

@julesbonnard/apicore-cli

v0.4.0

Published

A modern CLI to get fresh news from apicore

Downloads

39

Readme

apicore CLI

A modern command-line interface for AFP apicore — search news, retrieve documents, manage notifications, and handle authentication.

oclif GitHub license

Quick start

npm install -g @julesbonnard/apicore-cli

# Authenticate (interactive prompts for credentials)
apicore login --apiKey YOUR_API_KEY

# Search for recent news
apicore search "climate change" --size 5

# Get a specific document
apicore get TS4XRII6FF

Installation

npm install -g @julesbonnard/apicore-cli

Requires Node.js >= 18.

Authentication

All commands except login require a valid token. Tokens are stored locally in ~/.config/apicore/config.json and refreshed automatically.

# First-time setup: provide your API key, then enter username/password
apicore login --apiKey YOUR_API_KEY

# Check authentication status
apicore login --info

# Use a separate profile (e.g. for staging)
apicore login --profile staging

You can also pass --username and --password flags for non-interactive use.

Commands

apicore search [QUERY]

Search documents with filters and multiple output formats.

# Basic search
apicore search "france"

# Filter by language and product
apicore search "elections" -l fr,es -p news

# Date range
apicore search --from 2024-01-01 --to 2024-06-01

# Output as JSON (one object per line, streamable)
apicore search --json

# Output as table or CSV
apicore search --table
apicore search --output csv

# Show all columns
apicore search --table --extended

| Flag | Short | Description | Default | |------|-------|-------------|---------| | --fields | -f | Fields to return | afpshortid, uno, revision, country, product, created, published, lang, headline, slug | | --langs | -l | Filter by languages (comma-separated) | | | --products | -p | Filter by products (comma-separated) | | | --from | | Start date | 1980-01-01 | | --to | | End date | now | | --size | | Max documents to return | 10 | | --sortField | | Field to sort by | published | | --sortOrder | | asc or desc | desc | | --table | | Display as formatted table | | | --output | | csv or json | | | --columns | | Show specific columns (comma-separated) | | | --extended | | Show all columns including hidden ones | |

apicore get ID

Retrieve a single document by UNO or shortId (7 characters).

apicore get TS4XRII6FF
apicore get abc1234       # shortId lookup
apicore get TS4XRII6FF --json

apicore notifications services

List and manage notification services.

# List all services
apicore notifications services

# Delete a service
apicore notifications services delete my-service

apicore notifications subscriptions [SERVICENAME]

List and manage notification subscriptions.

# List all subscriptions
apicore notifications subscriptions

# List subscriptions for a specific service
apicore notifications subscriptions my-service

# Delete a subscription
apicore notifications subscriptions delete my-service sub-123

Global flags

| Flag | Description | |------|-------------| | --json | Output as JSON (available on login, get, search) | | --profile | Use a named profile for separate auth configs | | --help | Show help for any command | | --version | Show CLI version |

Development

git clone https://github.com/julesbonnard/apicore-cli.git
cd apicore-cli
npm install
npm run build

# Run in development mode (no build needed)
./bin/dev.js search "test"

License

MIT