Skip to content

Commit 0869e2d

Browse files
committed
chore: update README and remove .mocharc.json
- 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.
1 parent 4d604a1 commit 0869e2d

4 files changed

Lines changed: 135 additions & 185 deletions

File tree

.mocharc.json

Lines changed: 0 additions & 15 deletions
This file was deleted.

CONTRIBUTING.md

Lines changed: 32 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -1,113 +1,63 @@
1-
2-
31
# Contributing
42

5-
Hey, thanks for your interest in contributing to Dokploy CLI! We appreciate your help and taking your time to contribute.
6-
7-
8-
Before you start, please first discuss the feature/bug you want to add with the owners and comunity via github issues.
9-
10-
We have a few guidelines to follow when contributing to this project:
11-
12-
- [Commit Convention](#commit-convention)
13-
- [Setup](#setup)
14-
- [Development](#development)
15-
- [Build](#build)
16-
- [Pull Request](#pull-request)
17-
18-
## Commit Convention
19-
20-
Before you craete a Pull Request, please make sure your commit message follows the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification.
21-
22-
### Commit Message Format
23-
```
24-
<type>[optional scope]: <description>
25-
26-
[optional body]
27-
28-
[optional footer(s)]
29-
```
30-
31-
#### Type
32-
Must be one of the following:
33-
34-
* **feat**: A new feature
35-
* **fix**: A bug fix
36-
* **docs**: Documentation only changes
37-
* **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
38-
* **refactor**: A code change that neither fixes a bug nor adds a feature
39-
* **perf**: A code change that improves performance
40-
* **test**: Adding missing tests or correcting existing tests
41-
* **build**: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
42-
* **ci**: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
43-
* **chore**: Other changes that don't modify `src` or `test` files
44-
* **revert**: Reverts a previous commit
45-
46-
Example:
47-
```
48-
feat: add new feature
49-
```
50-
51-
3+
Thanks for your interest in contributing to Dokploy CLI!
524

5+
Before you start, please discuss the feature/bug via [GitHub issues](https://github.com/Dokploy/cli/issues).
536

547
## Setup
558

56-
Before you start, please make the clone based on the `main` branch.
57-
589
```bash
5910
git clone https://github.com/Dokploy/cli.git
6011
cd cli
6112
pnpm install
6213
```
6314

64-
## Development
15+
Create a `.env` file with your credentials:
6516

66-
First step is to authenticate, you can connect to a dokploy localhost or a remote dokploy server.
17+
```env
18+
DOKPLOY_URL="https://your-server.dokploy.com"
19+
DOKPLOY_API_KEY="YOUR_API_KEY"
20+
```
6721

68-
Authenticate
22+
## Development
6923

7024
```bash
71-
./bin/dev.js authenticate
72-
```
25+
# Run in dev mode
26+
pnpm run dev -- project all
7327

74-
Let's take the example to create a new command for application called `start`.
28+
# Regenerate commands from OpenAPI spec
29+
pnpm run generate
7530

76-
You can use the generators from OCLIF to create a new command.
31+
# Build
32+
pnpm run build
7733

78-
```bash
79-
oclif generate command application:start
34+
# Lint & format
35+
pnpm run lint
8036
```
8137

82-
To run the command, you can use the following command:
38+
### Updating commands
8339

84-
```bash
85-
./bin/dev.js application:start or ./bin/dev.js start
86-
```
40+
Commands in `src/generated/commands.ts` are auto-generated from `openapi.json`. Never edit that file manually. To update:
8741

88-
## Build
42+
1. Replace `openapi.json` with the latest spec from the [Dokploy repo](https://github.com/Dokploy/dokploy)
43+
2. Run `pnpm run generate`
8944

90-
```bash
91-
pnpm run build
92-
```
45+
## Commit convention
9346

94-
## Publish
47+
Follow [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/):
9548

96-
```bash
97-
pnpm run publish
49+
```
50+
feat: add new feature
51+
fix: resolve bug
52+
docs: update readme
53+
chore: bump version
9854
```
9955

56+
## Pull requests
10057

101-
## Pull Request
102-
103-
- The `main` branch is the source of truth and should always reflect the latest stable release.
104-
- Create a new branch for each feature or bug fix.
105-
- Make sure to add tests for your changes.
106-
- Make sure to update the documentation for any changes Go to the [docs.dokploy.com](https://docs.dokploy.com) website to see the changes.
107-
- When creating a pull request, please provide a clear and concise description of the changes made.
108-
- If you include a video or screenshot, would be awesome so we can see the changes in action.
109-
- If your pull request fixes an open issue, please reference the issue in the pull request description.
110-
- Once your pull request is merged, you will be automatically added as a contributor to the project.
58+
- Branch from `main`
59+
- Provide a clear description of your changes
60+
- Reference any related issues
61+
- Include a screenshot/video if applicable
11162

11263
Thank you for your contribution!
113-

readme.md

Lines changed: 100 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -1,131 +1,144 @@
11
# Dokploy CLI
22

3-
<!-- ![Dokploy Logo](https://via.placeholder.com/150x150.png?text=Dokploy+CLI) -->
4-
5-
Dokploy CLI is a powerful and versatile command-line tool designed to remotely manage your Dokploy server. It simplifies the process of creating, deploying, and managing applications and databases.
6-
7-
<!-- [![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)
8-
[![Version](https://img.shields.io/npm/v/dokploy.svg)](https://npmjs.org/package/dokploy)
9-
[![Downloads/week](https://img.shields.io/npm/dw/dokploy.svg)](https://npmjs.org/package/dokploy)
10-
[![License](https://img.shields.io/npm/l/dokploy.svg)](https://github.com/yourusername/dokploy/blob/master/package.json) -->
11-
12-
## Table of Contents
13-
14-
- [Installation](#installation)
15-
- [Usage](#usage)
16-
- [Commands](#commands)
17-
- [Authentication](#authentication)
18-
- [Project Management](#project-management)
19-
- [Application Management](#application-management)
20-
- [Environment Management](#environment-management)
21-
- [Database Management](#database-management)
22-
- [Contributing](#contributing)
23-
- [Support](#support)
24-
- [License](#license)
3+
Dokploy CLI is a command-line tool to manage your Dokploy server remotely. It provides **449 commands** auto-generated from the Dokploy OpenAPI spec, covering every API endpoint.
254

265
## Installation
276

28-
```sh-session
29-
$ npm install -g @dokploy/cli
7+
```bash
8+
npm install -g @dokploy/cli
309
```
3110

32-
## Usage
33-
34-
```sh-session
35-
$ dokploy COMMAND
36-
running command...
11+
## Authentication
3712

38-
$ dokploy --version
39-
dokploy/0.0.0 darwin-arm64 node-v18.18.0
13+
### Option 1: Using the `auth` command
4014

41-
$ dokploy --help [COMMAND]
42-
USAGE
43-
$ dokploy COMMAND
44-
...
15+
```bash
16+
dokploy auth -u https://panel.dokploy.com -t YOUR_API_KEY
4517
```
4618

47-
## Commands
19+
### Option 2: Environment variables
4820

49-
### Authentication
50-
51-
- `dokploy authenticate`: Authenticate with the Dokploy server.
52-
- `dokploy verify`: Verify current authentication.
21+
```bash
22+
export DOKPLOY_URL="https://panel.dokploy.com"
23+
export DOKPLOY_API_KEY="YOUR_API_KEY"
24+
```
5325

54-
### Project Management
26+
### Option 3: `.env` file
5527

56-
- `dokploy project:create`: Create a new project.
57-
- `dokploy project:info`: Get information about an existing project.
58-
- `dokploy project:list`: List all projects.
28+
Create a `.env` file in your working directory:
5929

60-
### Environment Management
30+
```env
31+
DOKPLOY_URL="https://panel.dokploy.com"
32+
DOKPLOY_API_KEY="YOUR_API_KEY"
33+
```
6134

62-
- `dokploy environment:create`: Create a new environment.
63-
- `dokploy environment:delete`: Delete an existing environment.
35+
The CLI loads it automatically. Shell environment variables take priority over the `.env` file.
6436

65-
### Application Management
37+
## Usage
6638

67-
- `dokploy app:create`: Create a new application.
68-
- `dokploy app:delete`: Delete an existing application.
69-
- `dokploy app:deploy`: Deploy an application.
70-
- `dokploy app:stop`: Stop a running application.
39+
```bash
40+
dokploy <group> <action> [options]
41+
```
7142

72-
### Enviroment Management
43+
### Examples
7344

74-
- `dokploy env pull <file>`: Pull environment variables from Dokploy in a <file>.
75-
- `dokploy env push <file>`: Push environment variables to Dokploy from a <file>.
45+
```bash
46+
# List all projects
47+
dokploy project all
7648

77-
### Database Management
49+
# Get a specific project
50+
dokploy project one --projectId abc123
7851

79-
Dokploy supports various types of databases:
52+
# Create an application
53+
dokploy application create --name "my-app" --environmentId env123
8054

81-
#### MariaDB
55+
# Deploy an application
56+
dokploy application deploy --applicationId app123
8257

83-
- `dokploy database:mariadb:create`
84-
- `dokploy database:mariadb:delete`
85-
- `dokploy database:mariadb:deploy`
86-
- `dokploy database:mariadb:stop`
58+
# Create a postgres database
59+
dokploy postgres create --name "my-db" --environmentId env123
8760

88-
#### MongoDB
61+
# Stop a database
62+
dokploy postgres stop --postgresId pg123
8963

90-
- `dokploy database:mongo:create`
91-
- `dokploy database:mongo:delete`
92-
- `dokploy database:mongo:deploy`
93-
- `dokploy database:mongo:stop`
64+
# Get raw JSON output
65+
dokploy project all --json
66+
```
9467

95-
#### MySQL
68+
### Getting help
9669

97-
- `dokploy database:mysql:create`
98-
- `dokploy database:mysql:delete`
99-
- `dokploy database:mysql:deploy`
100-
- `dokploy database:mysql:stop`
70+
```bash
71+
# List all groups
72+
dokploy --help
10173

102-
#### PostgreSQL
74+
# List actions in a group
75+
dokploy application --help
10376

104-
- `dokploy database:postgres:create`
105-
- `dokploy database:postgres:delete`
106-
- `dokploy database:postgres:deploy`
107-
- `dokploy database:postgres:stop`
77+
# See options for a specific action
78+
dokploy application deploy --help
79+
```
10880

109-
#### Redis
81+
## Available command groups
82+
83+
| Group | Commands | Group | Commands |
84+
|---|---|---|---|
85+
| `admin` | 1 | `notification` | 38 |
86+
| `ai` | 9 | `organization` | 10 |
87+
| `application` | 29 | `patch` | 12 |
88+
| `backup` | 11 | `port` | 4 |
89+
| `bitbucket` | 7 | `postgres` | 14 |
90+
| `certificates` | 4 | `preview-deployment` | 4 |
91+
| `cluster` | 4 | `project` | 8 |
92+
| `compose` | 28 | `redirects` | 4 |
93+
| `deployment` | 8 | `redis` | 14 |
94+
| `destination` | 6 | `registry` | 7 |
95+
| `docker` | 7 | `rollback` | 2 |
96+
| `domain` | 9 | `schedule` | 6 |
97+
| `environment` | 7 | `security` | 4 |
98+
| `gitea` | 8 | `server` | 16 |
99+
| `github` | 6 | `settings` | 49 |
100+
| `gitlab` | 7 | `ssh-key` | 6 |
101+
| `git-provider` | 2 | `sso` | 10 |
102+
| `license-key` | 6 | `stripe` | 7 |
103+
| `mariadb` | 14 | `swarm` | 3 |
104+
| `mongo` | 14 | `user` | 18 |
105+
| `mounts` | 6 | `volume-backups` | 6 |
106+
| `mysql` | 14 | | |
107+
108+
## Development
109+
110+
```bash
111+
# Install dependencies
112+
pnpm install
113+
114+
# Run in dev mode
115+
pnpm run dev -- project all
116+
117+
# Regenerate commands from OpenAPI spec
118+
pnpm run generate
119+
120+
# Build
121+
pnpm run build
122+
123+
# Lint & format
124+
pnpm run lint
125+
```
110126

111-
- `dokploy database:redis:create`
112-
- `dokploy database:redis:delete`
113-
- `dokploy database:redis:deploy`
114-
- `dokploy database:redis:stop`
127+
### Updating commands
115128

116-
For more information about a specific command, use:
129+
Commands are auto-generated from `openapi.json`. To update:
117130

118-
```sh-session
119-
$ dokploy [COMMAND] --help
120-
```
131+
1. Replace `openapi.json` with the latest spec from the [Dokploy repo](https://github.com/Dokploy/dokploy)
132+
2. Run `pnpm run generate`
133+
3. Build with `pnpm run build`
121134

122135
## Contributing
123136

124137
If you want to contribute to Dokploy CLI, please check out our [Contributing Guide](https://github.com/Dokploy/cli/blob/main/CONTRIBUTING.md).
125138

126139
## Support
127140

128-
If you encounter any issues or have any questions, please [open an issue](https://github.com/yourusername/dokploy/issues) in our GitHub repository.
141+
If you encounter any issues or have any questions, please [open an issue](https://github.com/Dokploy/cli/issues) in our GitHub repository.
129142

130143
## License
131144

0 commit comments

Comments
 (0)