All Projects → protop-io → protop

protop-io / protop

Licence: Apache-2.0 License
protobufs, packaged. https://protop.io

Programming Languages

java
68154 projects - #9 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to protop

aip-go
Go SDK for implementing resource-oriented gRPC APIs.
Stars: ✭ 47 (-30.88%)
Mutual labels:  protocol-buffers, grpc, protobufs
Go Micro Boilerplate
The boilerplate of the GoLang application with a clear microservices architecture.
Stars: ✭ 147 (+116.18%)
Mutual labels:  protocol-buffers, grpc
Protoeasy Go
Simpler usage of protoc. Deprecated.
Stars: ✭ 129 (+89.71%)
Mutual labels:  protocol-buffers, grpc
grpc-chat
Simple Chat Server/Client implemented with gRPC
Stars: ✭ 107 (+57.35%)
Mutual labels:  protocol-buffers, grpc
Protoc Gen Struct Transformer
Transformation functions generator for Protocol Buffers.
Stars: ✭ 105 (+54.41%)
Mutual labels:  protocol-buffers, grpc
Protodot
transforming your .proto files into .dot files (and .svg, .png if you happen to have graphviz installed)
Stars: ✭ 107 (+57.35%)
Mutual labels:  protocol-buffers, grpc
Buf
A new way of working with Protocol Buffers.
Stars: ✭ 3,328 (+4794.12%)
Mutual labels:  protocol-buffers, grpc
Protoreflect
Reflection (Rich Descriptors) for Go Protocol Buffers
Stars: ✭ 651 (+857.35%)
Mutual labels:  protocol-buffers, grpc
Go Grpc Examples
This repo contains examples and implementations of different types of GRPC services and APIs using Golang.
Stars: ✭ 180 (+164.71%)
Mutual labels:  protocol-buffers, grpc
Rules protobuf
Bazel rules for building protocol buffers and gRPC services (java, c++, go, ...)
Stars: ✭ 206 (+202.94%)
Mutual labels:  protocol-buffers, grpc
agentgo
Hi! Agentgo is a tool for making remote command executions from server to client with golang, protocol buffers (protobuf) and grpc.
Stars: ✭ 15 (-77.94%)
Mutual labels:  protocol-buffers, grpc
Grpc Swift
The Swift language implementation of gRPC.
Stars: ✭ 1,270 (+1767.65%)
Mutual labels:  protocol-buffers, grpc
Google Assistant Java Demo
A simple Google Assistant Client in Java
Stars: ✭ 53 (-22.06%)
Mutual labels:  protocol-buffers, grpc
Go Proto Gql
Protobuff plugins for generating graphql schema and golang to graphql bindings. Also supports a graphql gateway (Alpha)
Stars: ✭ 127 (+86.76%)
Mutual labels:  protocol-buffers, grpc
Ts Protoc Gen
Protocol Buffers Compiler (protoc) plugin for TypeScript and gRPC-Web.
Stars: ✭ 913 (+1242.65%)
Mutual labels:  protocol-buffers, grpc
Protodep
Collect necessary .proto files (Protocol Buffers IDL) and manage dependencies
Stars: ✭ 167 (+145.59%)
Mutual labels:  protocol-buffers, grpc
protoc-plugin
A protoc compiler plugin for Clojure applications
Stars: ✭ 28 (-58.82%)
Mutual labels:  protocol-buffers, grpc
Prototool
Your Swiss Army Knife for Protocol Buffers
Stars: ✭ 4,932 (+7152.94%)
Mutual labels:  protocol-buffers, grpc
Startup Os
Working examples of Google's Open Source stack and deployment to the cloud.
Stars: ✭ 564 (+729.41%)
Mutual labels:  protocol-buffers, grpc
Evans
Evans: more expressive universal gRPC client
Stars: ✭ 2,710 (+3885.29%)
Mutual labels:  protocol-buffers, grpc

protop logo

protop

protop is an open source protocol buffer package manager. It is mainly motivated by the lack of consistency in how protobufs are currently shared. For public APIs to embrace gRPC, or for an organization to develop with protobufs without a complex monorepo solution, a simple package manager is the obvious solution.

This tool works well for local projects as well as projects with external dependencies. For distributing projects, there is an implementation of a Nexus repository plugin being developed here, currently in a functional beta state as well.

