Skip to content

wyre-technology/hudu-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Hudu CLI

Command-line interface for Hudu IT documentation platform. Manage companies, assets, passwords, knowledge base articles, and more from your terminal.

Features

  • Full CRUD operations for companies, assets, passwords, and knowledge base articles
  • Manage asset layouts and website monitoring
  • Browse folders, procedures, activity logs, and Magic Dash items
  • JSON output by default with optional table formatting
  • Built with TypeScript for type safety
  • Uses the official @wyre-technology/node-hudu package

Installation

Note: This package depends on @wyre-technology/node-hudu which must be published first.

npm install -g @wyre-technology/hudu-cli

Development Installation

If you're developing locally before the node-hudu package is published:

git clone https://github.com/wyre-technology/hudu-cli.git
cd hudu-cli
npm install
npm run build
npm link

Configuration

Set the following environment variables:

export HUDU_BASE_URL="https://your-company.huducloud.com"
export HUDU_API_KEY="your-api-key"

You can also add these to your .bashrc, .zshrc, or .env file.

Usage

Test Connection

hudu test

Companies

# List companies
hudu companies list
hudu companies list --format table
hudu companies list --name "Acme" --city "New York"

# Get a company
hudu companies get 123
hudu companies get 123 --format table

# Create a company
hudu companies create \
  --name "Acme Corp" \
  --city "New York" \
  --state "NY" \
  --phone "555-1234"

# Update a company
hudu companies update 123 --name "Acme Corporation" --website "https://acme.com"

# Archive/unarchive a company
hudu companies archive 123
hudu companies unarchive 123

# Delete a company
hudu companies delete 123 --yes

Assets

# List assets
hudu assets list
hudu assets list --company-id 123 --format table
hudu assets list --asset-layout-id 5 --name "Server"

# Get an asset
hudu assets get 456

# Create an asset
hudu assets create \
  --company-id 123 \
  --asset-layout-id 5 \
  --name "Web Server 01" \
  --serial "ABC123" \
  --manufacturer "Dell"

# Update an asset
hudu assets update 456 --name "Web Server 01 (Production)"

# Archive an asset
hudu assets archive 456

# Delete an asset
hudu assets delete 456 --yes

Asset Layouts

# List asset layouts
hudu asset-layouts list
hudu layouts list --format table

# Get an asset layout
hudu layouts get 5

# Create an asset layout
hudu layouts create \
  --name "Servers" \
  --icon "server" \
  --color "#3498db" \
  --include-passwords \
  --active

# Update an asset layout
hudu layouts update 5 --name "Server Assets" --color "#2ecc71"

Passwords

# List passwords
hudu passwords list
hudu passwords list --company-id 123 --format table
hudu passwords list --search "admin"

# Get a password
hudu passwords get 789

# Create a password
hudu passwords create \
  --company-id 123 \
  --name "Admin Portal" \
  --username "admin" \
  --password "s3cr3t" \
  --url "https://portal.example.com"

# Update a password
hudu passwords update 789 --password "n3w_p4ssw0rd"

# Delete a password
hudu passwords delete 789 --yes

Articles (Knowledge Base)

# List articles
hudu articles list
hudu articles list --company-id 123 --draft

# Get an article
hudu articles get 101

# Create an article
hudu articles create \
  --name "Setup Guide" \
  --content "<h1>Setup Instructions</h1><p>Follow these steps...</p>" \
  --folder-id 10

# Update an article
hudu articles update 101 --name "Complete Setup Guide"

# Archive an article
hudu articles archive 101

# Delete an article
hudu articles delete 101 --yes

Websites

# List websites
hudu websites list
hudu websites list --company-id 123 --format table

# Get a website
hudu websites get 202

# Create a website
hudu websites create \
  --name "Company Website" \
  --url "https://example.com" \
  --company-id 123

# Update a website
hudu websites update 202 --paused true

# Delete a website
hudu websites delete 202 --yes

Folders, Procedures, and More

# List folders
hudu folders list
hudu folders list --company-id 123 --format table

# List procedures
hudu procedures list
hudu procedures list --company-id 123

# List activity logs
hudu activity-logs list
hudu logs list --user-email "admin@example.com" --format table

# List relations
hudu relations list

# List Magic Dash items
hudu magic-dash list
hudu dash list --company-id 123 --format table

Output Formats

By default, all commands output JSON. Use --format table or -f table for human-readable tables:

# JSON output (default)
hudu companies list

# Table output
hudu companies list --format table

Command Aliases

Many commands have convenient aliases:

  • hudu companieshudu company
  • hudu assetshudu asset
  • hudu asset-layoutshudu layout
  • hudu passwordshudu password
  • hudu articleshudu article
  • hudu websiteshudu website
  • hudu activity-logshudu logs
  • hudu magic-dashhudu dash
  • hudu companies listhudu companies ls
  • hudu companies deletehudu companies rm

Pagination

List commands support pagination:

hudu companies list --page 2 --page-size 50

Environment Variables

  • HUDU_BASE_URL - Your Hudu instance URL (required)
  • HUDU_API_KEY - Your Hudu API key (required)

Development

# Clone the repository
git clone https://github.com/wyre-technology/hudu-cli.git
cd hudu-cli

# Install dependencies
npm install

# Build
npm run build

# Run locally
npm start -- companies list

Contributing

See CONTRIBUTING.md for guidelines on how to contribute to this project.

License

MIT - see LICENSE file for details.

Links

Support

For issues and feature requests, please use the GitHub issue tracker.

About

Command-line interface for Hudu IT documentation platform - manage companies, assets, passwords, and knowledge base

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors