mirror of
https://github.com/Dokploy/cli.git
synced 2026-06-18 05:35:24 +02:00
- Removed the .mocharc.json file as part of the project cleanup. - Updated README to enhance clarity on usage, authentication options, and command examples. - Added details on environment variable support and improved command structure for better user guidance.
31 lines
675 B
JavaScript
31 lines
675 B
JavaScript
#!/usr/bin/env node
|
|
|
|
import chalk from "chalk";
|
|
import { program } from "commander";
|
|
import { registerAuthCommand } from "./commands/auth.js";
|
|
import { registerGeneratedCommands } from "./generated/commands.js";
|
|
|
|
const pkg = {
|
|
name: "dokploy",
|
|
version: "0.3.0",
|
|
description: "Dokploy CLI - Manage your Dokploy server",
|
|
};
|
|
|
|
program
|
|
.name(pkg.name)
|
|
.version(pkg.version)
|
|
.description(pkg.description)
|
|
.action(() => {
|
|
program.help();
|
|
});
|
|
|
|
registerAuthCommand(program);
|
|
registerGeneratedCommands(program);
|
|
|
|
const argv = process.argv.filter((arg) => arg !== "--");
|
|
|
|
program.parseAsync(argv).catch((err) => {
|
|
console.error(chalk.red(err.message));
|
|
process.exit(1);
|
|
});
|