# Create Piece Definition

Sydekyks user and operator guide. Check feature availability and release-specific installation requirements.

This tutorial will guide you through the process of creating a Gelato piece with an action that fetches random icecream flavor and trigger that fetches new icecream flavor created. It assumes that you are familiar with the following:

- Sydekyks Local development (https://docs.sydekyks.com/build-pieces/building-pieces/development-setup) Or GitHub Codespaces (https://docs.sydekyks.com/build-pieces/misc/codespaces).

- TypeScript syntax.

## ​Piece Definition

To get started, let’s generate a new piece for Gelato

```
npm run cli pieces create

```

You will be asked three questions to define your new piece:

- Piece Name: Specify a name for your piece. This name uniquely identifies your piece within the Sydekyks gadget ecosystem.

- Package Name: Optionally, you can enter a name for the npm package associated with your piece. If left blank, the default name will be used.

- Piece Type: Choose the piece type based on your intention. It can be either “custom” if it’s a tailored solution for your needs, or “community” if it’s designed to be shared and used by the broader community.

Example:

```
npm run cli pieces create

? Enter the piece name: gelato
? Enter the package name: @activepieces/piece-gelato
? Select the piece type: community

```

The piece will be generated at packages/pieces/community/gelato/,
the src/index.ts file should contain the following code

```
import { PieceAuth, createPiece } from '@activepieces/pieces-framework';

export const gelato = createPiece({
  displayName: 'Gelato',
  description: '',
  logoUrl: 'https://cdn.activepieces.com/pieces/gelato.png',
  auth: PieceAuth.None(),
  minimumSupportedRelease: '0.36.1',
  authors: [],
  actions: [],
  triggers: [],
});

```
