cute 2.0.35

dotnet tool install --global cute --version 2.0.35                
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest # if you are setting up this repo
dotnet tool install --local cute --version 2.0.35                
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=cute&version=2.0.35                
nuke :add-package cute --version 2.0.35                

Nugetcontributorsissuesstarsbuildforks

<br /><div align="center"><a href="https://github.com/andresharpe/cute"><img src="https://raw.githubusercontent.com/andresharpe/cute/master/docs/images/cute-logo.png" alt="Logo" width="500"></a></div>

<p align="center">A Contentful Update Tool & Extractor</p>

<div align="center"><a href="https://github.com/andresharpe/cute/tree/master/source">View the Source Code</a> ยท <a href="https://www.nuget.org/packages/cute">Download @ Nuget</a></div><br />

Introduction

cute is a cross-platform CLI tool that brings several advanced features and capabilities to working with your content hosted on Contentful.

<br /><div align="center"><img src="https://raw.githubusercontent.com/andresharpe/cute/master/docs/images/cute-overview-graphic.png" alt="cute help screenshot" width="70%"><br /></div>

Key Features

  • Bulk processing capabilities lets you download, modify and upload data in most popular formats including Comma delimited files (CSV), Tab delimited files (TSV), MS-Excel workbooks (XLSX), Javascript Object Notation (JSON) and YAML.
  • Input data can be sourced and synced from many external sources including flat files, databases, webAPIs, your Contentful space or other popular sources like WikiData.
  • Content can be translated or even generated from scratch using popular technologies like OpenAI and Azure AI Translator.
  • Deploy cute as a Web Server with OpenTelemetry compliant logging and a service terminal to reflect health, configuration and scheduled tasks.
  • Support for structural subtyping through the typegen command option which exports TypeScript (TS) interface declarations. This feature is especially useful to keep your JavaScript or .NET projects in sync with your content types.
  • cute auto-magically "learns" your Contentful space and generates required configuration nodes to enable process automation.
  • Interact with Douglas, cute's very own AI assistant that will answer questions about your content, or even help formulate queries to interact with your content.

๐Ÿ’ก Contentful is a content infrastructure platform that lets you create, manage and distribute content to any platform. Contentful offers a simple UI to declare and manage a content model, independent from the presentation layer.

Installation

Firstly, make sure you have the Dotnet SDK 8.0 package installed.

For windows (cmd or powershell):

winget install Microsoft.DotNet.SDK.8

Or, on linux and iOS

sudo apt-get update && sudo apt-get install -y dotnet-sdk-8.0

Then:

On windows you may have to close and re-open the command line prompt (or Windows Terminal).

Install the cute cli by typing.

dotnet tool install -g cute

To test whether the installation worked

Simply type

cute

This will display the cute help. You are ready to go! ๐Ÿš€

Getting Help

cute --help

cute help screenshot

Logging into Contentful

Start your cute session by running the login command. This will configure your Contentful session profile using the selected space, environment and API keys. You can also enter your AI and translation services keys here.

cute login

cute login --help screenshot

Display a summary of your Contentful Space

Display a comprehensive overview of your Contentful session information including space, environment, content types and locales. Info related to CLI display settings is also shown.

cute info

cute info screenshot

Working with Content

The cute content and its respective command options represents the real workhorse of the cute tool. It essentially presents the user with a suite of bulk operation options to interact with their content in Contentful.

cute content --help screenshot

Downloading data

Content can easily be downloaded from your Contentful space in one of several popular formats including Excel, comma separated (CSV), tab separated (TSV), JSON and YAML. If no format is specified, the downloaded file with default to the Excel format.

cute content download --content-type <contentType> 
cute content download --content-type <contentType> --format [excel|csv|tsv|json|yaml]

Issuing any content download command will yield a result similar to the display below.

cute download screenshot

Typing cute download --help will list all currently available options and usage.

USAGE:
    cute content download [OPTIONS]

OPTIONS:
    -h, --help                  Prints help information
    -c, --content-type-id <ID>  The Contentful content type id
    -l, --locale <CODE>         The locale code (eg. 'en') to apply the command to. Default is all
    -f, --format <FORMAT>       The output format for the download operation (Excel/CSV/TSV/JSON/YAML)
    -p, --path <PATH>           The output path and filename for the download operation

Uploading/Synchronizing Content

You can upload content from a local file to your Contentful space. The local file can be a previously downloaded and updated Excel, CSV, TSV, JSON or YAML file.

cute upload progress screenshot

cute will prompt you to confirm a 2-digit code to prevent you from updating your content accidentally.

cute upload screenshot

Typing cute content upload --help will show the full usage and options.

USAGE:
    cute content upload [OPTIONS]

OPTIONS:
    -h, --help                  Prints help information
    -c, --content-type-id <ID>  The Contentful content type id
    -l, --locale <CODE>         The locale code (eg. 'en') to apply the command to. Default is all
    -p, --path <PATH>           The local path to the file containing the data to sync
    -f, --format <FORMAT>       The format of the file specified in '--path' (Excel/CSV/TSV/JSON/YAML)
    -m, --match-field <NAME>    The optional name of the field to match in addition to the entry id
    -a, --apply                 Apply and publish all the calculated changes. The default behaviour is to only list the detected changes

Generating strong JavaScript or .NET Types

