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

@face-to-face-it/directus-cli

v0.3.4

Published

CLI client for the Directus API — manage items, schema, auth, and more from the command line

Readme

NPM Version License Contributors Forks Stargazers Issues

About The Project

The Directus CLI provides a comprehensive command-line interface for managing Directus CMS instances. Built on top of the official Directus SDK, it offers full CRUD operations for all Directus resources, making it perfect for automation, CI/CD pipelines, and day-to-day management tasks.

Features

  • Complete API Coverage — 94 commands covering users, roles, collections, items, files, flows, and more
  • Schema Management — Snapshot, diff, and apply schema changes with ease
  • Bulk Operations — Export and import data in JSON, CSV, XML, or YAML formats
  • Multi-Profile Support — Manage multiple Directus instances with saved connection profiles
  • Type-Safe — Built with TypeScript and the official Directus SDK for maximum reliability
  • Automation Ready — Perfect for CI/CD pipelines and shell scripting

Built With

  • TypeScript
  • oclif
  • Directus
  • Node.js

Getting Started

Get up and running with the Directus CLI in minutes.

Prerequisites

  • Node.js 20 or higher
    node --version
  • A Directus instance (local or remote)

Installation

Global Installation (Recommended)

npm install -g @face-to-face-it/directus-cli
# or
pnpm add -g @face-to-face-it/directus-cli

Local Project Installation

npm install --save-dev @face-to-face-it/directus-cli
# or
pnpm add -D @face-to-face-it/directus-cli

Using npx (No Installation)

npx @face-to-face-it/directus-cli <command>

Usage

Quick Start

# Authenticate with your Directus instance
directus-cli auth login https://your-directus.com --email [email protected] --password secret

# Or use a static token
directus-cli auth login https://your-directus.com --token your-token

# Save as a profile for easy reuse
directus-cli profile add production https://your-directus.com --default

Common Operations

# List all users
directus-cli users list

# Create a collection
directus-cli collections create articles --note "Blog posts"

# Add a field
directus-cli fields create articles title --type string --required

# Create an item
directus-cli items create articles '{"title": "Hello World"}'

# Upload a file
directus-cli files upload ./image.png --folder uploads

# Export data
directus-cli bulk export articles --format json --output articles.json

# Apply schema changes
directus-cli schema snapshot --output ./schema.yaml

Filtering and Sorting

# Filter with conditions
directus-cli users list --filter role=admin

# Multiple filters (AND logic)
directus-cli items list articles --filter status=published --filter featured=true

# JSON filter syntax
directus-cli items list articles --filter '{"date_created":{"_gt":"2024-01-01"}}'

# Sort and paginate
directus-cli users list --sort -date_created --limit 10 --offset 20

Commands

| Category | Commands | | ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------ | | Auth & Profiles | auth login, auth logout, auth refresh, auth status, profile add, profile list | | Users & Permissions | users list, users create, users update, users delete, roles list, roles create, policies list | | Collections & Fields | collections list, collections create, collections update, collections delete, fields list, fields create, fields update, fields delete | | Items | items list, items get, items create, items update, items delete | | Files & Folders | files list, files download, files upload, folders list, folders create, folders update, folders delete | | Flows & Operations | flows list, flows create, flows trigger, operations list, operations create, operations update | | Schema | schema snapshot, schema diff, schema apply | | Bulk Operations | bulk export, bulk import | | Extensions | extensions list, extensions toggle, extensions search, extensions info, extensions install, extensions uninstall, extensions reinstall, extensions upgrade |

For a complete list, run directus-cli --help or see the Documentation

Roadmap

  • [x] Complete CRUD operations for all Directus resources
  • [x] Schema management (snapshot, diff, apply)
  • [x] Multi-profile support
  • [x] Bulk import/export
  • [ ] Interactive mode for complex operations
  • [ ] Webhook management commands
  • [ ] Content versioning support
  • [ ] GraphQL query support

See the open issues for a full list of proposed features and known issues.

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

This project uses Conventional Commits and Semantic Release for automated versioning. Please ensure your commits follow the convention:

<type>(<scope>): <description>

types: feat, fix, docs, style, refactor, perf, test, build, ci, chore

How to Contribute

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'feat: add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Top contributors:

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Face-to-Face IT - GitHub Organization

Project Link: https://github.com/Face-to-Face-IT/directus-cli

Acknowledgments