Show HN: Recode – Free, open-source, community-driven Codespaces alternative

github.com

100 points by jeremylevy 2 years ago

Hey HN,

As most of you (I think?), I cannot learn something without having a project, on the side, to implement what I’ve just learned.

Recode is the project that I've used to learn Go. It lets you create a development environment in your cloud provider account easily.

You can think of it as a desktop version of Gitpod / Coder / GitHub Codespaces less polished and with less features but 100% free, 100% open-source and 100% community-driven.

At the time of writing, it only works with Visual Studio Code and AWS.

In order to let you configure your development environments easily, I’ve chosen to use Docker with some Dockerfiles:

   - One for your user configuration.
   
   - One for your project.
The user configuration corresponds to the tools / settings that you use in all your projects like your timezone / locale, your preferred shell or your dotfiles.

The project configuration corresponds to the tools / settings that you use in a specific project like Go >= 1.18 and Node.js >= 14.

As you may have guessed, the project configuration inherits from the user one.

> Why Docker and not something like NixOS, for example?

I know that containers are not meant to be used as a VM like that, but, at the time of writing, Docker is still the most widely used tool among developers to configure their environment (even if it may certainly change in the future :-)).

> Given that my dev env will run in a container does it mean that it will be limited?

Mostly not.

Given the scope of this project (a private instance running in your own cloud provider account), Docker is mostly used for configuration purpose and not to "isolate" the VM from your environment.

As a result, your development environment container runs in privileged mode in the same network than the host.

----

I post this here, because, you know, even learning project could be useful to someone.

Still learning Go by the way, so I'm open to any suggestions to improve.

yewenjie 2 years ago

Does it generate some config for AWS/ cloud providers or does it directly do deploy it? I would prefer if there is a easy to review text based config that can be deployed in another step.

  • jeremylevy 2 years ago

    Thanks for the feedback!

    At the time of writing, the ressources are directly created on your cloud account when you run the start command.

    Each cloud provider has an extensive documentation that describe the ressources created. (As an example, you could see the documentation for the AWS provider here: https://github.com/recode-sh/aws-cloud-provider).

    Given that this project is 100% community-driven, you could open an issue with this feature proposal. All features are implemented once they receive a significant amount of upvotes (>= 10 currently).

kseistrup 2 years ago

Recode is also the more than three decades old CLI utility that converts files between various character sets: https://github.com/rrthomas/recode

  • jeremylevy 2 years ago

    Oops, I didn't know about this one. Thanks for the heads up.

    It's very difficult to find a CLI name that not already taken these days...

    • kseistrup 2 years ago

      Indeed it is — especially if it is a “generic” name like “recode”.

robertlagrant 2 years ago

This is fun. I imagine that vendors these days set a stopwatch before an open source equivalent of their product appears, and that stopwatch time gets less every year (-:

intelVISA 2 years ago

Nice one, does it handle port forwarding from inside the OpenVSCodeServer container?

  • jeremylevy 2 years ago

    Thanks!

    Yes, port forwarding works as usual.

endingwithali 2 years ago

this is awesome. if you want to share some key insights, i imagine the team at coder would be excited to hear + exchange thoughts on the project

nudded 2 years ago

very similar, but seems a bit more polished is https://coder.com, you can write your own terraform modules and run it on whatever cloud you want.

  • z9znz 2 years ago

    I setup coder self-hosted on a hetzner server, and it was great (and cheap). pair that with a vpn and pihole (same server), and you have a great home-base machine to do all your heavy lifting on.

    It was especially cool connecting my ipad and having the ability to work (although somewhat impractical without a separate keyboard).

    • kylecarbs 2 years ago

      Happy to hear! Let us know if you have any issues (co-founder of coder.com here).

    • lagrange77 2 years ago

      What role does pihole play in this setup?

      • z9znz 2 years ago

        I would connect to the server as my VPN host, so all my traffic was routed through it. With it running the Pi-Hole ad blocking, I had much faster general web performance.

        That had nothing to do with CodeServer except that it was all running on the same box. So access to my code server was limited only to VPN clients, making it more secure; and I only had to connect to one place with my tablet and laptop.

        Of course, any services on the server which would make remote requests would also get filtered through the Pi-Hole, so they too might be sped up a bit as any ad gabage would be stripped away.