Pieces is the only AI tool you need to be a 10x developeršŸ¤Æ

Anmol Baranwal - Jul 5 - - Dev Community

ChatGPT is boring and we all know it but I've something exciting that can take your dev skills to 10x.

It's an AI tool called Pieces, and I've been a huge fan for a long time.

Today, we will cover Pieces and the complete guide on how it can help you be more productive.

One thing that you can do is browse the docs (web browser) and let the AI learn everything. You can ask doubts, and it will answer your doubts from those docs. And trust me, that's just scratching the surface in terms of cool features!

Let's break it down :)


What is covered?

In a nutshell, we are covering these topics in detail.

  1. What is Pieces and why should you use it?
  2. A step-by-step guide on how to install Pieces (VSCode + Desktop + Chrome extension) with use cases.
  3. Pieces Copilot+ with live context (most interesting one).
  4. Popular apps built with Pieces.

Visit Pieces šŸ”„


1. What is Pieces and why should you use it?

Pieces is also an AI tool but much more advanced and reliable.

It's designed to help developers through intelligent code snippet management, contextualized copilot interactions, and many more.

pieces

You can watch this quick video to get the basic idea.

A safe way to describe Pieces is that it's a horizontal tool that works, learns, and provides value across the three main pillars of a developerā€™s workflow.

āœ… 1. Research and problem solving.

You can close your 50 browser tabs and clear your search history, knowing that you've saved everything to Pieces.

Research and problem solving

Ā 

āœ… 2. Collab with others and colleagues.

Keep track of critical context by sharing, instead of endlessly scrolling through old chat messages.

collab

Ā 

āœ… 3. Coding in the IDE.

Code smarter by centralizing your materials. Explain, comment, generate, save, reference, and reuse code in your editor, without ever leaving your active project. Whoa!

Coding in the IDE

Ā 

You can read the list of all the cool features and the docs if you're interested in exploring it yourself.

But the best part is that there are a lot of integration options so you never have to leave your flow.

You can read about all of the plugins that are available along with a direct install button and the option to learn more about each of the integrations. They have clearly described what all you can do in each of these and I love the detailing of these docs!

plugin

Pieces offers an AI-enabled way of going back in history to find the stuff we used and save code for later use. And with Pieces, you can change the LLM behind the Pieces Copilot so that you can continue using it when cloud models like ChatGPT go down.


2. A step-by-step guide on how to install Pieces with use cases.

I will be sharing how you can install Pieces along with the use cases that can give you a better understanding of how it can help you.

Ā 

šŸŽÆ VSCode Extension.

You can install it from the VSCode extensions marketplace or you can directly search it under extensions.

extensions

Any copilot chats and saved materials that you have in your IDE will be available across all your integrations and the Desktop App.

Ā 

āœ… Use cases.

a. You can right-click by selecting the portion of code and ask the copilot any questions that you want.

vscode extension

In this case, I asked, "I'm trying to understand this code, can you explain in simple terms without jargon".

pieces

b. Whenever you have an error in your code, simply open the quick fix menu and select Pieces: Fix to have the Copilot resolve your issue for you. Simple and efficient!

fix code

c. You can save your snippet. It categorizes based on language type, which is handy when searching later on. Plus, it stores more smart information than you might expect :)

save to pieces

stored snippet info

stores a lot of smart info with snippet

Ā 

If you'd like to get a closer look at a snippet before adding it to your project, click on the snippet in the list view and it will open in a Markdown preview.

You'll be able to see the snippet and its context, including any tags, descriptions, titles, related links, related people, and previously generated shareable links.

d. There are a lot of things like auto save, auto expansion, cloud feature. Read about all of the use cases on the docs that you can do with the VSCode extension.

Ā 

šŸŽÆ Chrome Extension.

You can install the chromium extension, Edge Addon, or Firefox Addon depending on the browser you're using. I'm going with Chrome!

chrome extension

Ā 

āœ… Use cases.

a. The struggle of switching the tabs to check all the snippets is real which Pieces web extension solves quickly.

As you can see, we can find all of the saved snippets including the one which I saved earlier.

saved snippets

b. I was going through the next.js docs, Pieces extension on the web browser quickly grabbed all of the snippets suggestions that I could save. I can quickly use it in the VSCode whenever I want without trying to visit the docs each time I need that code.

saved snippets suggestions

c. It will also give you a brief history of the last websites and the info on the snippets from each of them. You have full control over what you want to see.

last 5 websites

d. You can use the usual copilot chat from the browser itself without opening any other AI tool like ChatGPT.

copilot chat

chat

e. You can also change the settings based on your preferences.

settings

settings

Ā 

šŸŽÆ Desktop App.

You can install it using Pieces for Windows, Pieces for macOS, and Pieces for Linux based on the operating system you're using.

pieces desktop

I'm a Windows user with a love for Linux commands (using hyperterminal) which is why I'm going forward with Windows.

After installation, you will get Pieces Suite.

pieces suite

You can do it as follows.

pieces intallation of desktop app

Their centralized storage agent (Pieces OS) works on-device, unifying various developer tools (including the desktop app) to bring all the features to the table.

If you're wondering what Pieces OS is then it enables Pieces products and local LLMs to operate 100% locally on your machine, with an option to connect to the cloud for backup, sharing, and cloud-based LLMs for code generation. You can read more about it on the official docs.