Protop is welcome to contributions; if you are interested in the technology, please reach out here are to the maintainer at [email protected]. If you have any thoughts about improvements/features or issues, let's chat!

Install

From Homebrew

Protop is available from our tap. You'll only need to add the tap once:

brew tap protop-io/protop

Install protop with brew. It will automatically search our tap:

brew install protop

You can test that the installation worked:

protop

To install upgrades:

brew upgrade protop

From the source

This is only necessary if you are actively developing or if you are not able to use Homebrew.

In the cloned repository, run the install script in the root directory:

$ ./install.sh

This will prompt you to add ~/.protop/bin to your PATH if it is not already there. Now you should be able to run protop help to see a full list of commands/options.

Usage

Initialize a project

$ protop init
Organization name (required): awesome-labs
Project name (required): numbers
Initial version (default 1970.1.1.SNAPSHOT):
Entry point: (default "."):
Initialized new project.

This will generate a manifest file named protop.json.

{
  "name" : "numbers",
  "version" : "1970.1.1.SNAPSHOT",
  "organization" : "awesome-labs"
}

Publish ("link") locally

This will make the project accessible to all other projects that run sync with links enabled.

$ protop link

To unlink a project, in the project directory:

$ protop unlink

To unlink all projects system-wide:

$ protop links clean

Publish to a repository*

$ protop publish -r=https://repository.example.com

*There is an implementation of a Nexus plugin for protop required for this to work. More details here. Coming soon, there will be better documentation on the API of the repository itself.

Sync local/external dependencies

Run the following with -l or --use-links to include local/linked dependencies, or run without it to only include dependencies from the network.

$ protop sync --use-links
Syncing linked projects.
Syncing registered dependencies.
Done syncing.

The directory tree should now look like this:

.
├── .protop
│   └── path
│       └── org_a
│           └── project_a -> ~/.protop/cache/other_org/other_project/1.2.1
├── protop.json
├── AwesomeProto.proto
└── out

As you can see, protop creates symbolic links to projects in a system-wide cache where all dependencies are stored whether they were protop linked or retrieved from an external repository.

To clean the system-wide cache (not generally recommended/necessary):

$ protop cache clean

Use with Gradle or other build tools

Use with Gradle

There isn't a custom Gradle plugin for protop (yet). Even so, the implementation is quite simple. Assuming you have an existing build.gradle setup for a protobuf project, add the following task to the root project:

task protop(type: Exec) {
    workingDir "."
    commandLine "protop", "sync"
}

This task will simply run protop sync. To invoke it upon gradle build and ensure that it is run before the protos are generated, alter the protobuf block (or add it now):

protobuf {
    // ...
    generateProtoTasks {
        // ...
        all().each { task -> task.dependsOn protop }
    }
}

Finally, make sure the compiler will find all the synced protos:

sourceSets {
    main {
        // ...
        proto {
            srcDir ".protop/path"
        }
    }
}

Use with protoc directly

With dependencies already synced, you can call protoc in a project that looks like the one above:

protoc --proto_path=.protop/path \
       --java_out=out \
       AwesomeProto.proto

Use with other build tools

Please let us know other tools you'd like to see an integration with besides the ones above. If you have an examples you'd like to add or have issues with the examples here, please open an issue or submit a PR.

.protoprc configuration

Create a .protoprc file in the project directory to configure options that generally won't change, such as the repository URI. For example:

repository=https://repository.example.com

Currently, the following properties are recognized:

  • repository: repository URI
  • publish.repository: repository URI for publishing (prioritized over repository)
  • retrieve.repository: repository URI for retrieving (prioritized over repository)

Roadmap

There are a few technical debts that need to be resolved before any big features will be added (mostly better tests), but here are a few of the bigger items on the roadmap:

  • Production repository - At least initially, this will be implemented using the Nexus Repository Manager using the protop plugin.
  • Interface for joining the repository and creating organizations (probably somewhere at something.protop.io)
  • Full documentation at protop.io
  • Integration with Gradle and other development tools
  • More contributors!

Development

Protop is written in Java using the Picocli CLI framework. There are two main modules in this library, protop-cli which is the entry point for the CLI, and protop-core which contains all of the actual business logic.

To fully test with publishing, follow the repository documentation. The Nexus plugin is still in development and considered unstable for production, but it is stable enough for feature development of the CLI at this point.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].