Skip to content

Latest commit

 

History

History
307 lines (224 loc) · 10.6 KB

README.md

File metadata and controls

307 lines (224 loc) · 10.6 KB

Cartero

Make HTTP requests and test APIs

Screenshot of Cartero

Cartero is a graphical HTTP client that can be used as a developer tool to test web APIs and perform all kind of HTTP requests to web servers. It is compatible with any REST, SOAP or XML-RPC API and it supports multiple request methods as well as attaching body payloads to compatible requests.

Features:

  • Loads and saves to plain Git-friendly TOML files, so that you can own your data.
  • Customization and modification of the request headers and body payloads.
  • Variable binding for API keys and other secret information.

Motivation

This project exists because there aren't many native graphical HTTP testing applications / graphical alternatives to cURL that are fully free software, and I think the world has had enough of Electron / non-native applications that are anonymously accesible until one day you are forced to create an account and log in to use just to make some investor happy with their numbers or to chug some unwanted artificial intelligence at users.

Download

Get it on Flathub

You can also download a version for Windows or macOS.

Warning

The Windows and macOS versions are currently not notarized or signed. On first run on Windows, you'll need to confirm the SmartScreen warning. On first run on macOS, you'll need to allow opening apps from unidentified developers. Visit Apple Support for more information and instructions depending on your OS version. If you don't trust these binary distributions, you can always build from sources.

Platform Latest version
Windows Windows, x86_64 v0.1.2 (installer)
macOS macOS, Apple Sillicon v0.1.2 (.dmg)
macOS macOS, Intel v0.1.2 (.dmg)

Building

Flatpak

Install the runtime:

flatpak install --user org.gnome.Sdk//46 org.freedesktop.Sdk.Extension.rust-stable//23.08

Install the Flatpak, possibly passing the --user parameter.

flatpak-builder --user --install flatpak_app build-aux/es.danirod.Cartero.json

You will find Cartero in your application launcher, or you can launch it with flatpak run es.danirod.Cartero.

Homebrew

To install Cartero from this cask, simply add this repository as a tap.

brew tap SoloAntonio/cartero

Now you can install any version hosted as cask with

brew install --cask cartero

Meson

Use this to build the application outside of a Flatpak image. Note that this method should only be used by power users, to package the application on build scripts for rolling-release distributions, or for development purposes.

Currently, to build the application you'll have to make sure that the required libraries are installed on your system.

  • glib >= 2.72
  • gtk >= 4.14
  • gtksourceview >= 5.4
  • libadwaita >= 1.5

Make sure that you have Meson in your system. For instance,

sudo apt install meson
sudo dnf install meson
sudo pacman -S meson

Then use the following commands to build and install the application

meson setup build
ninja -C build
ninja -C build install

To avoid installing system-wide the application, you can use a prefix:

meson setup build --prefix=/usr
ninja -C build
ninja -C build install

If you plan on contributing to the project, use the development profile.

meson setup build -Dprofile=development

It will also configure a Git hook so that the source code is checked prior to authoring a Git commit. The hook runs cargo fmt to assert that the code is formatted. Read hooks/pre-commit.hook to inspect what the script does.

Cargo (Rust)

This may be the preferred approach if you use rust-analyzer and tools like that, because Meson uses a separate target directory, and you might prefer to use the standard target/ directory.

You can use cargo build and cargo run to build and run the project executable, but you will still need to use Meson to build the data files (GSettings schema files, Gio resource files, gettext translations...).

You should use build-aux/cargo-build.sh. It wraps cargo build, but also compiles the data files and copies them in target/share, so that during application startup those files can be picked.

Nix/NixOS

Use this approach to install, build or try cartero on a nixos system. Instructions assume you're using a flakes nixos system, but you could install it in a regular nixos system aswell by importing the derivation and adding the appropiate src attribute on it, note that this may require some manual intervation though.

First of all, add cartero to your flake inputs so you can import the package.

{
  inputs = {
    cartero.url = "github:danirod/cartero";
  };
}

Warning

This examples assume you're passing inputs in the specialArgs so you can utilize it in others modules if you're splitting your config in multiple files.

Then in your home.packages (when using home manager) or environment.systemPackages (global nix packages), add the derivation.

environment.systemPackages = [
  inputs.cartero.packages.x86_64-linux.default
];

Tip

You can try changing the architecture, not tested in every arch atm though.

Another way is by making a nixpkgs overlay to add cartero and then install it easily.

nixpkgs.overlays = [
  (_: final: let
    inherit (inputs) cartero;
    inherit (final) system;
  in {
    cartero = cartero.packages.${system}.default
  })
];

And then in the packages list of your choice.

home.packages = with pkgs; [
  cartero
];

Note

You may need to reboot the system or relogin to be able to see cartero on your launcher

Contributing

🐛 This project is currently a larva trying to grow. Do you want to get in? Take a seat!

Contributing with code

This project is highly appreciative of contributions. If you know about Rust, GTK or the GNOME technologies and want to help during the development, you can contribute if you wish. Fork the project and commit your code.

Some checklist rules before submitting a pull request:

  • Use a feature branch, do not make your changes in the trunk branch directly.

  • Rebase your code and make sure that you are working on top of the most recent version of the trunk branch, in case something has changed while you were working on your code.

  • Update the locales if you changed strings. The ninja target that you are looking for is called cartero-update-po (such as ninja -C build cartero-update-po). Don't worry, you don't have to translate the strings by yourself, but make sure that the new templates are added to the .po and .pot files.

  • Use the pre-commit hook. The pre-commit hook will validate that your code is formatted. It should be automatically configured if you run Meson in development mode (-Dprofile=development), but you can install it on your own or run hooks/pre-commit.hook.

The project is starting small, so if you want to do something big, it is best to first start a discussion thread with your proposal in order to see how to make it fit inside the application.

While this application is not official and at the moment is not affiliated with GNOME, you are expected to follow the GNOME Code of Conduct when interacting with this repository.

Contributing with translations

Do you want to use Cartero in your language? We are using Weblate to coordinate and translate comfortably this project using a web interface. Make an account and start proposing strings and they will be added to the application. That will also entitle you as a contributor!

Contributing with feedback

Cartero is still getting new features, and hopes to be as useful as it can be. Found a bug or something is wrong? Report it. An use case you are missing? Report it. Show us how you integrate Cartero on your workflow so that we can build our diverse list of use cases.

Licenses

Cartero is published under the terms of the GNU General Public License v3.0 or later.

Copyright 2024 the Cartero authors

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>.

The Cartero icon is published under the a Creative Commons Attribution-ShareAlike 4.0 International license.

Credits and acknowledgments

Cartero is maintained by Dani Rodríguez.

Big shoutout to the contributors who have sent patches or translations!

Also, Christian suggested Cartero as the name for the application and I liked it enough to call it like so, therefore shoutout to Christian as well!

Finally, shoutout to many of the GTK and GNOME Circle applications out there whose source code I've read in order to know how to use some of the GTK features that you cannot learn just by reading the official docs.

Blog

Dani's dev blog (in Spanish) of Cartero.