# Development setup

> Development setup - Setting up your development environment for building and developing the
> DataRobot CLI.

This Markdown file sits beside the HTML page at the same path (with a `.md` suffix). It summarizes the topic and lists links for tools and LLM context.

Companion generated at `2026-07-27T18:44:30.194558+00:00` (UTC).

## Primary page

- [Development setup](https://docs.datarobot.com/ja/docs/agentic-ai/cli/development/setup.html.md): Full documentation for this topic (Markdown sidecar).

## Sections on this page

- [前提条件](https://docs.datarobot.com/ja/docs/agentic-ai/cli/development/setup.html.md#prerequisites): In-page section heading.
- [インストール](https://docs.datarobot.com/ja/docs/agentic-ai/cli/development/setup.html.md#installation): In-page section heading.
- [Installing Task](https://docs.datarobot.com/ja/docs/agentic-ai/cli/development/setup.html.md#installing-task): In-page section heading.
- [macOS](https://docs.datarobot.com/ja/docs/agentic-ai/cli/development/setup.html.md#macos): In-page section heading.
- [Linux](https://docs.datarobot.com/ja/docs/agentic-ai/cli/development/setup.html.md#linux): In-page section heading.
- [Windows](https://docs.datarobot.com/ja/docs/agentic-ai/cli/development/setup.html.md#windows): In-page section heading.
- [Setting up the development environment](https://docs.datarobot.com/ja/docs/agentic-ai/cli/development/setup.html.md#setting-up-the-development-environment): In-page section heading.
- [リポジトリのクローンを作成する](https://docs.datarobot.com/ja/docs/agentic-ai/cli/development/setup.html.md#clone-the-repository): In-page section heading.
- [Install development tools](https://docs.datarobot.com/ja/docs/agentic-ai/cli/development/setup.html.md#install-development-tools): In-page section heading.
- [Build the CLI](https://docs.datarobot.com/ja/docs/agentic-ai/cli/development/setup.html.md#build-the-cli): In-page section heading.
- [Verify the build](https://docs.datarobot.com/ja/docs/agentic-ai/cli/development/setup.html.md#verify-the-build): In-page section heading.
- [Available development tasks](https://docs.datarobot.com/ja/docs/agentic-ai/cli/development/setup.html.md#available-development-tasks): In-page section heading.
- [Common tasks](https://docs.datarobot.com/ja/docs/agentic-ai/cli/development/setup.html.md#common-tasks): In-page section heading.
- [構築中](https://docs.datarobot.com/ja/docs/agentic-ai/cli/development/setup.html.md#building): In-page section heading.
- [テストの実行](https://docs.datarobot.com/ja/docs/agentic-ai/cli/development/setup.html.md#running-tests): In-page section heading.
- [Linting and formatting](https://docs.datarobot.com/ja/docs/agentic-ai/cli/development/setup.html.md#linting-and-formatting): In-page section heading.
- [次のステップ](https://docs.datarobot.com/ja/docs/agentic-ai/cli/development/setup.html.md#next-steps): In-page section heading.

## Documentation content

This guide covers setting up your development environment for building and developing the DataRobot CLI.

## 前提条件

- Go 1.25.3+ — Download
- Git —version control
- Task —task runner ( install )

## インストール

### Installing Task

Task is required for running development tasks.

#### macOS

```
brew install go-task/tap/go-task 
```

#### Linux

```
sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b /usr/local/bin 
```

#### Windows

```
choco install go-task 
```

## Setting up the development environment

### リポジトリのクローンを作成する

```
git clone https://github.com/datarobot-oss/cli.git
cd cli 
```

### Install development tools

```
task dev-init 
```

This will install all necessary development tools including linters and code formatters.

### Build the CLI

```
task build 
```

The binary will be available at `./dist/dr`.

### Verify the build

```
./dist/dr version 
```

## Available development tasks

View all available tasks:

```
task --list 
```

### Common tasks

| タスク | 説明 |
| --- | --- |
| task build | Build the CLI binary |
| task test | Run all tests |
| task test-coverage | Run tests with coverage report |
| task lint | Run linters and code formatters |
| task fmt | Format code |
| task clean | Clean build artifacts |
| task dev-init | Setup development environment |
| task install-tools | Install development tools |
| task run | Run CLI without building (e.g., task run -- templates list) |

## 構築中

Always use `task build` for building the CLI.This ensures:

- Version information from git is included
- Git commit hash is embedded
- Build timestamp is recorded
- Proper ldflags configuration is applied

```
# Standard build (recommended)
task build

# Run without building (for quick testing)
task run -- templates list 
```

## テストの実行

```
# Run all tests
task test

# Run tests with coverage
task test-coverage

# Run specific test
go test ./cmd/auth/... 
```

## Linting and formatting

```
# Run all linters (includes formatting)
task lint

# Format code only
task fmt 
```

The project uses:

- golangci-lint for comprehensive linting
- go fmt for basic formatting
- go vet for suspicious constructs
- goreleaser check for release configuration validation

## 次のステップ

- Project structure —understand the codebase organization
- Building guide —detailed build information and architecture
- Release process —creating releases and publishing
