Using a code assistant in Code Studios: Claude Code#

This tutorial teaches you how to add the Claude Code assistant to help you write code. You can start by creating your first Code Studio. We will guide you through the needed steps to empower your Code Studio with this assistant.

Prerequisites#

  • Dataiku >= 14.5

  • Administrator privileges for your user profile.

  • The Claude Code for Code Studios plugin installed.

  • Claude Code credentials

Note

The Claude Code for Code Studios plugin needs to be installed. See the reference documentation for more information on installing plugins.

Adding Claude Code to a Code Studio#

Creating a Code Studio Template#

  1. In your Dataiku instance, choose Administration from the Applications menu.

  2. Navigate to the Code Studios tab.

    1. Click the + Create Code Studio Template button.

  3. Type a name for your template, such as claude-template, and then select Create.

  4. Click on the Definition tab

Adding the Visual Studio Code block#

Use the + Add a Block and select the Visual Studio Code block.

Select Visual Studio Code block

Adding the Claude Code block#

Use the + Add a Block and select the Claude Code block.

Select Claude Code block

Defining settings#

Claude Code block settings

Operation mode#

The choice of your operation mode will determine how you authenticate with your Claude model.

The options Route queries through Dataiku LLM Mesh, Connect to Anthropic using the credentials of a Dataiku connection and Manually enter an Anthropic API key will allow you to define a specific connection and model. With these options, you will be already authenticated when launching your Code Studio.

The option Let Claude authenticate interactively will allow you to use a Claude Code subscription plan. With this option, you will need to authenticate after each launch of your Code Studio.

For the purpose of this tutorial, let’s use the last option and use a Claude Code subscription plan.

Add VS Code extension#

Selecting this checkbox will install the Claude Code Visual Studio Code extension. If you decide to keep the checkbox unselected, you will use Claude Code as a terminal tool.

Show advanced parameters#

Selecting this checkbox will allow you to add advanced parameters to your Claude Code usage.

  • Claude Code version: use it if you need to set a specific version of Claude Code.

  • VS Code extension version: use it if you need to set a specific version of the dedicated Visual Studio Code extension for Claude Code.

  • Custom Claude Code settings: use it to add all the custom settings. It must be a valid JSON, see: https://code.claude.com/docs/en/settings#available-settings

Building the template#

You can now build your Code Studio image to use it. To do so, use the Build button. If you need more details on Code Studio template, refer to the tutorial My first Code Studio.

Using Claude Code in your Code Studio#

From your project, use the Code Studios from the Code menu to create and launch your Code Studio based on the template you defined. If you need detailed steps, the Launching your first Code Studio documentation will guide you.

Starting Claude Code extension#

You need to click on the Claude Code button on the upper right of your Code Studio.

Claude Code button

Authenticating#

We suggested that you choose the “Let Claude authenticate interactively” option in your settings. You will need an extra step to use Claude Code. When you click the Claude Code button, your screen will offer several ways to log in.

Claude Code login

The first option lets you use your Claude.ai subscription. When you click this button, a second screen will display the URL to use to obtain your authorization code. Open a separate window and use this URL. You will then copy and paste this code to continue and use Claude Code.

Note

Depending on your browser and/or its extensions, the URL may automatically open a window that won’t work properly with Claude Code’s authentication workflow. Just close this window and follow the process described above.

Claude Code authorization URL

Using Claude Code#

At this point, your Code Studio is fully operational, and you can start using your environment to code with the assistance of all the features in Claude Code. You can find additional information on the usages of Code Studios in edit your code or in edit your Code Agent.

Claude Code usage

Wrapping up/Conclusion#

Congratulations, you’ve learned how to set up and launch a Code Studio in Dataiku that provides access to Claude Code.