# Advanced Kubo Usage

# Working with Go

Kubo (go-ipfs) is the oldest implementation of IPFS. It is a command-line application, but can also be used as a library in other Go programs.

For more about using Kubo, see any of the following reference documents:

For more technical information about building, debugging or using the API, see:

If you plan to use Kubo as a package in your own Go application, you can take any of three main approaches:

# Go Embedded Client

Package coreapi (opens new window) provides direct access to the core commands in IPFS. If you are embedding IPFS directly in your Go program, this package is the public interface you should use to read and write files or otherwise control IPFS. This package is experimental and subject to change.

If you are running Kubo as a separate process, you should use the Kubo RPC Client (opens new window) to work with it via RPC.

# Packages

Listing of the main go packages in the IPFS ecosystem:

NameGo ReferenceCoverageDescription
Libp2p
go-libp2pGo Reference (opens new window)codecov (opens new window)p2p networking library
go-libp2p-pubsubGo Reference (opens new window)codecov (opens new window)pubsub built on libp2p
go-libp2p-kad-dhtGo Reference (opens new window)codecov (opens new window)dht-backed router
go-libp2p-pubsub-routerGo Reference (opens new window)codecov (opens new window)pubsub-backed router
IPFS
boxoGo Reference (opens new window)codecov (opens new window)libraries for building IPFS applications and implementations
Multiformats
go-cidGo Reference (opens new window)codecov (opens new window)CID implementation
go-multiaddrGo Reference (opens new window)codecov (opens new window)multiaddr implementation
go-multihashGo Reference (opens new window)codecov (opens new window)multihash implementation
go-multibaseGo Reference (opens new window)codecov (opens new window)mulitbase implementation
Datastores
go-datastoreGo Reference (opens new window)codecov (opens new window)datastore interfaces, adapters, and basic implementations
go-ds-flatfsGo Reference (opens new window)codecov (opens new window)a filesystem-based datastore
go-ds-measureGo Reference (opens new window)codecov (opens new window)a metric-collecting database adapter
go-ds-leveldbGo Reference (opens new window)codecov (opens new window)a leveldb based datastore
go-ds-badgerGo Reference (opens new window)codecov (opens new window)a badgerdb based datastore
Repo
go-fs-lockGo Reference (opens new window)codecov (opens new window)lockfile management functions
fs-repo-migrationsGo Reference (opens new window)codecov (opens new window)repo migrations
IPLD
go-block-formatGo Reference (opens new window)codecov (opens new window)block interfaces and implementations
go-ipld-formatGo Reference (opens new window)codecov (opens new window)IPLD interfaces
go-ipld-cborGo Reference (opens new window)codecov (opens new window)IPLD-CBOR implementation
go-ipld-gitGo Reference (opens new window)codecov (opens new window)IPLD-Git implementation
go-merkledagGo Reference (opens new window)codecov (opens new window)IPLD-Merkledag implementation (and then some)
Commands
go-ipfs-cmdsGo Reference (opens new window)codecov (opens new window)CLI & HTTP commands library
Metrics & Logging
go-metrics-interfaceGo Reference (opens new window)codecov (opens new window)metrics collection interfaces
go-metrics-prometheusGo Reference (opens new window)codecov (opens new window)prometheus-backed metrics collector
go-logGo Reference (opens new window)codecov (opens new window)logging framework

# Hands-on examples

There are use-case examples in the ipfs/kubo GitHub repository (opens new window). They're all self-contained projects that let your spin up and test environments quickly. Check them out → (opens new window).

A good starting place is the Use kubo as a library to spawn a node and add a file (opens new window).