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 🙏

© 2024 – Pkg Stats / Ryan Hefner

duckcloud-cli

v2.4.0

Published

DuckCloud command line interface and wrapper

Downloads

5

Readme

duckcloud-cli

DuckCloud command line interface

Install

$ npm i --location-global duckcloud-cli
$ pnpm add -g duckcloud-cli # pnpm install
$ yarn add -g duckcloud-cli # yarn install

Usage

$ duckcl --help
duckcl <command>

Commands:
  duckcl login [username]                  Login with duckcloud
  duckcl container <id>                    Select a container
  duckcl sh                                Open shell in selected container
  duckcl powerctl <action>                 power control
  duckcl script <path>                     Run script on selected container (*wi
                                           ll run as if the user typed it, sheba
                                           ng is not necessary)
  duckcl rm                                Delete selected container (cannot be
                                           undone)
  duckcl create                            Create a new container
  duckcl ls                                List all containers
  duckcl config [path]                     Modify/view configuration
  duckcl forward <remotePort> <localpath>  Forwards a TCP port from a DuckCloud
                                           container to your local machine
  duckcl proxycmd <port>                   Proxy stdin/stdout to a TCP connectio
                                           n (can be used for ssh)
  duckcl pro                               pro control

Options:
  --help     Show help                                                 [boolean]
  --version  Show version number                                       [boolean]

Where is the config

At ~/.duckcl.json5

Ultimatelogon

Ultimatelogon login is in beta and doesn't work right now, please don't try using it.

How do I update my configuration?

If you upgraded to a newer version of duckcloud-cli with new configuration entries, you'll need to run duckcl config --reset to reset your configuration back to the newer defaults.

How do I exit ~~vim~~ the shell?

Press Ctrl+] and .

API Wrapper Documentation

You can use the API wrapper like this:

import { DuckCloud, Distro } from "duckcloud-cli";

const duckc = new DuckCloud("https://duckcloud.pcprojects.tk");
console.log(await duckc.Login(process.argv[2], process.argv[3]));
const containers = await duckc.User.GetContainers();
const shell = containers[0].Shell();
shell.on('data', (data: string) => {
	process.stdout.write(data);
})
shell.on('disconnect', () => { console.log('disconnect'); process.exit(0) });
  • <DuckCloud>.Login(username: string, password: string): Promise<boolean> Logs into a account
  • <DuckCloud>.User User object
  • <User>.GetContainers(): Container[] Get all containers from the user
  • <User>.CreateContainer(name: string, network: boolean, pro: boolean, distro: Distro): Promise<number> Create a container on the user account
  • Distro.debian Debian
  • Distro.archlinux Arch Linux
  • Distro["duckcloud/suspiral"] Suspiral (custom debian)
  • Status.online Online status
  • Status.offline Offline status
  • <Container>.id Id of the container
  • <Container>.name Name of the container
  • <Container>.status Status of the container
  • <Container>.TogglePower() Toggle the container's power
  • <Container>.Remove() Remove the container from existence
  • <Container>.Shell() Get the container's shell