Let's see the options that you need to do while installing Pieces for developers.

step 1

step 1

Ā 

step2

step 2

Ā 

step 3

step 3

Ā 

step 4

step 4

Ā 

step 5

step 5

Ā 

After doing all the steps, your starting screen will look something like this.

starting screen

Ā 

āœ… Let's explore some of the awesome use cases that are damn helpful.

a. You can choose the LLM models for both cloud and on-device. The options are good enough.

on-device

on device llm models

cloud

cloud llm models

Ā 

b. It can access everything on your entire PC, including recent web searches, files, folders, and browsers to get the hang of what you do as a developer. You need to give permission!

c. You can use the search menu using Ctrl + k which is generally present in docs. We all use it on many websites and software like GitHub.

search menu

d. You get settings with a lot of options and a little info about each. I couldn't explore each of them because there are so many options!

settings

e. You can do a global search, check saved materials, see workflow activity, and a lot more.

workflow activity

workflow activity

Ā 

snippet discovery

snippet discovery

Ā 

f. You can generate shareable links of the snippet, and save it to GitHub Gist under the option of Saved Materials.

shareable links

shareable links

g. But the most exciting feature for people who take screenshots is the option to extract code from the screenshot. I tried it and it was able to extract the code with 100% accuracy.

input screenshot

input screenshot

Ā 

extracted code

extracted code

Ā 

Personally, there are a lot of small things that make the experience very good which I believe you need to explore yourself.

For me, saving snippets, the ability to share them very easily, and the live context to check where I left off are slightly more reliable than others.

manage conversation context

Anyway, let's explore in deep on how we can enable the live context and what it actually does!


3. Pieces Copilot+ with live context.

The most recent concept of Live Context just made it next level. You can watch the demo that created the hype on Twitter!

With this, Pieces Copilot+ can now provide hyper-aware assistance to guide you right back to where you left off. It's powered by the Workstream Pattern Engine (WPE), which enables the world's first Temporally Grounded Copilot :)

live context

It has all the data on what you worked on

Ā 

āœ… Imagine you're working on your device as usual and exploring documentation for any framework. You can ask it specific questions like, "Can you explain the concept of ABC from the docs I recently viewed?" It provides detailed and accurate answers.

āœ… Ask it, What was I working on an hour ago? and let it help you get back into flow.

āœ… Or ask, "What did Anmol suggest I test in the latest release?" It stores everything you've worked on effectively.

Under the hood, these screenshots are not saved, but captured, processed, and stored in a form that can be leveraged as context when you ask for it, and all of this happens entirely on your device.

None of your screen data is sent to the cloud.

Just to let you know, Pieces' contextual understanding evolved from copilots - this YouTube video and is actually the third step in the process.

Ā 

Let's see how to activate it on the Pieces desktop application.

a. Open the Pieces suite and then launch Pieces for developers.

pieces suite

pieces suite

Ā 

pieces for developers

pieces for developers

Ā 

b. Open the power menu using the default combination for Windows:

  • Press Ctrl + ā†µ (Control + Enter)

  • Or Press Ctrl + ā‡§ + P (Control + Shift + P)

Then go to settings and Machine Learning. Now, just click the on button beside the workstream pattern engine.

search menu

search menu

Ā 

workstream pattern engine

workstream pattern engine

Ā 

c. As you can see, it's currently turned off. Simply click on it to grant the necessary permissions so it can run in the background and observe everything you do.

I understand privacy concerns, I had them too. But, after thorough cross-checking, I can assure you it's completely safe to use. You can read more on the official docs.

d. You just need to click on the live context in the chat and voila! You can now use it easily.

live context off

live context: OFF

Ā 

live context on

live context: ON

Ā 

You can use it as we discussed earlier.

live context


4. Popular Apps built with Pieces.

They have a bunch of SDK options for Pieces OS client with TypeScript, Kotlin, Python, and Dart.

Since it's more like a tool there won't be so many projects but developers have still used it to build awesome projects.

āœ… DeskBuddy.

A community project that helps you understand, evaluate, and improve your coding habits through analytics and Copilot Conversation.

The primary language used is TypeScript.

You can check the GitHub Repository.

Ā 

āœ… CLI Agent.

A comprehensive command-line interface (CLI) tool designed to interact seamlessly with Pieces OS. It provides a range of functionalities such as asset management, application interaction, and integration with various Pieces OS features.

The primary language used is Python.

You can check the GitHub Repository.

Ā 

āœ… Streamlit & Pieces.

The Pieces Copilot Streamlit Bot is an interactive chatbot application built using Streamlit, designed to provide users with a seamless interface to ask questions and receive answers in real-time.

The primary language used is Python.

You can check the GitHub Repository.


I think it's safe to say that Pieces is changing the world and as a developer, you should use it to your advantage.

For me, as a technical writer and a developer, Pieces is the only tool that I would need to make myself 10x productive.

I hope you loved the breakdown of Pieces, and let me know in the comments if you know any other cool features about Pieces.

Please join my community for developers and tech writers at dub.sh/opensouls.

If you like this kind of stuff,
please follow me for more :)
profile of Twitter with username Anmol_Codes profile of GitHub with username Anmol-Baranwal profile of LinkedIn with username Anmol-Baranwal

Follow Pieces on DEV here.

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .