Skip to content

Commit 11de1a5

Browse files
Add Contribution instructions
1 parent 1e59484 commit 11de1a5

2 files changed

Lines changed: 117 additions & 8 deletions

File tree

CONTRIBUTING.md

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
# Contributing to `dbxcli`
2+
3+
Thanks for your interest in improving `dbxcli`.
4+
5+
## Before you start
6+
7+
For non-trivial contributions, complete the Dropbox Contributor License Agreement:
8+
9+
https://opensource.dropbox.com/cla/
10+
11+
If you're planning a larger feature or behavior change, consider opening an issue first.
12+
13+
## Development
14+
15+
Requirements:
16+
- Go 1.25+
17+
- Git
18+
19+
Build:
20+
```
21+
go build .
22+
```
23+
24+
Run:
25+
```
26+
go run . --help
27+
```
28+
29+
## Repository layout
30+
- cmd/ Cobra commands
31+
- docs/ Generated documentation
32+
- docs/json-schema/v1/ Generated JSON schemas
33+
- packaging/ Release packaging
34+
- tools/ Documentation and schema generators
35+
36+
## Design principles
37+
38+
`dbxcli` is designed for humans, scripts, CI pipelines, and AI agents.
39+
40+
When contributing, prefer changes that preserve:
41+
- backward compatibility where practical
42+
- stable automation interfaces
43+
- predictable JSON output and JSON help
44+
- composable command-line behavior
45+
- cross-platform support
46+
47+
## Making changes
48+
49+
Keep pull requests focused.
50+
51+
When adding or modifying commands:
52+
- update help text
53+
- add or update tests
54+
- preserve JSON compatibility when possible
55+
- regenerate documentation
56+
- regenerate JSON schemas if applicable
57+
58+
See:
59+
- docs/automation.md
60+
- docs/json-schema/v1/README.md
61+
62+
## Validation
63+
64+
Run before submitting:
65+
```
66+
go test ./...
67+
go vet ./...
68+
go build ./...
69+
```
70+
71+
For concurrency-sensitive changes:
72+
```
73+
go test -race ./...
74+
```
75+
76+
Recommended:
77+
```
78+
golangci-lint run
79+
govulncheck ./...
80+
```
81+
82+
## Generated files
83+
84+
If command structure, help, or JSON metadata changes:
85+
```
86+
go run ./tools/gen-docs
87+
go run ./tools/gen-json-schemas
88+
```
89+
90+
Ensure the generated files are committed.
91+
92+
## Pull requests
93+
94+
Please include:
95+
- what changed
96+
- why
97+
- validation performed
98+
- related issue (if any)
99+
100+
Small, focused pull requests are easier to review.
101+
102+
## Reporting bugs
103+
104+
Include:
105+
- `dbxcli` version
106+
- operating system
107+
- command executed
108+
- expected behavior
109+
- actual behavior
110+
- reproduction steps
111+
112+
Remove access tokens and other sensitive information before posting logs.

README.md

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
[![CI](https://github.com/dropbox/dbxcli/actions/workflows/ci.yml/badge.svg)](https://github.com/dropbox/dbxcli/actions/workflows/ci.yml)
44
[![Scorecard](https://github.com/dropbox/dbxcli/actions/workflows/scorecard.yml/badge.svg)](https://github.com/dropbox/dbxcli/actions/workflows/scorecard.yml)
55
[![CodeQL](https://github.com/dropbox/dbxcli/actions/workflows/codeql.yml/badge.svg)](https://github.com/dropbox/dbxcli/actions/workflows/codeql.yml)
6+
[![Release](https://github.com/dropbox/dbxcli/actions/workflows/release.yml/badge.svg)](https://github.com/dropbox/dbxcli/actions/workflows/release.yml)
67

78
`dbxcli` is a scriptable Dropbox CLI for files, shared links, teams, and
89
automation workflows. It is built for humans in the terminal, scripts, CI jobs,
@@ -264,26 +265,22 @@ dbxcli --help --output=json
264265
dbxcli put --help --output=json
265266
```
266267

267-
## Deeper documentation
268+
## Documentation
268269

269270
* [Automation and JSON output](https://github.com/dropbox/dbxcli/blob/master/docs/automation.md)
270271
* [Sharing workflows](https://github.com/dropbox/dbxcli/blob/master/docs/sharing.md)
271272
* [JSON schema v1](https://github.com/dropbox/dbxcli/blob/master/docs/json-schema/v1/README.md)
272273
* [Release history](https://github.com/dropbox/dbxcli/blob/master/CHANGELOG.md)
274+
* [Contributing](https://github.com/dropbox/dbxcli/blob/master/CONTRIBUTING.md)
273275

274276
Generated Cobra command docs live under `docs/commands/`, and CI verifies they
275277
stay in sync with the CLI.
276278

277279
## Contributing
278280

279-
* If you are submitting a non-trivial change, please fill out the
280-
[Dropbox Contributor License Agreement](https://opensource.dropbox.com/cla/)
281-
first.
282-
* Open a [pull request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request)
283-
with a clear description of the change.
284-
* Include tests or manual validation details when relevant.
281+
Contributions are welcome. See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup, testing, pull request guidelines, and the Dropbox Contributor License Agreement.
285282

286283
## Useful resources
287284

288-
* [Go SDK documentation](https://pkg.go.dev/github.com/dropbox/dropbox-sdk-go-unofficial)
285+
* [Dropbox Go SDK](https://pkg.go.dev/github.com/dropbox/dropbox-sdk-go-unofficial)
289286
* [Dropbox API documentation](https://www.dropbox.com/developers/documentation/http/documentation)

0 commit comments

Comments
 (0)