cute supports structural subtyping through the type scaffold command option. You can export TypeScript (TS) or .NET (CS) interface declarations, or a simple Excel file with individual worksheets detailing your content model. This feature is especially useful to keep your JavaScript or .NET projects in sync with your content types.

USAGE:
    cute type scaffold [OPTIONS]

OPTIONS:
    -h, --help            Prints help information
    -c, --content-type    Specifies the content type to generate types for. Default is all
    -o, --output          The local path to output the generated types to
    -l, --language        The language to generate types for (TypeScript/CSharp)
    -n, --namespace       The optional namespace for the generated type

Content generation using OpenAI

You can generate content using OpenAI Generative Pre-trained Transformer (GPT) using the bulk operation feature of cute.

OpenAI ChatGPT uses a state-of-the-art Large Language Model (LLM) to generate text that is difficult to distinguish from human-written content.

Prompts and system messages that are generally used to interact with ChatGPT are configured and persisted in your Contentful space. This is especially useful as your AI prompts are persisted and backed up in the cloud right alongside your content.

Prompts can be added and configured in the ๐Ÿค– Cute / ContentGenerate section your Contentful space. A typical prompt entry has an id, a system message, a prompt, points to a content type and field. Something like :-

Title Note
title A short title by which the prompt entry is referred to.
systemMessage Used to communicate instructions or provide context to the model at the beginning of a conversation.
prompt A question or instruction that you issue to ChatGPT. This prompt is used to generate an appropriate response.
deploymentModel Select which Large Language Model (LLM) is used for your interaction.
maxTokenLimit The maximum tokens to be used for the interaction
temperature Controls the randomness of the generated response. A higher temperature value increases randomness, making the responses more diverse and creative, while a lower value makes them more focused and deterministic.
topP Controls the diversity of the generated output by truncating the probability distribution of words. It functions as a filter to determine the number of words or phrases the language model examines while predicting the next word. For instance, when the Top P value is set at 0.4, the model only considers 40% of the most probable words or phrases. A higher Top P value results in more diverse creative responses. A lower value will result in more focused and coherent responses.
frequencyPenalty Controls the repetitiveness of words in generated responses. Increasing this value is like telling ChatGPT not to use the same words too often.
presencePenalty Manages the appearance of words in generated text based on their position, rather than frequency. This parameter encourages ChatGPT to employ a more diverse vocabulary
cuteDataQueryEntry A link to the associated data query in ๐Ÿค– Cute / DataQuery
promptOutputContentField The target field of the content entry where the generated response is stored.
DESCRIPTION:
Generate content using a Large Language Model (LLM).

USAGE:
    cute content generate [OPTIONS]

OPTIONS:
    -h, --help          Prints help information
    -k, --key           The key of the 'cuteContentGenerate' entry
    -a, --apply         Apply and publish all the required edits
    -o, --operation     Specify the generation operation to perform. (GenerateSingle, GenerateParallel,
                                      GenerateBatch or ListBatches)

Command Structure for v2.0

The full command structure for the usage of version 2 of cute can be found in this document.

Contributing to Cute

We welcome community pull requests for bug fixes, enhancements, and documentation. See How to contribute for more information.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last updated
2.0.35 4 11/22/2024
2.0.34 40 11/21/2024
2.0.33 79 11/19/2024
2.0.32 91 11/15/2024
2.0.31 77 11/15/2024
2.0.30 112 10/25/2024
2.0.29 109 10/17/2024
2.0.28 102 10/17/2024
2.0.27 106 10/15/2024
2.0.26 102 10/14/2024
2.0.25 88 10/13/2024
2.0.24 96 10/13/2024
2.0.23 97 10/13/2024
2.0.22 98 10/13/2024
2.0.21 99 10/12/2024
2.0.20 108 10/12/2024
2.0.19 98 10/12/2024
2.0.18 97 10/10/2024
2.0.16 141 10/1/2024
2.0.15 105 9/30/2024
2.0.14 106 9/30/2024
2.0.13 104 9/30/2024
2.0.12 114 9/30/2024
2.0.11 83 9/29/2024
2.0.10 94 9/29/2024
2.0.9 86 9/29/2024
2.0.8 100 9/29/2024
2.0.6 97 9/25/2024
2.0.5 83 9/25/2024
2.0.3 94 9/20/2024
2.0.2 119 9/13/2024
2.0.1 108 9/12/2024
1.0.55 149 8/25/2024
1.0.54 147 8/25/2024
1.0.53 132 8/25/2024
1.0.52 139 8/22/2024
1.0.51 141 8/22/2024
1.0.50 132 8/21/2024
1.0.49 144 8/21/2024
1.0.48 135 8/21/2024
1.0.47 127 8/15/2024
1.0.46 124 8/14/2024
1.0.45 112 8/11/2024
1.0.44 99 8/7/2024
1.0.43 83 8/6/2024
1.0.42 79 8/6/2024
1.0.41 77 8/6/2024
1.0.40 91 8/6/2024
1.0.39 115 7/29/2024
1.0.38 103 7/28/2024
1.0.37 115 7/28/2024
1.0.36 103 7/23/2024
1.0.35 104 7/13/2024
1.0.34 96 7/13/2024
1.0.33 97 7/13/2024
1.0.32 102 7/12/2024
1.0.31 93 7/11/2024
1.0.30 109 6/14/2024
1.0.29 107 6/13/2024
1.0.28 97 6/13/2024
1.0.0 107 6/13/2024